diff options
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 208 |
1 files changed, 104 insertions, 104 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 03622cfe3..9e649df40 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -2084,9 +2084,9 @@ int clif_storageitemlist(struct map_session_data *sd,struct storage *stor) #if PACKETVER < 5 WBUFW(buf,0)=0xa5; for(i=0,n=0;i<MAX_STORAGE;i++){ - if(stor->storage[i].nameid<=0) + if(stor->storage_[i].nameid<=0) continue; - nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid)); + nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid)); if(itemdb_isequip2(id)) continue; @@ -2094,10 +2094,10 @@ int clif_storageitemlist(struct map_session_data *sd,struct storage *stor) if(id->view_id > 0) WBUFW(buf,n*10+6)=id->view_id; else - WBUFW(buf,n*10+6)=stor->storage[i].nameid; + WBUFW(buf,n*10+6)=stor->storage_[i].nameid; WBUFB(buf,n*10+8)=id->type;; - WBUFB(buf,n*10+9)=stor->storage[i].identify; - WBUFW(buf,n*10+10)=stor->storage[i].amount; + WBUFB(buf,n*10+9)=stor->storage_[i].identify; + WBUFW(buf,n*10+10)=stor->storage_[i].amount; WBUFW(buf,n*10+12)=0; n++; } @@ -2108,9 +2108,9 @@ int clif_storageitemlist(struct map_session_data *sd,struct storage *stor) #else WBUFW(buf,0)=0x1f0; for(i=0,n=0;i<MAX_STORAGE;i++){ - if(stor->storage[i].nameid<=0) + if(stor->storage_[i].nameid<=0) continue; - nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid)); + nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid)); if(itemdb_isequip2(id)) continue; @@ -2118,15 +2118,15 @@ int clif_storageitemlist(struct map_session_data *sd,struct storage *stor) if(id->view_id > 0) WBUFW(buf,n*18+6)=id->view_id; else - WBUFW(buf,n*18+6)=stor->storage[i].nameid; + WBUFW(buf,n*18+6)=stor->storage_[i].nameid; WBUFB(buf,n*18+8)=id->type;; - WBUFB(buf,n*18+9)=stor->storage[i].identify; - WBUFW(buf,n*18+10)=stor->storage[i].amount; + WBUFB(buf,n*18+9)=stor->storage_[i].identify; + WBUFW(buf,n*18+10)=stor->storage_[i].amount; WBUFW(buf,n*18+12)=0; - WBUFW(buf,n*18+14)=stor->storage[i].card[0]; - WBUFW(buf,n*18+16)=stor->storage[i].card[1]; - WBUFW(buf,n*18+18)=stor->storage[i].card[2]; - WBUFW(buf,n*18+20)=stor->storage[i].card[3]; + WBUFW(buf,n*18+14)=stor->storage_[i].card[0]; + WBUFW(buf,n*18+16)=stor->storage_[i].card[1]; + WBUFW(buf,n*18+18)=stor->storage_[i].card[2]; + WBUFW(buf,n*18+20)=stor->storage_[i].card[3]; n++; } if(n){ @@ -2154,44 +2154,44 @@ int clif_storageequiplist(struct map_session_data *sd,struct storage *stor) buf = WFIFOP(fd,0); WBUFW(buf,0)=0xa6; for(i=0,n=0;i<MAX_STORAGE;i++){ - if(stor->storage[i].nameid<=0) + if(stor->storage_[i].nameid<=0) continue; - nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid)); + nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid)); if(!itemdb_isequip2(id)) continue; WBUFW(buf,n*20+4)=i+1; if(id->view_id > 0) WBUFW(buf,n*20+6)=id->view_id; else - WBUFW(buf,n*20+6)=stor->storage[i].nameid; + WBUFW(buf,n*20+6)=stor->storage_[i].nameid; WBUFB(buf,n*20+8)=id->type; - WBUFB(buf,n*20+9)=stor->storage[i].identify; + WBUFB(buf,n*20+9)=stor->storage_[i].identify; WBUFW(buf,n*20+10)=id->equip; - WBUFW(buf,n*20+12)=stor->storage[i].equip; - WBUFB(buf,n*20+14)=stor->storage[i].attribute; - WBUFB(buf,n*20+15)=stor->storage[i].refine; - if(stor->storage[i].card[0]==0x00ff || stor->storage[i].card[0]==0x00fe || stor->storage[i].card[0]==(short)0xff00) { - WBUFW(buf,n*20+16)=stor->storage[i].card[0]; - WBUFW(buf,n*20+18)=stor->storage[i].card[1]; - WBUFW(buf,n*20+20)=stor->storage[i].card[2]; - WBUFW(buf,n*20+22)=stor->storage[i].card[3]; + WBUFW(buf,n*20+12)=stor->storage_[i].equip; + WBUFB(buf,n*20+14)=stor->storage_[i].attribute; + WBUFB(buf,n*20+15)=stor->storage_[i].refine; + if(stor->storage_[i].card[0]==0x00ff || stor->storage_[i].card[0]==0x00fe || stor->storage_[i].card[0]==(short)0xff00) { + WBUFW(buf,n*20+16)=stor->storage_[i].card[0]; + WBUFW(buf,n*20+18)=stor->storage_[i].card[1]; + WBUFW(buf,n*20+20)=stor->storage_[i].card[2]; + WBUFW(buf,n*20+22)=stor->storage_[i].card[3]; } else { - if(stor->storage[i].card[0] > 0 && (j=itemdb_viewid(stor->storage[i].card[0])) > 0) + if(stor->storage_[i].card[0] > 0 && (j=itemdb_viewid(stor->storage_[i].card[0])) > 0) WBUFW(buf,n*20+16)=j; else - WBUFW(buf,n*20+16)=stor->storage[i].card[0]; - if(stor->storage[i].card[1] > 0 && (j=itemdb_viewid(stor->storage[i].card[1])) > 0) + WBUFW(buf,n*20+16)=stor->storage_[i].card[0]; + if(stor->storage_[i].card[1] > 0 && (j=itemdb_viewid(stor->storage_[i].card[1])) > 0) WBUFW(buf,n*20+18)=j; else - WBUFW(buf,n*20+18)=stor->storage[i].card[1]; - if(stor->storage[i].card[2] > 0 && (j=itemdb_viewid(stor->storage[i].card[2])) > 0) + WBUFW(buf,n*20+18)=stor->storage_[i].card[1]; + if(stor->storage_[i].card[2] > 0 && (j=itemdb_viewid(stor->storage_[i].card[2])) > 0) WBUFW(buf,n*20+20)=j; else - WBUFW(buf,n*20+20)=stor->storage[i].card[2]; - if(stor->storage[i].card[3] > 0 && (j=itemdb_viewid(stor->storage[i].card[3])) > 0) + WBUFW(buf,n*20+20)=stor->storage_[i].card[2]; + if(stor->storage_[i].card[3] > 0 && (j=itemdb_viewid(stor->storage_[i].card[3])) > 0) WBUFW(buf,n*20+22)=j; else - WBUFW(buf,n*20+22)=stor->storage[i].card[3]; + WBUFW(buf,n*20+22)=stor->storage_[i].card[3]; } n++; } @@ -2221,9 +2221,9 @@ int clif_guildstorageitemlist(struct map_session_data *sd,struct guild_storage * #if PACKETVER < 5 WBUFW(buf,0)=0xa5; for(i=0,n=0;i<MAX_GUILD_STORAGE;i++){ - if(stor->storage[i].nameid<=0) + if(stor->storage_[i].nameid<=0) continue; - nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid)); + nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid)); if(itemdb_isequip2(id)) continue; @@ -2231,10 +2231,10 @@ int clif_guildstorageitemlist(struct map_session_data *sd,struct guild_storage * if(id->view_id > 0) WBUFW(buf,n*10+6)=id->view_id; else - WBUFW(buf,n*10+6)=stor->storage[i].nameid; + WBUFW(buf,n*10+6)=stor->storage_[i].nameid; WBUFB(buf,n*10+8)=id->type;; - WBUFB(buf,n*10+9)=stor->storage[i].identify; - WBUFW(buf,n*10+10)=stor->storage[i].amount; + WBUFB(buf,n*10+9)=stor->storage_[i].identify; + WBUFW(buf,n*10+10)=stor->storage_[i].amount; WBUFW(buf,n*10+12)=0; n++; } @@ -2245,9 +2245,9 @@ int clif_guildstorageitemlist(struct map_session_data *sd,struct guild_storage * #else WBUFW(buf,0)=0x1f0; for(i=0,n=0;i<MAX_GUILD_STORAGE;i++){ - if(stor->storage[i].nameid<=0) + if(stor->storage_[i].nameid<=0) continue; - nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid)); + nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid)); if(itemdb_isequip2(id)) continue; @@ -2255,15 +2255,15 @@ int clif_guildstorageitemlist(struct map_session_data *sd,struct guild_storage * if(id->view_id > 0) WBUFW(buf,n*18+6)=id->view_id; else - WBUFW(buf,n*18+6)=stor->storage[i].nameid; + WBUFW(buf,n*18+6)=stor->storage_[i].nameid; WBUFB(buf,n*18+8)=id->type;; - WBUFB(buf,n*18+9)=stor->storage[i].identify; - WBUFW(buf,n*18+10)=stor->storage[i].amount; + WBUFB(buf,n*18+9)=stor->storage_[i].identify; + WBUFW(buf,n*18+10)=stor->storage_[i].amount; WBUFW(buf,n*18+12)=0; - WBUFW(buf,n*18+14)=stor->storage[i].card[0]; - WBUFW(buf,n*18+16)=stor->storage[i].card[1]; - WBUFW(buf,n*18+18)=stor->storage[i].card[2]; - WBUFW(buf,n*18+20)=stor->storage[i].card[3]; + WBUFW(buf,n*18+14)=stor->storage_[i].card[0]; + WBUFW(buf,n*18+16)=stor->storage_[i].card[1]; + WBUFW(buf,n*18+18)=stor->storage_[i].card[2]; + WBUFW(buf,n*18+20)=stor->storage_[i].card[3]; n++; } if(n){ @@ -2291,44 +2291,44 @@ int clif_guildstorageequiplist(struct map_session_data *sd,struct guild_storage WBUFW(buf,0)=0xa6; for(i=0,n=0;i<MAX_GUILD_STORAGE;i++){ - if(stor->storage[i].nameid<=0) + if(stor->storage_[i].nameid<=0) continue; - nullpo_retr(0, id = itemdb_search(stor->storage[i].nameid)); + nullpo_retr(0, id = itemdb_search(stor->storage_[i].nameid)); if(!itemdb_isequip2(id)) continue; WBUFW(buf,n*20+4)=i+1; if(id->view_id > 0) WBUFW(buf,n*20+6)=id->view_id; else - WBUFW(buf,n*20+6)=stor->storage[i].nameid; + WBUFW(buf,n*20+6)=stor->storage_[i].nameid; WBUFB(buf,n*20+8)=id->type; - WBUFB(buf,n*20+9)=stor->storage[i].identify; + WBUFB(buf,n*20+9)=stor->storage_[i].identify; WBUFW(buf,n*20+10)=id->equip; - WBUFW(buf,n*20+12)=stor->storage[i].equip; - WBUFB(buf,n*20+14)=stor->storage[i].attribute; - WBUFB(buf,n*20+15)=stor->storage[i].refine; - if(stor->storage[i].card[0]==0x00ff || stor->storage[i].card[0]==0x00fe || stor->storage[i].card[0]==(short)0xff00) { - WBUFW(buf,n*20+16)=stor->storage[i].card[0]; - WBUFW(buf,n*20+18)=stor->storage[i].card[1]; - WBUFW(buf,n*20+20)=stor->storage[i].card[2]; - WBUFW(buf,n*20+22)=stor->storage[i].card[3]; + WBUFW(buf,n*20+12)=stor->storage_[i].equip; + WBUFB(buf,n*20+14)=stor->storage_[i].attribute; + WBUFB(buf,n*20+15)=stor->storage_[i].refine; + if(stor->storage_[i].card[0]==0x00ff || stor->storage_[i].card[0]==0x00fe || stor->storage_[i].card[0]==(short)0xff00) { + WBUFW(buf,n*20+16)=stor->storage_[i].card[0]; + WBUFW(buf,n*20+18)=stor->storage_[i].card[1]; + WBUFW(buf,n*20+20)=stor->storage_[i].card[2]; + WBUFW(buf,n*20+22)=stor->storage_[i].card[3]; } else { - if(stor->storage[i].card[0] > 0 && (j=itemdb_viewid(stor->storage[i].card[0])) > 0) + if(stor->storage_[i].card[0] > 0 && (j=itemdb_viewid(stor->storage_[i].card[0])) > 0) WBUFW(buf,n*20+16)=j; else - WBUFW(buf,n*20+16)=stor->storage[i].card[0]; - if(stor->storage[i].card[1] > 0 && (j=itemdb_viewid(stor->storage[i].card[1])) > 0) + WBUFW(buf,n*20+16)=stor->storage_[i].card[0]; + if(stor->storage_[i].card[1] > 0 && (j=itemdb_viewid(stor->storage_[i].card[1])) > 0) WBUFW(buf,n*20+18)=j; else - WBUFW(buf,n*20+18)=stor->storage[i].card[1]; - if(stor->storage[i].card[2] > 0 && (j=itemdb_viewid(stor->storage[i].card[2])) > 0) + WBUFW(buf,n*20+18)=stor->storage_[i].card[1]; + if(stor->storage_[i].card[2] > 0 && (j=itemdb_viewid(stor->storage_[i].card[2])) > 0) WBUFW(buf,n*20+20)=j; else - WBUFW(buf,n*20+20)=stor->storage[i].card[2]; - if(stor->storage[i].card[3] > 0 && (j=itemdb_viewid(stor->storage[i].card[3])) > 0) + WBUFW(buf,n*20+20)=stor->storage_[i].card[2]; + if(stor->storage_[i].card[3] > 0 && (j=itemdb_viewid(stor->storage_[i].card[3])) > 0) WBUFW(buf,n*20+22)=j; else - WBUFW(buf,n*20+22)=stor->storage[i].card[3]; + WBUFW(buf,n*20+22)=stor->storage_[i].card[3]; } n++; } @@ -3372,35 +3372,35 @@ int clif_storageitemadded(struct map_session_data *sd,struct storage *stor,int i WFIFOW(fd,0) =0xf4; // Storage item added WFIFOW(fd,2) =index+1; // index WFIFOL(fd,4) =amount; // amount - if((view = itemdb_viewid(stor->storage[index].nameid)) > 0) + if((view = itemdb_viewid(stor->storage_[index].nameid)) > 0) WFIFOW(fd,8) =view; else - WFIFOW(fd,8) =stor->storage[index].nameid; // id - WFIFOB(fd,10)=stor->storage[index].identify; //identify flag - WFIFOB(fd,11)=stor->storage[index].attribute; // attribute - WFIFOB(fd,12)=stor->storage[index].refine; //refine - if(stor->storage[index].card[0]==0x00ff || stor->storage[index].card[0]==0x00fe || stor->storage[index].card[0]==(short)0xff00) { - WFIFOW(fd,13)=stor->storage[index].card[0]; //card (4w) - WFIFOW(fd,15)=stor->storage[index].card[1]; //card (4w) - WFIFOW(fd,17)=stor->storage[index].card[2]; //card (4w) - WFIFOW(fd,19)=stor->storage[index].card[3]; //card (4w) + WFIFOW(fd,8) =stor->storage_[index].nameid; // id + WFIFOB(fd,10)=stor->storage_[index].identify; //identify flag + WFIFOB(fd,11)=stor->storage_[index].attribute; // attribute + WFIFOB(fd,12)=stor->storage_[index].refine; //refine + if(stor->storage_[index].card[0]==0x00ff || stor->storage_[index].card[0]==0x00fe || stor->storage_[index].card[0]==(short)0xff00) { + WFIFOW(fd,13)=stor->storage_[index].card[0]; //card (4w) + WFIFOW(fd,15)=stor->storage_[index].card[1]; //card (4w) + WFIFOW(fd,17)=stor->storage_[index].card[2]; //card (4w) + WFIFOW(fd,19)=stor->storage_[index].card[3]; //card (4w) } else { - if(stor->storage[index].card[0] > 0 && (j=itemdb_viewid(stor->storage[index].card[0])) > 0) + if(stor->storage_[index].card[0] > 0 && (j=itemdb_viewid(stor->storage_[index].card[0])) > 0) WFIFOW(fd,13)= j; else - WFIFOW(fd,13)= stor->storage[index].card[0]; - if(stor->storage[index].card[1] > 0 && (j=itemdb_viewid(stor->storage[index].card[1])) > 0) + WFIFOW(fd,13)= stor->storage_[index].card[0]; + if(stor->storage_[index].card[1] > 0 && (j=itemdb_viewid(stor->storage_[index].card[1])) > 0) WFIFOW(fd,15)= j; else - WFIFOW(fd,15)= stor->storage[index].card[1]; - if(stor->storage[index].card[2] > 0 && (j=itemdb_viewid(stor->storage[index].card[2])) > 0) + WFIFOW(fd,15)= stor->storage_[index].card[1]; + if(stor->storage_[index].card[2] > 0 && (j=itemdb_viewid(stor->storage_[index].card[2])) > 0) WFIFOW(fd,17)= j; else - WFIFOW(fd,17)= stor->storage[index].card[2]; - if(stor->storage[index].card[3] > 0 && (j=itemdb_viewid(stor->storage[index].card[3])) > 0) + WFIFOW(fd,17)= stor->storage_[index].card[2]; + if(stor->storage_[index].card[3] > 0 && (j=itemdb_viewid(stor->storage_[index].card[3])) > 0) WFIFOW(fd,19)= j; else - WFIFOW(fd,19)= stor->storage[index].card[3]; + WFIFOW(fd,19)= stor->storage_[index].card[3]; } WFIFOSET(fd,packet_len_table[0xf4]); @@ -3442,35 +3442,35 @@ int clif_guildstorageitemadded(struct map_session_data *sd,struct guild_storage WFIFOW(fd,0) =0xf4; // Storage item added WFIFOW(fd,2) =index+1; // index WFIFOL(fd,4) =amount; // amount - if((view = itemdb_viewid(stor->storage[index].nameid)) > 0) + if((view = itemdb_viewid(stor->storage_[index].nameid)) > 0) WFIFOW(fd,8) =view; else - WFIFOW(fd,8) =stor->storage[index].nameid; // id - WFIFOB(fd,10)=stor->storage[index].identify; //identify flag - WFIFOB(fd,11)=stor->storage[index].attribute; // attribute - WFIFOB(fd,12)=stor->storage[index].refine; //refine - if(stor->storage[index].card[0]==0x00ff || stor->storage[index].card[0]==0x00fe || stor->storage[index].card[0]==(short)0xff00) { - WFIFOW(fd,13)=stor->storage[index].card[0]; //card (4w) - WFIFOW(fd,15)=stor->storage[index].card[1]; //card (4w) - WFIFOW(fd,17)=stor->storage[index].card[2]; //card (4w) - WFIFOW(fd,19)=stor->storage[index].card[3]; //card (4w) + WFIFOW(fd,8) =stor->storage_[index].nameid; // id + WFIFOB(fd,10)=stor->storage_[index].identify; //identify flag + WFIFOB(fd,11)=stor->storage_[index].attribute; // attribute + WFIFOB(fd,12)=stor->storage_[index].refine; //refine + if(stor->storage_[index].card[0]==0x00ff || stor->storage_[index].card[0]==0x00fe || stor->storage_[index].card[0]==(short)0xff00) { + WFIFOW(fd,13)=stor->storage_[index].card[0]; //card (4w) + WFIFOW(fd,15)=stor->storage_[index].card[1]; //card (4w) + WFIFOW(fd,17)=stor->storage_[index].card[2]; //card (4w) + WFIFOW(fd,19)=stor->storage_[index].card[3]; //card (4w) } else { - if(stor->storage[index].card[0] > 0 && (j=itemdb_viewid(stor->storage[index].card[0])) > 0) + if(stor->storage_[index].card[0] > 0 && (j=itemdb_viewid(stor->storage_[index].card[0])) > 0) WFIFOW(fd,13)= j; else - WFIFOW(fd,13)= stor->storage[index].card[0]; - if(stor->storage[index].card[1] > 0 && (j=itemdb_viewid(stor->storage[index].card[1])) > 0) + WFIFOW(fd,13)= stor->storage_[index].card[0]; + if(stor->storage_[index].card[1] > 0 && (j=itemdb_viewid(stor->storage_[index].card[1])) > 0) WFIFOW(fd,15)= j; else - WFIFOW(fd,15)= stor->storage[index].card[1]; - if(stor->storage[index].card[2] > 0 && (j=itemdb_viewid(stor->storage[index].card[2])) > 0) + WFIFOW(fd,15)= stor->storage_[index].card[1]; + if(stor->storage_[index].card[2] > 0 && (j=itemdb_viewid(stor->storage_[index].card[2])) > 0) WFIFOW(fd,17)= j; else - WFIFOW(fd,17)= stor->storage[index].card[2]; - if(stor->storage[index].card[3] > 0 && (j=itemdb_viewid(stor->storage[index].card[3])) > 0) + WFIFOW(fd,17)= stor->storage_[index].card[2]; + if(stor->storage_[index].card[3] > 0 && (j=itemdb_viewid(stor->storage_[index].card[3])) > 0) WFIFOW(fd,19)= j; else - WFIFOW(fd,19)= stor->storage[index].card[3]; + WFIFOW(fd,19)= stor->storage_[index].card[3]; } WFIFOSET(fd,packet_len_table[0xf4]); |