feat(Core/Scripting): Implement OnBattlefieldBeforeInvitePlayerToWar() (#24973)

This commit is contained in:
Andrew
2026-03-02 20:05:43 -03:00
committed by GitHub
parent c880590180
commit 8422ec906f
4 changed files with 25 additions and 4 deletions

View File

@@ -312,6 +312,8 @@ void Battlefield::InvitePlayerToWar(Player* player)
if (m_PlayersInWar[player->GetTeamId()].count(player->GetGUID()) || m_InvitedPlayers[player->GetTeamId()].count(player->GetGUID()))
return;
sScriptMgr->OnBattlefieldBeforeInvitePlayerToWar(this, player);
m_PlayersWillBeKick[player->GetTeamId()].erase(player->GetGUID());
m_InvitedPlayers[player->GetTeamId()][player->GetGUID()] = GameTime::GetGameTime().count() + m_TimeForAcceptInvite;
player->GetSession()->SendBfInvitePlayerToWar(m_BattleId, m_ZoneId, m_TimeForAcceptInvite);