From 677598256feaad3bcef53805ad8c70e744a9b7d3 Mon Sep 17 00:00:00 2001 From: Kevin Date: Sun, 27 Apr 2008 07:18:21 +0000 Subject: Some major changes to @reloaditemdb to allow unloading of any item while map server is running. - Delete any item from inventory/cart/open storages that went missing during the reload. - Delete item from any shop that has this item. - Refresh item screen for anyone who has a shop open. - Delete mob db drop table references. - Delete item from storage during load if it isn't in the item db. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12661 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 29dfd1b30..7d268a0f5 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2965,11 +2965,12 @@ int pc_delitem(struct map_session_data *sd,int n,int amount,int type) { nullpo_retr(1, sd); - if(sd->status.inventory[n].nameid==0 || amount <= 0 || sd->status.inventory[n].amountinventory_data[n] == NULL) + if(sd->status.inventory[n].nameid==0 || amount <= 0 || sd->status.inventory[n].amountinventory_data[n] == NULL && ~type&4)) return 1; sd->status.inventory[n].amount -= amount; - sd->weight -= sd->inventory_data[n]->weight*amount ; + if(~type&4) + sd->weight -= sd->inventory_data[n]->weight*amount ; if(sd->status.inventory[n].amount<=0){ if(sd->status.inventory[n].equip) pc_unequipitem(sd,n,3); -- cgit v1.2.3-70-g09d2