summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-07-01 17:16:53 -0300
committershennetsind <ind@henn.et>2013-07-01 17:16:53 -0300
commit0b2fc3888b9d09b397a829db4af3f8d35cdaabb9 (patch)
tree9aa5aeeccd8dfef6b31a7a77a6c832c367e01264
parent24f437d119d2cd34dea33201b0baff919661f984 (diff)
downloadhercules-0b2fc3888b9d09b397a829db4af3f8d35cdaabb9.tar.gz
hercules-0b2fc3888b9d09b397a829db4af3f8d35cdaabb9.tar.bz2
hercules-0b2fc3888b9d09b397a829db4af3f8d35cdaabb9.tar.xz
hercules-0b2fc3888b9d09b397a829db4af3f8d35cdaabb9.zip
Fixed a dysfunctional piece of code in @reloadscript
Special Thanks to mleo1 for providing the debug info. Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--src/map/npc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index a71bc36ca..33d0c48f1 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3783,8 +3783,7 @@ int npc_reload(void) {
}
mapit->free(iter);
- if(battle_config.dynamic_mobs)
- {// dynamic check by [random]
+ if(battle_config.dynamic_mobs) {// dynamic check by [random]
for (m = 0; m < iMap->map_num; m++) {
for (i = 0; i < MAX_MOB_LIST_PER_MAP; i++) {
if (map[m].moblist[i] != NULL) {
@@ -3797,9 +3796,9 @@ int npc_reload(void) {
map[m].mob_delete_timer = INVALID_TIMER;
}
}
+ if (map[m].npc_num > 0)
+ ShowWarning("npc_reload: %d npcs weren't removed at map %s!\n", map[m].npc_num, map[m].name);
}
- if (map[m].npc_num > 0)
- ShowWarning("npc_reload: %d npcs weren't removed at map %s!\n", map[m].npc_num, map[m].name);
}
// clear mob spawn lookup index