summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-24 13:13:27 -0300
committershennetsind <ind@henn.et>2013-06-24 13:13:27 -0300
commit4ff67a9c9977e216c5b63bf5c80480dba1e2fcab (patch)
tree8e59ec1c7f180bce2f1ec32be0c5de55a77f5e8f /src/map/npc.c
parent15cf156a3229532ffb2db0f78b29da228e0b2cc7 (diff)
downloadhercules-4ff67a9c9977e216c5b63bf5c80480dba1e2fcab.tar.gz
hercules-4ff67a9c9977e216c5b63bf5c80480dba1e2fcab.tar.bz2
hercules-4ff67a9c9977e216c5b63bf5c80480dba1e2fcab.tar.xz
hercules-4ff67a9c9977e216c5b63bf5c80480dba1e2fcab.zip
Fixed Bug #7412
Special Thanks to shenhuyong http://hercules.ws/board/tracker/issue-7412-create-instancereloadscript-causes-map-server-crash/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index d90f87f5d..8381ac409 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -3838,8 +3838,10 @@ int npc_reload(void) {
"\t-'"CL_WHITE"%d"CL_RESET"' Mobs Cached\n"
"\t-'"CL_WHITE"%d"CL_RESET"' Mobs Not Cached\n",
npc_id - npc_new_min, npc_warp, npc_shop, npc_script, npc_mob, npc_cache_mob, npc_delay_mob);
-
- instance->final();
+
+ for(i = 0; i < instance->instances; i++) {
+ instance->destroy(i);
+ }
iMap->zone_init();