diff options
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index d79ca7319..5ce2a8394 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2603,10 +2603,11 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount) if (i >= MAX_INVENTORY){ i = pc_search_inventory(sd,0); if(i<0) return 4; + memcpy(&sd->status.inventory[i], item_data, sizeof(sd->status.inventory[0])); // clear equips field first, just in case if (item_data->equip) - item_data->equip = 0; - memcpy(&sd->status.inventory[i], item_data, sizeof(sd->status.inventory[0])); + sd->status.inventory[i].equip = 0; + sd->status.inventory[i].amount = amount; sd->inventory_data[i] = data; clif_additem(sd,i,amount,0); |