mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[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:
parent
7c52111fb1
commit
d8c1e3991f
6 changed files with 7 additions and 4 deletions
|
|
@ -178,6 +178,9 @@ BattleGround::BattleGround()
|
||||||
m_PlayersCount[BG_TEAM_ALLIANCE] = 0;
|
m_PlayersCount[BG_TEAM_ALLIANCE] = 0;
|
||||||
m_PlayersCount[BG_TEAM_HORDE] = 0;
|
m_PlayersCount[BG_TEAM_HORDE] = 0;
|
||||||
|
|
||||||
|
m_TeamScores[BG_TEAM_ALLIANCE] = 0;
|
||||||
|
m_TeamScores[BG_TEAM_HORDE] = 0;
|
||||||
|
|
||||||
m_PrematureCountDown = false;
|
m_PrematureCountDown = false;
|
||||||
m_PrematureCountDown = 0;
|
m_PrematureCountDown = 0;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -499,6 +499,9 @@ class BattleGround
|
||||||
|
|
||||||
void SetDeleteThis() {m_SetDeleteThis = true;}
|
void SetDeleteThis() {m_SetDeleteThis = true;}
|
||||||
|
|
||||||
|
/* virtual score-array - get's used in bg-subclasses */
|
||||||
|
int32 m_TeamScores[BG_TEAMS_COUNT];
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends BattleGround
|
//this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends BattleGround
|
||||||
void EndNow();
|
void EndNow();
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,6 @@ class BattleGroundAB : public BattleGround
|
||||||
uint8 m_prevNodes[BG_AB_DYNAMIC_NODES_COUNT];
|
uint8 m_prevNodes[BG_AB_DYNAMIC_NODES_COUNT];
|
||||||
BG_AB_BannerTimer m_BannerTimers[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_NodeTimers[BG_AB_DYNAMIC_NODES_COUNT];
|
||||||
uint32 m_TeamScores[BG_TEAMS_COUNT];
|
|
||||||
uint32 m_lastTick[BG_TEAMS_COUNT];
|
uint32 m_lastTick[BG_TEAMS_COUNT];
|
||||||
uint32 m_HonorScoreTics[BG_TEAMS_COUNT];
|
uint32 m_HonorScoreTics[BG_TEAMS_COUNT];
|
||||||
uint32 m_ReputationScoreTics[BG_TEAMS_COUNT];
|
uint32 m_ReputationScoreTics[BG_TEAMS_COUNT];
|
||||||
|
|
|
||||||
|
|
@ -367,7 +367,6 @@ class BattleGroundEY : public BattleGround
|
||||||
void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; }
|
void RemovePoint(uint32 TeamID, uint32 Points = 1) { m_TeamScores[GetTeamIndexByTeamId(TeamID)] -= Points; }
|
||||||
void SetTeamPoint(uint32 TeamID, uint32 Points = 0) { 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_HonorScoreTics[2];
|
||||||
uint32 m_TeamPointsCount[2];
|
uint32 m_TeamPointsCount[2];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,6 @@ class BattleGroundWS : public BattleGround
|
||||||
uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde
|
uint64 m_FlagKeepers[2]; // 0 - alliance, 1 - horde
|
||||||
uint64 m_DroppedFlagGUID[2];
|
uint64 m_DroppedFlagGUID[2];
|
||||||
uint8 m_FlagState[2]; // for checking flag state
|
uint8 m_FlagState[2]; // for checking flag state
|
||||||
uint32 m_TeamScores[2];
|
|
||||||
int32 m_FlagsTimer[2];
|
int32 m_FlagsTimer[2];
|
||||||
int32 m_FlagsDropTimer[2];
|
int32 m_FlagsDropTimer[2];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8273"
|
#define REVISION_NR "8274"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue