diff options
author | megamage <none@none> | 2009-07-31 11:36:02 +0800 |
---|---|---|
committer | megamage <none@none> | 2009-07-31 11:36:02 +0800 |
commit | 70e31cce3fc41cc5ebfbc9f0a69a1757ea4ec42a (patch) | |
tree | a35de670296d3fa287bfa88d457d6eed237c1e73 /src/game/BattleGround.h | |
parent | d96642c92fbeab49ae613a78c3fb578934288d2f (diff) |
[8276] Implement achievment ACHIEVEMENT_CRITERIA_TYPE_WIN_BG Author: VladimirMangos
* including new achievement createria data type ACHIEVEMENT_CRITERIA_DATA_TYPE_BG_LOSS_TEAM_SCORE
Note: Some achivement creteria for success need data in `achievement_criteria_data`
--HG--
branch : trunk
Diffstat (limited to 'src/game/BattleGround.h')
-rw-r--r-- | src/game/BattleGround.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/game/BattleGround.h b/src/game/BattleGround.h index 2d7419e8798..ab1a3d4b13c 100644 --- a/src/game/BattleGround.h +++ b/src/game/BattleGround.h @@ -298,6 +298,10 @@ class BattleGround virtual void StartingEventCloseDoors() {} virtual void StartingEventOpenDoors() {} + /* achievement req. */ + virtual bool IsAllNodesConrolledByTeam(uint32 /*team*/) const { return false; } + bool IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxScore) const; + /* Battleground */ // Get methods: char const* GetName() const { return m_Name; } @@ -397,7 +401,7 @@ class BattleGround void SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, float O); void GetTeamStartLoc(uint32 TeamID, float &X, float &Y, float &Z, float &O) const { - uint8 idx = GetTeamIndexByTeamId(TeamID); + BattleGroundTeamId idx = GetTeamIndexByTeamId(TeamID); X = m_TeamStartLocX[idx]; Y = m_TeamStartLocY[idx]; Z = m_TeamStartLocZ[idx]; @@ -441,7 +445,7 @@ class BattleGround virtual void UpdatePlayerScore(Player *Source, uint32 type, uint32 value); - uint8 GetTeamIndexByTeamId(uint32 Team) const { return Team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE; } + static BattleGroundTeamId GetTeamIndexByTeamId(uint32 Team) { return Team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE; } uint32 GetPlayersCountByTeam(uint32 Team) const { return m_PlayersCount[GetTeamIndexByTeamId(Team)]; } uint32 GetAlivePlayersCountByTeam(uint32 Team) const; // used in arenas to correctly handle death in spirit of redemption / last stand etc. (killer = killed) cases void UpdatePlayersCountByTeam(uint32 Team, bool remove) |