TrinityCore
BattlegroundWGScore Struct Referencefinal

#include <BattlegroundWS.h>

Protected Member Functions

 BattlegroundWGScore (ObjectGuid playerGuid, uint32 team)
 
void UpdateScore (uint32 type, uint32 value) override
 
void BuildPvPLogPlayerDataPacket (WorldPackets::Battleground::PVPMatchStatistics::PVPMatchPlayerStatistics &playerData) const override
 
uint32 GetAttr1 () const final override
 
uint32 GetAttr2 () const final override
 
- Protected Member Functions inherited from BattlegroundScore
 BattlegroundScore (ObjectGuid playerGuid, uint32 team)
 
virtual ~BattlegroundScore ()
 
virtual std::string ToString () const
 
uint32 GetKillingBlows () const
 
uint32 GetDeaths () const
 
uint32 GetHonorableKills () const
 
uint32 GetBonusHonor () const
 
uint32 GetDamageDone () const
 
uint32 GetHealingDone () const
 
virtual uint32 GetAttr3 () const
 
virtual uint32 GetAttr4 () const
 
virtual uint32 GetAttr5 () const
 

Protected Attributes

uint32 FlagCaptures
 
uint32 FlagReturns
 
- Protected Attributes inherited from BattlegroundScore
ObjectGuid PlayerGuid
 
uint8 TeamId
 
uint32 KillingBlows
 
uint32 Deaths
 
uint32 HonorableKills
 
uint32 BonusHonor
 
uint32 DamageDone
 
uint32 HealingDone
 

Friends

class BattlegroundWS
 

Constructor & Destructor Documentation

◆ BattlegroundWGScore()

BattlegroundWGScore::BattlegroundWGScore ( ObjectGuid  playerGuid,
uint32  team 
)
inlineprotected
177 : BattlegroundScore(playerGuid, team), FlagCaptures(0), FlagReturns(0) { }
uint32 FlagCaptures
Definition: BattlegroundWS.h:206
BattlegroundScore(ObjectGuid playerGuid, uint32 team)
Definition: BattlegroundScore.cpp:22
uint32 FlagReturns
Definition: BattlegroundWS.h:207

Member Function Documentation

◆ BuildPvPLogPlayerDataPacket()

void BattlegroundWGScore::BuildPvPLogPlayerDataPacket ( WorldPackets::Battleground::PVPMatchStatistics::PVPMatchPlayerStatistics playerData) const
inlineoverrideprotectedvirtual

Reimplemented from BattlegroundScore.

196  {
198 
199  playerData.Stats.emplace_back(WS_OBJECTIVE_CAPTURE_FLAG, FlagCaptures);
200  playerData.Stats.emplace_back(WS_OBJECTIVE_RETURN_FLAG, FlagReturns);
201  }
Definition: BattlegroundWS.h:167
uint32 FlagCaptures
Definition: BattlegroundWS.h:206
uint32 FlagReturns
Definition: BattlegroundWS.h:207
std::vector< PVPMatchPlayerPVPStat > Stats
Definition: BattlegroundPackets.h:133
Definition: BattlegroundWS.h:166
virtual void BuildPvPLogPlayerDataPacket(WorldPackets::Battleground::PVPMatchStatistics::PVPMatchPlayerStatistics &playerData) const
Definition: BattlegroundScore.cpp:59
+ Here is the call graph for this function:

◆ GetAttr1()

uint32 BattlegroundWGScore::GetAttr1 ( ) const
inlinefinaloverrideprotectedvirtual

Reimplemented from BattlegroundScore.

203 { return FlagCaptures; }
uint32 FlagCaptures
Definition: BattlegroundWS.h:206

◆ GetAttr2()

uint32 BattlegroundWGScore::GetAttr2 ( ) const
inlinefinaloverrideprotectedvirtual

Reimplemented from BattlegroundScore.

204 { return FlagReturns; }
uint32 FlagReturns
Definition: BattlegroundWS.h:207

◆ UpdateScore()

void BattlegroundWGScore::UpdateScore ( uint32  type,
uint32  value 
)
inlineoverrideprotectedvirtual

Reimplemented from BattlegroundScore.

180  {
181  switch (type)
182  {
183  case SCORE_FLAG_CAPTURES: // Flags captured
184  FlagCaptures += value;
185  break;
186  case SCORE_FLAG_RETURNS: // Flags returned
187  FlagReturns += value;
188  break;
189  default:
190  BattlegroundScore::UpdateScore(type, value);
191  break;
192  }
193  }
Definition: BattlegroundScore.h:36
uint32 FlagCaptures
Definition: BattlegroundWS.h:206
Definition: BattlegroundScore.h:37
uint32 FlagReturns
Definition: BattlegroundWS.h:207
virtual void UpdateScore(uint32 type, uint32 value)
Definition: BattlegroundScore.cpp:31
+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ BattlegroundWS

friend class BattlegroundWS
friend

Member Data Documentation

◆ FlagCaptures

uint32 BattlegroundWGScore::FlagCaptures
protected

◆ FlagReturns

uint32 BattlegroundWGScore::FlagReturns
protected

The documentation for this struct was generated from the following file: