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:
parent
4da4ad4e0d
commit
1329b6b471
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue