* Added support for new act/damage packet 0x2e1 (ZC_NOTIFY_ACT2) for clients 2007-11-13Sakexe and newer.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14979 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ai4rei 2011-10-16 15:35:29 +00:00
parent b13243b678
commit f87e0c0adf
2 changed files with 31 additions and 9 deletions

View File

@ -1,6 +1,7 @@
Date Added Date Added
2011/10/16 2011/10/16
* Added support for new act/damage packet 0x2e1 (ZC_NOTIFY_ACT2) for clients 2007-11-13Sakexe and newer. [Ai4rei]
* Added a message indicating how many concurrent connections the server was compiled to support. [Ai4rei] * Added a message indicating how many concurrent connections the server was compiled to support. [Ai4rei]
* Added field for the change slot feature to character select list packet for 2011-09-28aRagexeRE and newer. [Ai4rei] * Added field for the change slot feature to character select list packet for 2011-09-28aRagexeRE and newer. [Ai4rei]
* Changed function-like macros into inline functions where it seemed appropriate (topic:264007). [Ai4rei] * Changed function-like macros into inline functions where it seemed appropriate (topic:264007). [Ai4rei]

View File

@ -3845,8 +3845,8 @@ static int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int da
/*========================================== /*==========================================
* Sends a 'damage' packet (src performs action on dst) * Sends a 'damage' packet (src performs action on dst)
* R 008a <src ID>.L <dst ID>.L <server tick>.L <src speed>.L <dst speed>.L <damage>.W <div>.W <type>.B <damage2>.W * R 008a <src ID>.L <dst ID>.L <server tick>.L <src speed>.L <dst speed>.L <damage>.W <div>.W <type>.B <damage2>.W (ZC_NOTIFY_ACT)
* R 02e1 <src ID>.L <dst ID>.L <server tick>.L <src speed>.L <dst speed>.L <damage>.L <div>.W <type>.B <damage2>.L * R 02e1 <src ID>.L <dst ID>.L <server tick>.L <src speed>.L <dst speed>.L <damage>.L <div>.W <type>.B <damage2>.L (ZC_NOTIFY_ACT2)
* *
* type=00 damage [param1: total damage, param2: div, param3: assassin dual-wield damage] * type=00 damage [param1: total damage, param2: div, param3: assassin dual-wield damage]
* type=01 pick up item * type=01 pick up item
@ -3860,8 +3860,13 @@ static int clif_calc_walkdelay(struct block_list *bl,int delay, int type, int da
*------------------------------------------*/ *------------------------------------------*/
int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tick, int sdelay, int ddelay, int damage, int div, int type, int damage2) int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tick, int sdelay, int ddelay, int damage, int div, int type, int damage2)
{ {
unsigned char buf[256]; unsigned char buf[33];
struct status_change *sc; struct status_change *sc;
#if PACKETVER < 20071113
const int cmd = 0x8a;
#else
const int cmd = 0x2e1;
#endif
nullpo_ret(src); nullpo_ret(src);
nullpo_ret(dst); nullpo_ret(dst);
@ -3875,12 +3880,13 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
} }
} }
WBUFW(buf,0)=0x8a; WBUFW(buf,0)=cmd;
WBUFL(buf,2)=src->id; WBUFL(buf,2)=src->id;
WBUFL(buf,6)=dst->id; WBUFL(buf,6)=dst->id;
WBUFL(buf,10)=tick; WBUFL(buf,10)=tick;
WBUFL(buf,14)=sdelay; WBUFL(buf,14)=sdelay;
WBUFL(buf,18)=ddelay; WBUFL(buf,18)=ddelay;
#if PACKETVER < 20071113
if (battle_config.hide_woe_damage && map_flag_gvg(src->m)) { if (battle_config.hide_woe_damage && map_flag_gvg(src->m)) {
WBUFW(buf,22)=damage?div:0; WBUFW(buf,22)=damage?div:0;
WBUFW(buf,27)=damage2?div:0; WBUFW(buf,27)=damage2?div:0;
@ -3890,20 +3896,35 @@ int clif_damage(struct block_list* src, struct block_list* dst, unsigned int tic
} }
WBUFW(buf,24)=div; WBUFW(buf,24)=div;
WBUFB(buf,26)=type; WBUFB(buf,26)=type;
#else
if (battle_config.hide_woe_damage && map_flag_gvg(src->m)) {
WBUFL(buf,22)=damage?div:0;
WBUFL(buf,29)=damage2?div:0;
} else {
WBUFL(buf,22)=damage;
WBUFL(buf,29)=damage2;
}
WBUFW(buf,26)=div;
WBUFB(buf,28)=type;
#endif
if(disguised(dst)) { if(disguised(dst)) {
clif_send(buf,packet_len(0x8a),dst,AREA_WOS); clif_send(buf,packet_len(cmd),dst,AREA_WOS);
WBUFL(buf,6) = -dst->id; WBUFL(buf,6) = -dst->id;
clif_send(buf,packet_len(0x8a),dst,SELF); clif_send(buf,packet_len(cmd),dst,SELF);
} else } else
clif_send(buf,packet_len(0x8a),dst,AREA); clif_send(buf,packet_len(cmd),dst,AREA);
if(disguised(src)) { if(disguised(src)) {
WBUFL(buf,2) = -src->id; WBUFL(buf,2) = -src->id;
if (disguised(dst)) if (disguised(dst))
WBUFL(buf,6) = dst->id; WBUFL(buf,6) = dst->id;
if(damage > 0) WBUFW(buf,22) = -1; if(damage > 0) WBUFW(buf,22) = -1;
#if PACKETVER < 20071113
if(damage2 > 0) WBUFW(buf,27) = -1; if(damage2 > 0) WBUFW(buf,27) = -1;
clif_send(buf,packet_len(0x8a),src,SELF); #else
if(damage2 > 0) WBUFW(buf,29) = -1;
#endif
clif_send(buf,packet_len(cmd),src,SELF);
} }
//Return adjusted can't walk delay for further processing. //Return adjusted can't walk delay for further processing.
return clif_calc_walkdelay(dst,ddelay,type,damage+damage2,div); return clif_calc_walkdelay(dst,ddelay,type,damage+damage2,div);
@ -15091,7 +15112,7 @@ static int packetdb_readdb(void)
//#0x02C0 //#0x02C0
0, 0, 0, 0, 0, 30, 30, 0, 0, 3, 0, 65, 4, 71, 10, 0, 0, 0, 0, 0, 0, 30, 30, 0, 0, 3, 0, 65, 4, 71, 10, 0,
0, 0, 0, 0, 29, 0, 6, -1, 10, 10, 3, 0, -1, 32, 6, 0, 0, 0, 0, 0, 29, 0, 6, -1, 10, 10, 3, 0, -1, 32, 6, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 59, 60, 8, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67, 59, 60, 8,
10, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
//#0x0300 //#0x0300
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,