[8315] Fixed memory leaks (mostly at server shutdown) and code cleanups. Author: VladimirMangos
* Fixed leak in BattleGround::m_PlayerScores at BattleGround::Reset,
add and use BattleGroundScoreMap typedef
* Delete AreaTeam objects stored in global map at shutdown
* Delete Corpse objects stored in global map at shutdown
* Store guild bank log entries as objectes instead pointers in log event lists
--HG--
branch : trunk
This commit is contained in:
@@ -384,8 +384,9 @@ class BattleGround
|
||||
BattleGroundPlayerMap const& GetPlayers() const { return m_Players; }
|
||||
uint32 GetPlayersSize() const { return m_Players.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(); }
|
||||
typedef std::map<uint64, BattleGroundScore*> BattleGroundScoreMap;
|
||||
BattleGroundScoreMap::const_iterator GetPlayerScoresBegin() const { return m_PlayerScores.begin(); }
|
||||
BattleGroundScoreMap::const_iterator GetPlayerScoresEnd() const { return m_PlayerScores.end(); }
|
||||
uint32 GetPlayerScoresSize() const { return m_PlayerScores.size(); }
|
||||
|
||||
uint32 GetReviveQueueSize() const { return m_ReviveQueue.size(); }
|
||||
@@ -530,8 +531,8 @@ class BattleGround
|
||||
void PlayerAddedToBGCheckIfBGIsRunning(Player* plr);
|
||||
|
||||
/* Scorekeeping */
|
||||
// Player scores
|
||||
std::map<uint64, BattleGroundScore*> m_PlayerScores;
|
||||
|
||||
BattleGroundScoreMap m_PlayerScores; // Player scores
|
||||
// must be implemented in BG subclass
|
||||
virtual void RemovePlayer(Player * /*player*/, uint64 /*guid*/) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user