summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/clif.c16
-rw-r--r--src/map/packets_struct.h8
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 {