summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-12-14 01:20:44 +0300
committerAndrei Karas <akaras@inbox.ru>2018-12-14 23:52:47 +0300
commitbc682624496b854607b8e1bd976bb317eb8b0d4f (patch)
tree57cb030d5c5d0f2865c05ea641041634f7855258 /src/map/status.c
parent1a26402c3bd986d0bba0435bfbd62e32abf07302 (diff)
downloadhercules-bc682624496b854607b8e1bd976bb317eb8b0d4f.tar.gz
hercules-bc682624496b854607b8e1bd976bb317eb8b0d4f.tar.bz2
hercules-bc682624496b854607b8e1bd976bb317eb8b0d4f.tar.xz
hercules-bc682624496b854607b8e1bd976bb317eb8b0d4f.zip
Add inventory size field into db and using it in server.
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 75744c59b..65b52cbcf 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2446,7 +2446,7 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o
sd->regen.sregen = &sd->sregen;
sd->regen.ssregen = &sd->ssregen;
sd->weight=0;
- for(i=0;i<MAX_INVENTORY;i++){
+ for (i = 0; i < sd->status.inventorySize; i++) {
if(sd->status.inventory[i].nameid==0 || sd->inventory_data[i] == NULL)
continue;
sd->weight += sd->inventory_data[i]->weight*sd->status.inventory[i].amount;