summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-02 21:13:09 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-02 21:13:09 +0300
commit3a0767592d15288849ad16b6dcd9171af821af33 (patch)
treeb3e1d9f85d05628dd81c10e9692a95674ba2725a /src/map/pc.c
parent373c174b60944567677a9df8d16d845ea0c5ec10 (diff)
downloadevol-hercules-3a0767592d15288849ad16b6dcd9171af821af33.tar.gz
evol-hercules-3a0767592d15288849ad16b6dcd9171af821af33.tar.bz2
evol-hercules-3a0767592d15288849ad16b6dcd9171af821af33.tar.xz
evol-hercules-3a0767592d15288849ad16b6dcd9171af821af33.zip
map: add post hook for checking is possible equip item.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 594b1c0..a914653 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -187,3 +187,17 @@ void epc_validate_levels(void)
}
hookStop();
}
+
+int epc_isequip_post(int retVal, struct map_session_data *sd, int *nPtr)
+{
+ const int n = *nPtr;
+ if (retVal)
+ {
+ if (!sd)
+ return 0;
+
+ if (n < 0 || n >= MAX_INVENTORY)
+ return 0;
+ }
+ return retVal;
+}