mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-11-10 12:24:22 +08:00
Update src/server/game/Maps/Map.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
f3fc1b6e49
commit
052d8b1cae
@ -54,6 +54,8 @@ Map::~Map()
|
||||
{
|
||||
// UnloadAll must be called before deleting the map
|
||||
|
||||
// Kill all scheduled events without executing them, since the map and its objects are being destroyed.
|
||||
// This prevents events from running on invalid or deleted objects during map destruction.
|
||||
m_Events.KillAllEvents(false);
|
||||
|
||||
sScriptMgr->OnDestroyMap(this);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user