From bc682624496b854607b8e1bd976bb317eb8b0d4f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 14 Dec 2018 01:20:44 +0300 Subject: Add inventory size field into db and using it in server. --- src/map/storage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/storage.c') 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 ) -- cgit v1.2.3-70-g09d2