- Cleaned up some disguise related code, it fixes the disguise sprite not having flinch animation
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11838 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
7ca3198824
commit
d3397a4640
@ -3593,23 +3593,21 @@ 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;
|
||||||
clif_send(buf,packet_len(0x8a),src,AREA);
|
if(disguised(dst)) {
|
||||||
|
clif_send(buf,packet_len(0x8a),dst,AREA_WOS);
|
||||||
|
WBUFL(buf,6) = -dst->id;
|
||||||
|
clif_send(buf,packet_len(0x8a),dst,SELF);
|
||||||
|
} else
|
||||||
|
clif_send(buf,packet_len(0x8a),dst,AREA);
|
||||||
|
|
||||||
if(disguised(src)) {
|
if(disguised(src)) {
|
||||||
WBUFL(buf,2) = -src->id;
|
WBUFL(buf,2) = -src->id;
|
||||||
|
if (disguised(dst))
|
||||||
|
WBUFL(buf,6) = dst->id;
|
||||||
if(damage > 0) WBUFW(buf,22) = -1;
|
if(damage > 0) WBUFW(buf,22) = -1;
|
||||||
if(damage2 > 0) WBUFW(buf,27) = -1;
|
if(damage2 > 0) WBUFW(buf,27) = -1;
|
||||||
clif_send(buf,packet_len(0x8a),src,SELF);
|
clif_send(buf,packet_len(0x8a),src,SELF);
|
||||||
}
|
}
|
||||||
if (disguised(dst)) {
|
|
||||||
WBUFL(buf,6) = -dst->id;
|
|
||||||
if (disguised(src)) WBUFL(buf,2) = src->id;
|
|
||||||
else {
|
|
||||||
if(damage > 0) WBUFW(buf,22) = -1;
|
|
||||||
if(damage2 > 0) WBUFW(buf,27) = -1;
|
|
||||||
}
|
|
||||||
clif_send(buf,packet_len(0x8a),dst,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);
|
||||||
}
|
}
|
||||||
@ -4034,12 +4032,12 @@ int clif_skillcasting(struct block_list* bl,
|
|||||||
WBUFW(buf,14) = skill_num;
|
WBUFW(buf,14) = skill_num;
|
||||||
WBUFL(buf,16) = pl<0?0:pl; //Avoid sending negatives as element [Skotlex]
|
WBUFL(buf,16) = pl<0?0:pl; //Avoid sending negatives as element [Skotlex]
|
||||||
WBUFL(buf,20) = casttime;
|
WBUFL(buf,20) = casttime;
|
||||||
clif_send(buf,packet_len(0x13e), bl, AREA);
|
|
||||||
if (disguised(bl)) {
|
if (disguised(bl)) {
|
||||||
|
clif_send(buf,packet_len(0x13e), bl, AREA_WOS);
|
||||||
WBUFL(buf,2) = -src_id;
|
WBUFL(buf,2) = -src_id;
|
||||||
WBUFL(buf,20) = 0;
|
|
||||||
clif_send(buf,packet_len(0x13e), bl, SELF);
|
clif_send(buf,packet_len(0x13e), bl, SELF);
|
||||||
}
|
} else
|
||||||
|
clif_send(buf,packet_len(0x13e), bl, AREA);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -4163,21 +4161,21 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int
|
|||||||
WBUFW(buf,26)=skill_lv;
|
WBUFW(buf,26)=skill_lv;
|
||||||
WBUFW(buf,28)=div;
|
WBUFW(buf,28)=div;
|
||||||
WBUFB(buf,30)=type;
|
WBUFB(buf,30)=type;
|
||||||
clif_send(buf,packet_len(0x114),src,AREA);
|
if (disguised(dst)) {
|
||||||
|
clif_send(buf,packet_len(0x114),dst,AREA_WOS);
|
||||||
|
WBUFL(buf,8)=-dst->id;
|
||||||
|
clif_send(buf,packet_len(0x114),dst,SELF);
|
||||||
|
} else
|
||||||
|
clif_send(buf,packet_len(0x114),dst,AREA);
|
||||||
|
|
||||||
if(disguised(src)) {
|
if(disguised(src)) {
|
||||||
WBUFL(buf,4)=-src->id;
|
WBUFL(buf,4)=-src->id;
|
||||||
|
if (disguised(dst))
|
||||||
|
WBUFL(buf,8)=dst->id;
|
||||||
if(damage > 0)
|
if(damage > 0)
|
||||||
WBUFW(buf,24)=-1;
|
WBUFW(buf,24)=-1;
|
||||||
clif_send(buf,packet_len(0x114),src,SELF);
|
clif_send(buf,packet_len(0x114),src,SELF);
|
||||||
}
|
}
|
||||||
if (disguised(dst)) {
|
|
||||||
WBUFL(buf,8)=-dst->id;
|
|
||||||
if (disguised(src))
|
|
||||||
WBUFL(buf,4)=src->id;
|
|
||||||
else if(damage > 0)
|
|
||||||
WBUFW(buf,24)=-1;
|
|
||||||
clif_send(buf,packet_len(0x114),dst,SELF);
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
WBUFW(buf,0)=0x1de;
|
WBUFW(buf,0)=0x1de;
|
||||||
WBUFW(buf,2)=skill_id;
|
WBUFW(buf,2)=skill_id;
|
||||||
@ -4194,21 +4192,21 @@ int clif_skill_damage(struct block_list *src,struct block_list *dst,unsigned int
|
|||||||
WBUFW(buf,28)=skill_lv;
|
WBUFW(buf,28)=skill_lv;
|
||||||
WBUFW(buf,30)=div;
|
WBUFW(buf,30)=div;
|
||||||
WBUFB(buf,32)=type;
|
WBUFB(buf,32)=type;
|
||||||
clif_send(buf,packet_len(0x1de),src,AREA);
|
if (disguised(dst)) {
|
||||||
|
clif_send(buf,packet_len(0x1de),dst,AREA_WOS);
|
||||||
|
WBUFL(buf,8)=-dst->id;
|
||||||
|
clif_send(buf,packet_len(0x1de),dst,SELF);
|
||||||
|
} else
|
||||||
|
clif_send(buf,packet_len(0x1de),dst,AREA);
|
||||||
|
|
||||||
if(disguised(src)) {
|
if(disguised(src)) {
|
||||||
WBUFL(buf,4)=-src->id;
|
WBUFL(buf,4)=-src->id;
|
||||||
|
if (disguised(dst))
|
||||||
|
WBUFL(buf,8)=dst->id;
|
||||||
if(damage > 0)
|
if(damage > 0)
|
||||||
WBUFL(buf,24)=-1;
|
WBUFL(buf,24)=-1;
|
||||||
clif_send(buf,packet_len(0x1de),src,SELF);
|
clif_send(buf,packet_len(0x1de),src,SELF);
|
||||||
}
|
}
|
||||||
if (disguised(dst)) {
|
|
||||||
WBUFL(buf,8)=-dst->id;
|
|
||||||
if (disguised(src))
|
|
||||||
WBUFL(buf,4)=src->id;
|
|
||||||
else if(damage > 0)
|
|
||||||
WBUFL(buf,24)=-1;
|
|
||||||
clif_send(buf,packet_len(0x1de),dst,SELF);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Because the damage delay must be synced with the client, here is where the can-walk tick must be updated. [Skotlex]
|
//Because the damage delay must be synced with the client, here is where the can-walk tick must be updated. [Skotlex]
|
||||||
@ -4289,12 +4287,13 @@ int clif_skill_nodamage(struct block_list *src,struct block_list *dst,int skill_
|
|||||||
WBUFL(buf,6)=dst->id;
|
WBUFL(buf,6)=dst->id;
|
||||||
WBUFL(buf,10)=src?src->id:0;
|
WBUFL(buf,10)=src?src->id:0;
|
||||||
WBUFB(buf,14)=fail;
|
WBUFB(buf,14)=fail;
|
||||||
clif_send(buf,packet_len(0x11a),dst,AREA);
|
|
||||||
|
|
||||||
if (disguised(dst)) {
|
if (disguised(dst)) {
|
||||||
|
clif_send(buf,packet_len(0x11a),dst,AREA_WOS);
|
||||||
WBUFL(buf,6)=-dst->id;
|
WBUFL(buf,6)=-dst->id;
|
||||||
clif_send(buf,packet_len(0x11a),dst,SELF);
|
clif_send(buf,packet_len(0x11a),dst,SELF);
|
||||||
}
|
} else
|
||||||
|
clif_send(buf,packet_len(0x11a),dst,AREA);
|
||||||
|
|
||||||
if(src && disguised(src)) {
|
if(src && disguised(src)) {
|
||||||
WBUFL(buf,10)=-src->id;
|
WBUFL(buf,10)=-src->id;
|
||||||
@ -4322,11 +4321,12 @@ int clif_skill_poseffect(struct block_list *src,int skill_id,int val,int x,int y
|
|||||||
WBUFW(buf,10)=x;
|
WBUFW(buf,10)=x;
|
||||||
WBUFW(buf,12)=y;
|
WBUFW(buf,12)=y;
|
||||||
WBUFL(buf,14)=tick;
|
WBUFL(buf,14)=tick;
|
||||||
clif_send(buf,packet_len(0x117),src,AREA);
|
|
||||||
if(disguised(src)) {
|
if(disguised(src)) {
|
||||||
|
clif_send(buf,packet_len(0x117),src,AREA_WOS);
|
||||||
WBUFL(buf,4)=-src->id;
|
WBUFL(buf,4)=-src->id;
|
||||||
clif_send(buf,packet_len(0x117),src,SELF);
|
clif_send(buf,packet_len(0x117),src,SELF);
|
||||||
}
|
} else
|
||||||
|
clif_send(buf,packet_len(0x117),src,AREA);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user