summaryrefslogtreecommitdiff
path: root/src/emap/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-01-23 21:38:21 +0300
committerAndrei Karas <akaras@inbox.ru>2019-01-23 21:38:21 +0300
commit3c0e3838f77a62a69130d7b2674e21e2133a7f83 (patch)
tree6f3ff1583e69e5ded625af59a78cbd5568acef51 /src/emap/pc.c
parent637fcbc9c0f4b042b38f9e900d08aee521305991 (diff)
downloadevol-hercules-3c0e3838f77a62a69130d7b2674e21e2133a7f83.tar.gz
evol-hercules-3c0e3838f77a62a69130d7b2674e21e2133a7f83.tar.bz2
evol-hercules-3c0e3838f77a62a69130d7b2674e21e2133a7f83.tar.xz
evol-hercules-3c0e3838f77a62a69130d7b2674e21e2133a7f83.zip
Update from herculess20190211
Diffstat (limited to 'src/emap/pc.c')
-rw-r--r--src/emap/pc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/emap/pc.c b/src/emap/pc.c
index cd8ef2f..9149e1e 100644
--- a/src/emap/pc.c
+++ b/src/emap/pc.c
@@ -286,7 +286,7 @@ int epc_isequip_post(int retVal,
if (!sd)
return 0;
- if (n < 0 || n >= MAX_INVENTORY)
+ if (n < 0 || n >= sd->status.inventorySize)
return 0;
struct ItemdExt *data = itemd_get(sd->inventory_data[n]);
@@ -322,7 +322,7 @@ int epc_useitem_post(int retVal,
if (!sd)
return retVal;
- if (n < 0 || n >= MAX_INVENTORY)
+ if (n < 0 || n >= sd->status.inventorySize)
return retVal;
struct ItemdExt *data = itemd_get(sd->inventory_data[n]);
@@ -343,7 +343,7 @@ static void equippost_effect(struct map_session_data *const sd,
if (!sd)
return;
- if (n < 0 || n >= MAX_INVENTORY)
+ if (n < 0 || n >= sd->status.inventorySize)
return;
struct ItemdExt *data = itemd_get(sd->inventory_data[n]);
@@ -526,7 +526,7 @@ int epc_dropitem_pre(struct map_session_data **sdPtr,
{
struct map_session_data *sd = *sdPtr;
const int n = *nPtr;
- if (!sd || n < 0 || n >= MAX_INVENTORY)
+ if (!sd || n < 0 || n >= sd->status.inventorySize)
{
tempN = 0;
tempId = 0;
@@ -612,9 +612,9 @@ int epc_insert_card_pre(struct map_session_data **sdPtr,
struct map_session_data *sd = *sdPtr;
if (!sd ||
*idx_equip < 0 ||
- *idx_equip >= MAX_INVENTORY ||
+ *idx_equip >= sd->status.inventorySize ||
*idx_card < 0 ||
- *idx_card >= MAX_INVENTORY)
+ *idx_card >= sd->status.inventorySize)
{
tempN = 0;
tempId = 0;