AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
BattlegroundScore Struct Referenceabstract

#include "BattlegroundScore.h"

Inheritance diagram for BattlegroundScore:
ArenaScore BattlegroundABScore BattlegroundAVScore BattlegroundEYScore BattlegroundICScore BattlegroundSAScore BattlegroundWGScore

Protected Member Functions

 BattlegroundScore (ObjectGuid playerGuid)
 
virtual ~BattlegroundScore ()=default
 
virtual void UpdateScore (uint32 type, uint32 value)
 
virtual void AppendToPacket (WorldPacket &data)
 
virtual void BuildObjectivesBlock (WorldPacket &)=0
 
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 GetAttr1 () const
 
virtual uint32 GetAttr2 () const
 
virtual uint32 GetAttr3 () const
 
virtual uint32 GetAttr4 () const
 
virtual uint32 GetAttr5 () const
 

Protected Attributes

ObjectGuid PlayerGuid
 
uint32 KillingBlows = 0
 
uint32 Deaths = 0
 
uint32 HonorableKills = 0
 
uint32 BonusHonor = 0
 
uint32 DamageDone = 0
 
uint32 HealingDone = 0
 

Friends

class Arena
 
class Battleground
 

Detailed Description

Constructor & Destructor Documentation

◆ BattlegroundScore()

BattlegroundScore::BattlegroundScore ( ObjectGuid  playerGuid)
inlineprotected
64: PlayerGuid(playerGuid) { }
ObjectGuid PlayerGuid
Definition: BattlegroundScore.h:114

◆ ~BattlegroundScore()

virtual BattlegroundScore::~BattlegroundScore ( )
protectedvirtualdefault

Member Function Documentation

◆ AppendToPacket()

void BattlegroundScore::AppendToPacket ( WorldPacket data)
protectedvirtual

Reimplemented in ArenaScore.

125{
126 data << PlayerGuid;
127
128 data << uint32(KillingBlows);
129 data << uint32(HonorableKills);
130 data << uint32(Deaths);
131 data << uint32(BonusHonor);
132 data << uint32(DamageDone);
133 data << uint32(HealingDone);
134
136}
std::uint32_t uint32
Definition: Define.h:107
uint32 KillingBlows
Definition: BattlegroundScore.h:117
uint32 HealingDone
Definition: BattlegroundScore.h:122
uint32 Deaths
Definition: BattlegroundScore.h:118
virtual void BuildObjectivesBlock(WorldPacket &)=0
uint32 BonusHonor
Definition: BattlegroundScore.h:120
uint32 HonorableKills
Definition: BattlegroundScore.h:119
uint32 DamageDone
Definition: BattlegroundScore.h:121

References BonusHonor, BuildObjectivesBlock(), DamageDone, Deaths, HealingDone, HonorableKills, KillingBlows, and PlayerGuid.

◆ BuildObjectivesBlock()

virtual void BattlegroundScore::BuildObjectivesBlock ( WorldPacket )
protectedpure virtual

◆ GetAttr1()

virtual uint32 BattlegroundScore::GetAttr1 ( ) const
inlineprotectedvirtual

◆ GetAttr2()

virtual uint32 BattlegroundScore::GetAttr2 ( ) const
inlineprotectedvirtual

◆ GetAttr3()

virtual uint32 BattlegroundScore::GetAttr3 ( ) const
inlineprotectedvirtual

Reimplemented in BattlegroundAVScore.

110{ return 0; }

◆ GetAttr4()

virtual uint32 BattlegroundScore::GetAttr4 ( ) const
inlineprotectedvirtual

Reimplemented in BattlegroundAVScore.

111{ return 0; }

◆ GetAttr5()

virtual uint32 BattlegroundScore::GetAttr5 ( ) const
inlineprotectedvirtual

Reimplemented in BattlegroundAVScore.

112{ return 0; }

◆ GetBonusHonor()

uint32 BattlegroundScore::GetBonusHonor ( ) const
inlineprotected
104{ return BonusHonor; }

◆ GetDamageDone()

uint32 BattlegroundScore::GetDamageDone ( ) const
inlineprotected
105{ return DamageDone; }

◆ GetDeaths()

uint32 BattlegroundScore::GetDeaths ( ) const
inlineprotected
102{ return Deaths; }

◆ GetHealingDone()

uint32 BattlegroundScore::GetHealingDone ( ) const
inlineprotected
106{ return HealingDone; }

◆ GetHonorableKills()

uint32 BattlegroundScore::GetHonorableKills ( ) const
inlineprotected
103{ return HonorableKills; }

◆ GetKillingBlows()

uint32 BattlegroundScore::GetKillingBlows ( ) const
inlineprotected
101{ return KillingBlows; }

◆ ToString()

virtual std::string BattlegroundScore::ToString ( ) const
inlineprotectedvirtual

Reimplemented in ArenaScore.

99{ return ""; }

◆ UpdateScore()

virtual void BattlegroundScore::UpdateScore ( uint32  type,
uint32  value 
)
inlineprotectedvirtual

Reimplemented in BattlegroundABScore, BattlegroundAVScore, BattlegroundEYScore, BattlegroundICScore, BattlegroundSAScore, and BattlegroundWGScore.

68 {
69 switch (type)
70 {
71 case SCORE_KILLING_BLOWS: // Killing blows
72 KillingBlows += value;
73 break;
74 case SCORE_DEATHS: // Deaths
75 Deaths += value;
76 break;
77 case SCORE_HONORABLE_KILLS: // Honorable kills
78 HonorableKills += value;
79 break;
80 case SCORE_BONUS_HONOR: // Honor bonus
81 BonusHonor += value;
82 break;
83 case SCORE_DAMAGE_DONE: // Damage Done
84 DamageDone += value;
85 break;
86 case SCORE_HEALING_DONE: // Healing Done
87 HealingDone += value;
88 break;
89 default:
90 ABORT("Not implemented Battleground score type!");
91 break;
92 }
93 }
#define ABORT
Definition: Errors.h:76
@ SCORE_KILLING_BLOWS
Definition: BattlegroundScore.h:29
@ SCORE_BONUS_HONOR
Definition: BattlegroundScore.h:32
@ SCORE_DEATHS
Definition: BattlegroundScore.h:30
@ SCORE_DAMAGE_DONE
Definition: BattlegroundScore.h:33
@ SCORE_HEALING_DONE
Definition: BattlegroundScore.h:34
@ SCORE_HONORABLE_KILLS
Definition: BattlegroundScore.h:31

References ABORT, SCORE_BONUS_HONOR, SCORE_DAMAGE_DONE, SCORE_DEATHS, SCORE_HEALING_DONE, SCORE_HONORABLE_KILLS, and SCORE_KILLING_BLOWS.

Referenced by BattlegroundABScore::UpdateScore(), BattlegroundAVScore::UpdateScore(), BattlegroundEYScore::UpdateScore(), BattlegroundICScore::UpdateScore(), BattlegroundSAScore::UpdateScore(), and BattlegroundWGScore::UpdateScore().

Friends And Related Function Documentation

◆ Arena

friend class Arena
friend

◆ Battleground

friend class Battleground
friend

Member Data Documentation

◆ BonusHonor

uint32 BattlegroundScore::BonusHonor = 0
protected

Referenced by AppendToPacket().

◆ DamageDone

uint32 BattlegroundScore::DamageDone = 0
protected

◆ Deaths

uint32 BattlegroundScore::Deaths = 0
protected

Referenced by AppendToPacket().

◆ HealingDone

uint32 BattlegroundScore::HealingDone = 0
protected

◆ HonorableKills

uint32 BattlegroundScore::HonorableKills = 0
protected

Referenced by AppendToPacket().

◆ KillingBlows

uint32 BattlegroundScore::KillingBlows = 0
protected

◆ PlayerGuid

ObjectGuid BattlegroundScore::PlayerGuid
protected