diff options
| -rw-r--r-- | src/server/game/Battlegrounds/BattlegroundScore.h | 2 | ||||
| -rw-r--r-- | src/server/game/Battlegrounds/Zones/BattlegroundTP.h | 21 |
2 files changed, 15 insertions, 8 deletions
diff --git a/src/server/game/Battlegrounds/BattlegroundScore.h b/src/server/game/Battlegrounds/BattlegroundScore.h index 86ed320f8c6..23e06693e56 100644 --- a/src/server/game/Battlegrounds/BattlegroundScore.h +++ b/src/server/game/Battlegrounds/BattlegroundScore.h @@ -31,7 +31,7 @@ enum ScoreType SCORE_DAMAGE_DONE = 5, SCORE_HEALING_DONE = 6, - // WS and EY + // WS, EY and TP SCORE_FLAG_CAPTURES = 7, SCORE_FLAG_RETURNS = 8, diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundTP.h b/src/server/game/Battlegrounds/Zones/BattlegroundTP.h index 14efe12d74e..3d34974d845 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundTP.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundTP.h @@ -24,17 +24,17 @@ class BattlegroundTPScore final : public BattlegroundScore { protected: - BattlegroundTPScore(uint64 playerGuid, uint32 team) : BattlegroundScore(playerGuid, team), BasesAssaulted(0), BasesDefended(0) { } + BattlegroundTPScore(uint64 playerGuid, uint32 team) : BattlegroundScore(playerGuid, team), FlagCaptures(0), FlagReturns(0) { } void UpdateScore(uint32 type, uint32 value) override { switch (type) { - case SCORE_BASES_ASSAULTED: - BasesAssaulted += value; + case SCORE_FLAG_CAPTURES: + FlagCaptures += value; break; - case SCORE_BASES_DEFENDED: - BasesDefended += value; + case SCORE_FLAG_RETURNS: + FlagReturns += value; break; default: BattlegroundScore::UpdateScore(type, value); @@ -42,8 +42,15 @@ class BattlegroundTPScore final : public BattlegroundScore } } - uint32 BasesAssaulted; - uint32 BasesDefended; + void BuildObjectivesBlock(WorldPacket& data, ByteBuffer& content) final + { + data.WriteBits(2, 24); // Objectives Count + content << uint32(FlagCaptures); + content << uint32(FlagReturns); + } + + uint32 FlagCaptures; + uint32 FlagReturns; }; class BattlegroundTP : public Battleground |
