diff options
author | DDuarte <dnpd.dd@gmail.com> | 2015-07-22 23:24:56 +0100 |
---|---|---|
committer | DDuarte <dnpd.dd@gmail.com> | 2015-07-22 23:24:56 +0100 |
commit | 7d9843c380cf00f38ad0c5bc75fd387e50ee11da (patch) | |
tree | 780ad3e8790466ccdf4ef4a8b37ea6a5ad12bd15 /src/server/game/Battlefield/Battlefield.h | |
parent | 978a57f7b4f7ff465f84b044062859d9ef2ba0f1 (diff) |
Core/Misc: Add a few consts to methods
Diffstat (limited to 'src/server/game/Battlefield/Battlefield.h')
-rw-r--r-- | src/server/game/Battlefield/Battlefield.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h index 0eebeee6939..42d27ed35cf 100644 --- a/src/server/game/Battlefield/Battlefield.h +++ b/src/server/game/Battlefield/Battlefield.h @@ -101,7 +101,7 @@ class BfCapturePoint GameObject* GetCapturePointGo(); uint32 GetCapturePointEntry() const { return m_capturePointEntry; } - TeamId GetTeamId() { return m_team; } + TeamId GetTeamId() const { return m_team; } protected: bool DelCapturePoint(); @@ -222,19 +222,19 @@ class Battlefield : public ZoneScript /// Called when a Unit is kill in battlefield zone virtual void HandleKill(Player* /*killer*/, Unit* /*killed*/) { }; - uint32 GetTypeId() { return m_TypeId; } - uint32 GetZoneId() { return m_ZoneId; } - ObjectGuid GetGUID() { return m_Guid; } + uint32 GetTypeId() const { return m_TypeId; } + uint32 GetZoneId() const { return m_ZoneId; } + ObjectGuid GetGUID() const { return m_Guid; } void TeamApplyBuff(TeamId team, uint32 spellId, uint32 spellId2 = 0); /// Return true if battle is start, false if battle is not started - bool IsWarTime() { return m_isActive; } + bool IsWarTime() const { return m_isActive; } /// Enable or Disable battlefield void ToggleBattlefield(bool enable) { m_IsEnabled = enable; } /// Return if battlefield is enable - bool IsEnabled() { return m_IsEnabled; } + bool IsEnabled() const { return m_IsEnabled; } /** * \brief Kick player from battlefield and teleport him to kick-point location @@ -257,9 +257,9 @@ class Battlefield : public ZoneScript virtual void UpdateData(uint32 index, int32 pad) { m_Data32[index] += pad; } // Battlefield - generic methods - TeamId GetDefenderTeam() { return m_DefenderTeam; } - TeamId GetAttackerTeam() { return TeamId(1 - m_DefenderTeam); } - TeamId GetOtherTeam(TeamId team) { return (team == TEAM_HORDE ? TEAM_ALLIANCE : TEAM_HORDE); } + TeamId GetDefenderTeam() const { return m_DefenderTeam; } + TeamId GetAttackerTeam() const { return TeamId(1 - m_DefenderTeam); } + TeamId GetOtherTeam(TeamId team) const { return (team == TEAM_HORDE ? TEAM_ALLIANCE : TEAM_HORDE); } void SetDefenderTeam(TeamId team) { m_DefenderTeam = team; } // Group methods @@ -311,7 +311,7 @@ class Battlefield : public ZoneScript void PlayerAcceptInviteToQueue(Player* player); void PlayerAcceptInviteToWar(Player* player); - uint32 GetBattleId() { return m_BattleId; } + uint32 GetBattleId() const { return m_BattleId; } void AskToLeaveQueue(Player* player); virtual void DoCompleteOrIncrementAchievement(uint32 /*achievement*/, Player* /*player*/, uint8 /*incrementNumber = 1*/) { } @@ -331,9 +331,9 @@ class Battlefield : public ZoneScript void HideNpc(Creature* creature); void ShowNpc(Creature* creature, bool aggressive); - GraveyardVect GetGraveyardVector() { return m_GraveyardList; } + GraveyardVect GetGraveyardVector() const { return m_GraveyardList; } - uint32 GetTimer() { return m_Timer; } + uint32 GetTimer() const { return m_Timer; } void SetTimer(uint32 timer) { m_Timer = timer; } void DoPlaySoundToAll(uint32 SoundID); |