- Likely fixed clif_set_disguise for PACKET_VER 9
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11864 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
43ac1fd8ad
commit
e231f6cb18
@ -984,31 +984,38 @@ static int clif_set_unit_spawned(struct block_list* bl, unsigned char* buf)
|
|||||||
//Modifies the buffer for disguise characters and sends it to self.
|
//Modifies the buffer for disguise characters and sends it to self.
|
||||||
//Flag = 0: change id to negative, buf will have disguise data.
|
//Flag = 0: change id to negative, buf will have disguise data.
|
||||||
//Flag = 1: change id to positive, class and option to make your own char invisible.
|
//Flag = 1: change id to positive, class and option to make your own char invisible.
|
||||||
//Luckily, the offsets that need to be changed are the same in packets 0x78, 0x7b, 0x1d8 and 0x1da
|
|
||||||
//But no longer holds true for those packet of PACKETVER 7.
|
|
||||||
static void clif_setdisguise(struct map_session_data *sd, unsigned char *buf,int len, int flag)
|
static void clif_setdisguise(struct map_session_data *sd, unsigned char *buf,int len, int flag)
|
||||||
{
|
{
|
||||||
if (flag) {
|
if (!flag) {
|
||||||
|
WBUFL(buf,2)=-sd->bl.id;
|
||||||
|
clif_send(buf, len, &sd->bl, SELF);
|
||||||
|
return;
|
||||||
|
}
|
||||||
WBUFL(buf,2)=sd->bl.id;
|
WBUFL(buf,2)=sd->bl.id;
|
||||||
#if PACKETVER >= 7
|
|
||||||
switch (WBUFW(buf,0)) {
|
switch (WBUFW(buf,0)) {
|
||||||
case 0x22c:
|
case 0x22c:
|
||||||
|
#if PACKETVER >= 9
|
||||||
|
WBUFL(buf,13)=OPTION_INVISIBLE;
|
||||||
|
WBUFW(buf,17)=sd->status.class_;
|
||||||
|
break;
|
||||||
|
case 0x78:
|
||||||
|
case 0x7c:
|
||||||
|
WBUFW(buf,13)=OPTION_INVISIBLE;
|
||||||
|
WBUFW(buf,15)=sd->status.class_;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#if PACKETVER >= 7
|
||||||
case 0x22b:
|
case 0x22b:
|
||||||
case 0x22a:
|
case 0x22a:
|
||||||
WBUFL(buf,12)=OPTION_INVISIBLE;
|
WBUFL(buf,12)=OPTION_INVISIBLE;
|
||||||
WBUFW(buf,16)=sd->status.class_;
|
WBUFW(buf,16)=sd->status.class_;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
#endif
|
#endif
|
||||||
|
default: //0x78, 0x7b, 0x1d8 and 0x1da
|
||||||
WBUFW(buf,12)=OPTION_INVISIBLE;
|
WBUFW(buf,12)=OPTION_INVISIBLE;
|
||||||
WBUFW(buf,14)=sd->status.class_;
|
WBUFW(buf,14)=sd->status.class_;
|
||||||
#if PACKETVER >= 7
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} else {
|
|
||||||
WBUFL(buf,2)=-sd->bl.id;
|
|
||||||
}
|
|
||||||
clif_send(buf, len, &sd->bl, SELF);
|
clif_send(buf, len, &sd->bl, SELF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user