Core: Some optimizations

- Declare some functions const
- Fix some mem leak
- Fix some resource leak
- Remove unused variables and functions
- Remove duplicate functions
- Reduce the scope of some variables
- Remove unused file

--HG--
branch : trunk
This commit is contained in:
Spp
2010-12-06 02:07:53 +01:00
parent e226c4ac34
commit 408fce1de6
73 changed files with 200 additions and 712 deletions
+4 -4
View File
@@ -373,7 +373,7 @@ class Battleground
uint32 GetScriptId() const { return ScriptId; }
uint32 GetBattlemasterEntry() const;
uint32 GetBonusHonorFromKill(uint32 kills) const;
bool IsRandom() { return m_IsRandom; }
bool IsRandom() const { return m_IsRandom; }
// Set methods:
void SetName(char const* Name) { m_Name = Name; }
@@ -569,9 +569,9 @@ class Battleground
virtual bool HandlePlayerUnderMap(Player * /*plr*/) { return false; }
// 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);
uint32 GetPlayerTeam(uint64 guid) const;
uint32 GetOtherTeam(uint32 teamId) const;
bool IsPlayerInBattleground(uint64 guid) const;
void SetDeleteThis() {m_SetDeleteThis = true;}