mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
fix(Core/Hook): Make OnPlayerLeaveMap actually trigger (#2628)
OnPlayerLeaveMap was previously inside the if(remove) block which only is called when the player is logging out, this moves it outside that block but still has it trigger in the same order, thus allowing OnPlayerLeaveMap scripts to fire properly (needed for AutoBalanceFix)
This commit is contained in:
@@ -876,9 +876,9 @@ void Map::RemovePlayerFromMap(Player* player, bool remove)
|
||||
else
|
||||
ASSERT(remove); //maybe deleted in logoutplayer when player is not in a map
|
||||
|
||||
sScriptMgr->OnPlayerLeaveMap(this, player);
|
||||
if (remove)
|
||||
{
|
||||
sScriptMgr->OnPlayerLeaveMap(this, player);
|
||||
DeleteFromWorld(player);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user