diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/map.hpp | 2 | ||||
-rw-r--r-- | src/map/npc.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/map/map.hpp b/src/map/map.hpp index 44c5bfb..9a184d5 100644 --- a/src/map/map.hpp +++ b/src/map/map.hpp @@ -342,9 +342,7 @@ struct npc_data : block_list bool deletion_pending; - std::list<RString> eventqueuel; Array<Timer, MAX_EVENTTIMER> eventtimer; - short arenaflag; private: dumb_ptr<npc_data_script> as_script(); diff --git a/src/map/npc.cpp b/src/map/npc.cpp index a7cbf5d..8f4e5c7 100644 --- a/src/map/npc.cpp +++ b/src/map/npc.cpp @@ -1026,14 +1026,16 @@ int npc_selllist(dumb_ptr<map_session_data> sd, static void npc_free_internal(dumb_ptr<npc_data> nd_) { + for (int i = 0; i < MAX_EVENTTIMER; i++) + { + nd->eventtimer[i].cancel(); + } + if (nd_->npc_subtype == NpcSubtype::SCRIPT) { dumb_ptr<npc_data_script> nd = nd_->is_script(); nd->scr.timerid.cancel(); nd->scr.timer_eventv.clear(); - nd->eventqueuel.clear(); - for (int i = 0; i < MAX_EVENTTIMER; i++) - nd->eventtimer[i].cancel(); // destroy all children (puppets), if any if (nd_->name && nd->scr.parent == BlockId()) |