fix(Core/Scripting): Call OnBattlefieldPlayerJoinWar() before adding … (#24964)

This commit is contained in:
Andrew
2026-03-01 22:48:32 -03:00
committed by GitHub
parent e74adf550e
commit 1f91ccf758

View File

@@ -434,6 +434,8 @@ void Battlefield::PlayerAcceptInviteToWar(Player* player)
if (!IsWarTime())
return;
sScriptMgr->OnBattlefieldPlayerJoinWar(this, player);
if (AddOrSetPlayerToCorrectBfGroup(player))
{
player->GetSession()->SendBfEntered(m_BattleId);
@@ -444,7 +446,6 @@ void Battlefield::PlayerAcceptInviteToWar(Player* player)
player->ToggleAFK();
OnPlayerJoinWar(player); //for scripting
sScriptMgr->OnBattlefieldPlayerJoinWar(this, player);
}
}