diff options
Diffstat (limited to 'src/map/storage.c')
-rw-r--r-- | src/map/storage.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/map/storage.c b/src/map/storage.c index dd14acfda..a7aab8d79 100644 --- a/src/map/storage.c +++ b/src/map/storage.c @@ -154,7 +154,6 @@ static int storage_additem(struct map_session_data* sd, struct item* item_data, return 1; stor->items[i].amount += amount; clif_storageitemadded(sd,&stor->items[i],i,amount); - log_pick_pc(sd, LOG_TYPE_STORAGE, item_data->nameid, -amount, item_data); return 0; } } @@ -171,7 +170,6 @@ static int storage_additem(struct map_session_data* sd, struct item* item_data, stor->items[i].amount = amount; clif_storageitemadded(sd,&stor->items[i],i,amount); clif_updatestorageamount(sd,stor->storage_amount); - log_pick_pc(sd, LOG_TYPE_STORAGE, item_data->nameid, -amount, item_data); return 0; } @@ -185,9 +183,6 @@ int storage_delitem(struct map_session_data* sd, int n, int amount) return 1; sd->status.storage.items[n].amount -= amount; - - log_pick_pc(sd, LOG_TYPE_STORAGE, sd->status.storage.items[n].nameid, amount, &sd->status.storage.items[n]); - if( sd->status.storage.items[n].amount == 0 ) { memset(&sd->status.storage.items[n],0,sizeof(sd->status.storage.items[0])); @@ -218,7 +213,7 @@ int storage_storageadd(struct map_session_data* sd, int index, int amount) return 0; if( storage_additem(sd,&sd->status.inventory[index],amount) == 0 ) - pc_delitem(sd,index,amount,0,4); + pc_delitem(sd,index,amount,0,4,LOG_TYPE_STORAGE); return 1; } @@ -239,7 +234,7 @@ int storage_storageget(struct map_session_data* sd, int index, int amount) if( amount < 1 || amount > sd->status.storage.items[index].amount ) return 0; - if( (flag = pc_additem(sd,&sd->status.storage.items[index],amount)) == 0 ) + if( (flag = pc_additem(sd,&sd->status.storage.items[index],amount,LOG_TYPE_STORAGE)) == 0 ) storage_delitem(sd,index,amount); else clif_additem(sd,0,0,flag); @@ -267,7 +262,7 @@ int storage_storageaddfromcart(struct map_session_data* sd, int index, int amoun return 0; if( storage_additem(sd,&sd->status.cart[index],amount) == 0 ) - pc_cart_delitem(sd,index,amount,0); + pc_cart_delitem(sd,index,amount,0,LOG_TYPE_STORAGE); return 1; } @@ -288,7 +283,7 @@ int storage_storagegettocart(struct map_session_data* sd, int index, int amount) if( amount < 1 || amount > sd->status.storage.items[index].amount ) return 0; - if( pc_cart_additem(sd,&sd->status.storage.items[index],amount) == 0 ) + if( pc_cart_additem(sd,&sd->status.storage.items[index],amount,LOG_TYPE_STORAGE) == 0 ) storage_delitem(sd,index,amount); return 1; @@ -410,7 +405,6 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto stor->items[i].amount+=amount; clif_storageitemadded(sd,&stor->items[i],i,amount); stor->dirty = 1; - log_pick_pc(sd, LOG_TYPE_GSTORAGE, item_data->nameid, -amount, item_data); return 0; } } @@ -427,7 +421,6 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto clif_storageitemadded(sd,&stor->items[i],i,amount); clif_updateguildstorageamount(sd,stor->storage_amount); stor->dirty = 1; - log_pick_pc(sd, LOG_TYPE_GSTORAGE, item_data->nameid, -amount, item_data); return 0; } @@ -440,7 +433,6 @@ int guild_storage_delitem(struct map_session_data* sd, struct guild_storage* sto return 1; stor->items[n].amount-=amount; - log_pick_pc(sd, LOG_TYPE_GSTORAGE, stor->items[n].nameid, amount, &stor->items[n]); if(stor->items[n].amount==0){ memset(&stor->items[n],0,sizeof(stor->items[0])); stor->storage_amount--; @@ -470,9 +462,8 @@ int storage_guild_storageadd(struct map_session_data* sd, int index, int amount) if( amount < 1 || amount > sd->status.inventory[index].amount ) return 0; -// log_tostorage(sd, index, 1); if(guild_storage_additem(sd,stor,&sd->status.inventory[index],amount)==0) - pc_delitem(sd,index,amount,0,4); + pc_delitem(sd,index,amount,0,4,LOG_TYPE_GSTORAGE); return 1; } @@ -497,7 +488,7 @@ int storage_guild_storageget(struct map_session_data* sd, int index, int amount) if(amount < 1 || amount > stor->items[index].amount) return 0; - if((flag = pc_additem(sd,&stor->items[index],amount)) == 0) + if((flag = pc_additem(sd,&stor->items[index],amount,LOG_TYPE_GSTORAGE)) == 0) guild_storage_delitem(sd,stor,index,amount); else clif_additem(sd,0,0,flag); @@ -526,7 +517,7 @@ int storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int return 0; if(guild_storage_additem(sd,stor,&sd->status.cart[index],amount)==0) - pc_cart_delitem(sd,index,amount,0); + pc_cart_delitem(sd,index,amount,0,LOG_TYPE_GSTORAGE); return 1; } @@ -550,7 +541,7 @@ int storage_guild_storagegettocart(struct map_session_data* sd, int index, int a if(amount < 1 || amount > stor->items[index].amount) return 0; - if(pc_cart_additem(sd,&stor->items[index],amount)==0) + if(pc_cart_additem(sd,&stor->items[index],amount,LOG_TYPE_GSTORAGE)==0) guild_storage_delitem(sd,stor,index,amount); return 1; |