summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-29 10:58:35 -0200
committershennetsind <ind@henn.et>2013-11-29 10:58:35 -0200
commit098dbcf672e04657553b9f1629550e6bc8771af3 (patch)
tree6dfe6dd587591249faf9d278c1da8d3c71d30a66 /src/map/itemdb.c
parent61b02a2b161deb19be4de8e627ebe0f4ffd9a238 (diff)
downloadhercules-098dbcf672e04657553b9f1629550e6bc8771af3.tar.gz
hercules-098dbcf672e04657553b9f1629550e6bc8771af3.tar.bz2
hercules-098dbcf672e04657553b9f1629550e6bc8771af3.tar.xz
hercules-098dbcf672e04657553b9f1629550e6bc8771af3.zip
Minor improvement
pc_checkitem is now triggered by @reloaditemdb to ensure modified conditions are respected, also a performance boost that causes the itemlist/cartlist/storagelist/gstoragelist lookups to only be triggered on demand instead of on every teleport. Closes #219 Fixed ancient monster ai bug that caused mobs to consider themselves elegible targets, which would waste status_check_skilluse and battle_check_target calls. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 9c3ff4138..dc4559483 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -2208,6 +2208,9 @@ void itemdb_reload(void) {
iter = mapit_geteachpc();
for( sd = (struct map_session_data*)mapit->first(iter); mapit->exists(iter); sd = (struct map_session_data*)mapit->next(iter) ) {
memset(sd->item_delay, 0, sizeof(sd->item_delay)); // reset item delays
+ if( battle_config.item_check )
+ sd->state.itemcheck = 1;
+ pc->checkitem(sd);
pc->setinventorydata(sd);
/* clear combo bonuses */
if( sd->combos.count ) {