summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2015-08-27 18:49:47 +0530
committerDastgir <dastgirpojee@rocketmail.com>2015-08-27 18:49:47 +0530
commitbcf51fa5a12d07fe80975bc921ccce3e4f6bf35d (patch)
tree9f6c1889b1a9a87098eea67d3e340f9736e18cc2 /src/map/clif.c
parent12c8ae2541b654a09bd6a2f264856f6fc0089a23 (diff)
downloadhercules-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/map/clif.c')
-rw-r--r--src/map/clif.c16
1 files changed, 8 insertions, 8 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