fix(Core/Scripting): Call OnBattlefieldPlayerJoinWar() before adding … (#24964)
This commit is contained in:
@@ -434,6 +434,8 @@ void Battlefield::PlayerAcceptInviteToWar(Player* player)
|
|||||||
if (!IsWarTime())
|
if (!IsWarTime())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
sScriptMgr->OnBattlefieldPlayerJoinWar(this, player);
|
||||||
|
|
||||||
if (AddOrSetPlayerToCorrectBfGroup(player))
|
if (AddOrSetPlayerToCorrectBfGroup(player))
|
||||||
{
|
{
|
||||||
player->GetSession()->SendBfEntered(m_BattleId);
|
player->GetSession()->SendBfEntered(m_BattleId);
|
||||||
@@ -444,7 +446,6 @@ void Battlefield::PlayerAcceptInviteToWar(Player* player)
|
|||||||
player->ToggleAFK();
|
player->ToggleAFK();
|
||||||
|
|
||||||
OnPlayerJoinWar(player); //for scripting
|
OnPlayerJoinWar(player); //for scripting
|
||||||
sScriptMgr->OnBattlefieldPlayerJoinWar(this, player);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user