AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
ArenaTeamScore Struct Reference

#include "ArenaScore.h"

Protected Member Functions

 ArenaTeamScore ()=default
 
virtual ~ArenaTeamScore ()=default
 
void Reset ()
 
void Assign (int32 ratingChange, uint32 matchMakerRating, std::string_view teamName)
 
void BuildRatingInfoBlock (WorldPacket &data)
 
void BuildTeamInfoBlock (WorldPacket &data)
 

Protected Attributes

int32 RatingChange = 0
 
uint32 MatchmakerRating = 0
 
std::string TeamName {}
 

Friends

class Arena
 
class Battleground
 

Detailed Description

Constructor & Destructor Documentation

◆ ArenaTeamScore()

ArenaTeamScore::ArenaTeamScore ( )
protecteddefault

◆ ~ArenaTeamScore()

virtual ArenaTeamScore::~ArenaTeamScore ( )
protectedvirtualdefault

Member Function Documentation

◆ Assign()

void ArenaTeamScore::Assign ( int32  ratingChange,
uint32  matchMakerRating,
std::string_view  teamName 
)
inlineprotected
61 {
62 RatingChange = ratingChange;
63 MatchmakerRating = matchMakerRating;
64 TeamName = std::string(teamName);
65 }
uint32 MatchmakerRating
Definition: ArenaScore.h:71
int32 RatingChange
Definition: ArenaScore.h:70
std::string TeamName
Definition: ArenaScore.h:72

Referenced by Arena::EndBattleground().

◆ BuildRatingInfoBlock()

void ArenaTeamScore::BuildRatingInfoBlock ( WorldPacket data)
protected
48{
49 uint32 ratingLost = std::abs(std::min(RatingChange, 0));
50 uint32 ratingWon = std::max(RatingChange, 0);
51
52 // should be old rating, new rating, and client will calculate rating change itself
53 data << uint32(ratingLost);
54 data << uint32(ratingWon);
55 data << uint32(MatchmakerRating);
56}
std::uint32_t uint32
Definition: Define.h:107

References MatchmakerRating, and RatingChange.

◆ BuildTeamInfoBlock()

void ArenaTeamScore::BuildTeamInfoBlock ( WorldPacket data)
protected
59{
60 data << TeamName;
61}

References TeamName.

◆ Reset()

void ArenaTeamScore::Reset ( )
inlineprotected
54 {
55 RatingChange = 0;
57 TeamName = {};
58 }

Friends And Related Function Documentation

◆ Arena

friend class Arena
friend

◆ Battleground

friend class Battleground
friend

Member Data Documentation

◆ MatchmakerRating

uint32 ArenaTeamScore::MatchmakerRating = 0
protected

Referenced by BuildRatingInfoBlock().

◆ RatingChange

int32 ArenaTeamScore::RatingChange = 0
protected

Referenced by BuildRatingInfoBlock().

◆ TeamName

std::string ArenaTeamScore::TeamName {}
protected

Referenced by BuildTeamInfoBlock().