[7415] Fixed removing player from battlegrounds Author: Triply

Probably fixed bug with not ending battlegrounds - reported in previous commit message
    Fixed player will loose arena rating if
    1. he doesn't click on enter rated arena window - and timer will expire
    2. he logs out during time he is invited to rated arena match
    3. if he logs out during fight in rated arena match
    Patch is not tested, i will test it as soon as possible.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-03-09 17:07:40 -06:00
parent 1f296b7d40
commit c708eba713
7 changed files with 112 additions and 109 deletions
+1 -2
View File
@@ -374,7 +374,6 @@ class BattleGround
typedef std::map<uint64, BattleGroundPlayer> BattleGroundPlayerMap;
BattleGroundPlayerMap const& GetPlayers() const { return m_Players; }
uint32 GetPlayersSize() const { return m_Players.size(); }
uint32 GetRemovedPlayersSize() const { return m_RemovedPlayers.size(); }
std::map<uint64, BattleGroundScore*>::const_iterator GetPlayerScoresBegin() const { return m_PlayerScores.begin(); }
std::map<uint64, BattleGroundScore*>::const_iterator GetPlayerScoresEnd() const { return m_PlayerScores.end(); }
@@ -506,6 +505,7 @@ class BattleGround
// since arenas can be AvA or Hvh, we have to get the "temporary" team of a player
uint32 GetPlayerTeam(uint64 guid);
uint32 GetOtherTeam(uint32 teamId);
bool IsPlayerInBattleGround(uint64 guid);
void SetDeleteThis() {m_SetDeleteThis = true;}
@@ -560,7 +560,6 @@ class BattleGround
/* Player lists */
std::vector<uint64> m_ResurrectQueue; // Player GUID
std::deque<uint64> m_OfflineQueue; // Player GUID
std::map<uint64, uint8> m_RemovedPlayers; // uint8 is remove type (0 - bgqueue, 1 - bg, 2 - resurrect queue)
/* Invited counters are useful for player invitation to BG - do not allow, if BG is started to one faction to have 2 more players than another faction */
/* Invited counters will be changed only when removing already invited player from queue, removing player from battleground and inviting player to BG */