summaryrefslogtreecommitdiff
path: root/src/map/storage.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/storage.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/storage.c')
-rw-r--r--src/map/storage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/storage.c b/src/map/storage.c
index a6f0715e7..90b620f63 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -285,7 +285,7 @@ static int storage_add_from_inventory(struct map_session_data *sd, int index, in
if (sd->storage.aggregate > MAX_STORAGE)
return 0; // storage full
- if (index < 0 || index >= MAX_INVENTORY)
+ if (index < 0 || index >= sd->status.inventorySize)
return 0;
if (sd->status.inventory[index].nameid <= 0)
@@ -623,7 +623,7 @@ static int storage_guild_storageadd(struct map_session_data *sd, int index, int
if( !stor->storage_status || stor->storage_amount > MAX_GUILD_STORAGE )
return 0;
- if( index<0 || index>=MAX_INVENTORY )
+ if (index < 0 || index >= sd->status.inventorySize)
return 0;
if( sd->status.inventory[index].nameid <= 0 )