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:
Dresmyr
2020-02-01 09:03:48 -05:00
committed by GitHub
parent 4da4ad4e0d
commit 1329b6b471

View File

@@ -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);
}
}