fix(Core/Battlefield): Erase invite by real team on war accept and add queue list command (#25056)

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Andrew
2026-03-11 22:02:30 -03:00
committed by GitHub
parent 56985dac51
commit 392f6f5e44
5 changed files with 156 additions and 3 deletions
+1 -1
View File
@@ -442,7 +442,7 @@ void Battlefield::PlayerAcceptInviteToWar(Player* player)
{
player->GetSession()->SendBfEntered(m_BattleId);
m_PlayersInWar[player->GetTeamId()].insert(player->GetGUID());
m_InvitedPlayers[player->GetTeamId()].erase(player->GetGUID());
m_InvitedPlayers[player->GetTeamId(true)].erase(player->GetGUID());
if (player->isAFK())
player->ToggleAFK();
@@ -361,6 +361,14 @@ public:
// Returns the maximum players allowed per team
uint32 GetMaxPlayersPerTeam() const { return m_MaxPlayer; }
/// Returns the set of players waiting in the pre-battle queue (per team, read-only).
GuidUnorderedSet const& GetPlayersQueueSet(TeamId teamId) const { return m_PlayersInQueue[teamId]; }
/// Returns the map of players invited to join the active war, value is invite expiry
/// timestamp (per team, read-only).
PlayerTimerMap const& GetInvitedPlayersMap(TeamId teamId) const { return m_InvitedPlayers[teamId]; }
/// Returns the set of players actively fighting in the war (per team, read-only).
GuidUnorderedSet const& GetPlayersInWarSet(TeamId teamId) const { return m_PlayersInWar[teamId]; }
void DoPlaySoundToAll(uint32 SoundID);
void InvitePlayerToQueue(Player* player);
+9 -1
View File
@@ -1194,7 +1194,15 @@ enum AcoreStrings
LANG_RESETALL_HONOR = 5118,
LANG_RESETALL_ARENA = 5119,
// Room for more strings 5120-9999
// Battlefield queue display (.bf queue)
LANG_BF_QUEUE_HDR_WAR = 5120,
LANG_BF_QUEUE_HDR_WAIT = 5121,
LANG_BF_QUEUE_TEAM_HDR = 5122,
LANG_BF_QUEUE_PLAYER_QUEUE = 5123,
LANG_BF_QUEUE_PLAYER_INVITED = 5124,
LANG_BF_QUEUE_PLAYER_WAR = 5125,
// Room for more strings 5126-9999
// Level requirement notifications
LANG_SAY_REQ = 6604,