diff options
author | Dastgir <dastgirpojee@rocketmail.com> | 2015-08-27 18:49:47 +0530 |
---|---|---|
committer | Dastgir <dastgirpojee@rocketmail.com> | 2015-08-27 18:49:47 +0530 |
commit | bcf51fa5a12d07fe80975bc921ccce3e4f6bf35d (patch) | |
tree | 9f6c1889b1a9a87098eea67d3e340f9736e18cc2 /src | |
parent | 12c8ae2541b654a09bd6a2f264856f6fc0089a23 (diff) | |
download | hercules-bcf51fa5a12d07fe80975bc921ccce3e4f6bf35d.tar.gz hercules-bcf51fa5a12d07fe80975bc921ccce3e4f6bf35d.tar.bz2 hercules-bcf51fa5a12d07fe80975bc921ccce3e4f6bf35d.tar.xz hercules-bcf51fa5a12d07fe80975bc921ccce3e4f6bf35d.zip |
Fixes Unidentified items bug in client >= 20150226
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 16 | ||||
-rw-r--r-- | src/map/packets_struct.h | 8 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index aae18283c..26cf4faac 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -3964,7 +3964,7 @@ void clif_updatestorageamount(struct map_session_data* sd, int amount, int max_a void clif_storageitemadded(struct map_session_data* sd, struct item* i, int index, int amount) { int view,fd; - short j = 0; + int offset = 0; nullpo_retv(sd); nullpo_retv(i); @@ -3979,14 +3979,14 @@ void clif_storageitemadded(struct map_session_data* sd, struct item* i, int inde WFIFOW(fd, 8) = ( view > 0 ) ? view : i->nameid; // id #if PACKETVER >= 5 WFIFOB(fd,10) = itemtype(itemdb_type(i->nameid)); //type - j += 1; + offset += 1; #endif - WFIFOB(fd,10+j) = i->identify; //identify flag - WFIFOB(fd,11+j) = i->attribute; // attribute - WFIFOB(fd,12+j) = i->refine; //refine - clif->addcards(WFIFOP(fd,13+j), i); + WFIFOB(fd,10+offset) = i->identify; //identify flag + WFIFOB(fd,11+offset) = i->attribute; // attribute + WFIFOB(fd,12+offset) = i->refine; //refine + clif->addcards(WFIFOP(fd,13+offset), i); #if PACKETVER >= 20150226 - clif->add_random_options(WFIFOP(fd,22), i); + clif->add_random_options(WFIFOP(fd,21+offset), i); #endif WFIFOSET(fd,packet_len(storageaddType)); } @@ -6007,7 +6007,7 @@ void clif_cart_additem(struct map_session_data *sd,int n,int amount,int fail) WBUFW(buf,8)=view; else WBUFW(buf,8)=sd->status.cart[n].nameid; -#if PACKETVER > 5 +#if PACKETVER >= 5 WBUFB(buf,10)=itemdb_type(sd->status.cart[n].nameid); offset = 1; #endif diff --git a/src/map/packets_struct.h b/src/map/packets_struct.h index bf3e006be..daf77c134 100644 --- a/src/map/packets_struct.h +++ b/src/map/packets_struct.h @@ -325,6 +325,10 @@ struct EQUIPITEM_INFO { #if PACKETVER >= 20100629 unsigned short wItemSpriteNumber; #endif +#if PACKETVER >= 20150226 + unsigned char option_count; + struct RndOptions option_data[5]; +#endif #if PACKETVER >= 20120925 struct { unsigned char IsIdentified : 1; @@ -333,10 +337,6 @@ struct EQUIPITEM_INFO { unsigned char SpareBits : 5; } Flag; #endif -#if PACKETVER >= 20150226 - unsigned char option_count; - struct RndOptions option_data[5]; -#endif } __attribute__((packed)); struct packet_authok { |