Index: src/map/clif.c =================================================================== --- src/map/clif.c (revision 17304) +++ src/map/clif.c (working copy) @@ -2414,6 +2414,7 @@ void clif_storagelist(struct map_session_data* sd, struct item* items, int items_length) { + static const int client_buf = 0x5000; struct item_data *id; int i,n,ne; unsigned char *buf; @@ -2465,27 +2466,33 @@ n++; } } - if( n ) + for (i = 0; i < n;) { + int nn = n - i < (client_buf - 4)/s ? n - i : (client_buf - 4)/s; + unsigned char *p = buf + i*s; + i += nn; #if PACKETVER < 5 - WBUFW(buf,0)=0xa5; + WBUFW(p,0)=0xa5; #elif PACKETVER < 20080102 - WBUFW(buf,0)=0x1f0; + WBUFW(p,0)=0x1f0; #else - WBUFW(buf,0)=0x2ea; + WBUFW(p,0)=0x2ea; #endif - WBUFW(buf,2)=4+n*s; - clif_send(buf, WBUFW(buf,2), &sd->bl, SELF); + WBUFW(p,2)=4+nn*s; + clif_send(p, WBUFW(p,2), &sd->bl, SELF); } - if( ne ) + for (i = 0; i < ne;) { + int nn = ne - i < (client_buf - 4)/cmd ? ne - i : (client_buf - 4)/cmd; + unsigned char *p = bufe + i*cmd; + i += nn; #if PACKETVER < 20071002 - WBUFW(bufe,0)=0xa6; + WBUFW(p,0)=0xa6; #else - WBUFW(bufe,0)=0x2d1; + WBUFW(p,0)=0x2d1; #endif - WBUFW(bufe,2)=4+ne*cmd; - clif_send(bufe, WBUFW(bufe,2), &sd->bl, SELF); + WBUFW(p,2)=4+nn*cmd; + clif_send(p, WBUFW(p,2), &sd->bl, SELF); } if( buf ) aFree(buf); @@ -14068,7 +14075,7 @@ return; } - if( (item = itemdb_exists(sd->status.inventory[idx].nameid)) != NULL && !(item->type == IT_ARMOR || item->type == IT_PETARMOR || item->type == IT_WEAPON || item->type == IT_CARD || item->type == IT_ETC) ) + if( (item = itemdb_exists(sd->status.inventory[idx].nameid)) != NULL && itemdb_available(sd->status.inventory[idx].nameid) && !(item->type == IT_ARMOR || item->type == IT_PETARMOR || item->type == IT_WEAPON || item->type == IT_CARD || item->type == IT_ETC) ) { // Consumable or pets are not allowed clif_Auction_setitem(sd->fd, idx, true); return;