[8274] use virtual m_TeamScore for battlegrounds

score is used in every battleground (not arena)
so we can use it as a virtual variable to access
it also from BattleGround-class

Signed-off-by: balrok <der-coole-carl@gmx.net>
This commit is contained in:
balrok 2009-07-29 14:43:05 +02:00
parent 7c52111fb1
commit d8c1e3991f
6 changed files with 7 additions and 4 deletions

View file

@ -178,6 +178,9 @@ BattleGround::BattleGround()
m_PlayersCount[BG_TEAM_ALLIANCE] = 0;
m_PlayersCount[BG_TEAM_HORDE] = 0;
m_TeamScores[BG_TEAM_ALLIANCE] = 0;
m_TeamScores[BG_TEAM_HORDE] = 0;
m_PrematureCountDown = false;
m_PrematureCountDown = 0;

View file

@ -499,6 +499,9 @@ class BattleGround
void SetDeleteThis() {m_SetDeleteThis = true;}
/* virtual score-array - get's used in bg-subclasses */
int32 m_TeamScores[BG_TEAMS_COUNT];
protected:
//this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends BattleGround
void EndNow();

View file

@ -283,7 +283,6 @@ class BattleGroundAB : public BattleGround
uint8 m_prevNodes[BG_AB_DYNAMIC_NODES_COUNT];
BG_AB_BannerTimer m_BannerTimers[BG_AB_DYNAMIC_NODES_COUNT];
uint32 m_NodeTimers[BG_AB_DYNAMIC_NODES_COUNT];
uint32 m_TeamScores[BG_TEAMS_COUNT];
uint32 m_lastTick[BG_TEAMS_COUNT];
uint32 m_HonorScoreTics[BG_TEAMS_COUNT];
uint32 m_ReputationScoreTics[BG_TEAMS_COUNT];

View file

@ -367,7 +367,6 @@ class BattleGroundEY : public BattleGround
void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; }
void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] = Points; }
uint32 m_TeamScores[2];
uint32 m_HonorScoreTics[2];
uint32 m_TeamPointsCount[2];

View file

@ -184,7 +184,6 @@ class BattleGroundWS : public BattleGround
uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde
uint64 m_DroppedFlagGUID[2];
uint8 m_FlagState[2]; // for checking flag state
uint32 m_TeamScores[2];
int32 m_FlagsTimer[2];
int32 m_FlagsDropTimer[2];

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8273"
#define REVISION_NR "8274"
#endif // __REVISION_NR_H__