TrinityCore
ArenaTeam Class Reference

#include <ArenaTeam.h>

Public Types

typedef std::list< ArenaTeamMemberMemberList
 

Public Member Functions

 ArenaTeam ()
 
 ~ArenaTeam ()
 
bool Create (ObjectGuid captainGuid, uint8 type, std::string const &teamName, uint32 backgroundColor, uint8 emblemStyle, uint32 emblemColor, uint8 borderStyle, uint32 borderColor)
 
void Disband (WorldSession *session)
 
void Disband ()
 
uint32 GetId () const
 
uint32 GetType () const
 
uint8 GetSlot () const
 
ObjectGuid GetCaptain () const
 
std::string const & GetName () const
 
ArenaTeamStats const & GetStats () const
 
uint32 GetRating () const
 
uint32 GetAverageMMR (Group *group) const
 
void SetCaptain (ObjectGuid guid)
 
bool SetName (std::string const &name)
 
bool AddMember (ObjectGuid PlayerGuid)
 
void DelMember (ObjectGuid guid, bool cleanDb)
 
size_t GetMembersSize () const
 
bool Empty () const
 
MemberList::iterator m_membersBegin ()
 
MemberList::iterator m_membersEnd ()
 
bool IsMember (ObjectGuid guid) const
 
ArenaTeamMemberGetMember (ObjectGuid guid)
 
ArenaTeamMemberGetMember (std::string const &name)
 
bool IsFighting () const
 
bool LoadArenaTeamFromDB (QueryResult arenaTeamDataResult)
 
bool LoadMembersFromDB (QueryResult arenaTeamMembersResult)
 
void LoadStatsFromDB (uint32 ArenaTeamId)
 
void SaveToDB (bool forceMemberSave=false)
 
void BroadcastPacket (WorldPacket *packet)
 
void NotifyStatsChanged ()
 
void SendStats (WorldSession *session)
 
void Inspect (WorldSession *session, ObjectGuid guid)
 
uint32 GetPoints (uint32 MemberRating)
 
int32 GetMatchmakerRatingMod (uint32 ownRating, uint32 opponentRating, bool won)
 
int32 GetRatingMod (uint32 ownRating, uint32 opponentRating, bool won)
 
float GetChanceAgainst (uint32 ownRating, uint32 opponentRating)
 
int32 WonAgainst (uint32 Own_MMRating, uint32 Opponent_MMRating, int32 &rating_change)
 
void MemberWon (Player *player, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange)
 
int32 LostAgainst (uint32 Own_MMRating, uint32 Opponent_MMRating, int32 &rating_change)
 
void MemberLost (Player *player, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange=-12)
 
void OfflineMemberLost (ObjectGuid guid, uint32 againstMatchmakerRating, int32 MatchmakerRatingChange=-12)
 
bool FinishWeek ()
 
void FinishGame (int32 mod)
 

Static Public Member Functions

static uint8 GetSlotByType (uint32 type)
 
static uint8 GetTypeBySlot (uint8 slot)
 

Protected Attributes

uint32 TeamId
 
uint8 Type
 
std::string TeamName
 
ObjectGuid CaptainGuid
 
uint32 BackgroundColor
 
uint8 EmblemStyle
 
uint32 EmblemColor
 
uint8 BorderStyle
 
uint32 BorderColor
 
MemberList Members
 
ArenaTeamStats Stats
 

Detailed Description

Definition at line 111 of file ArenaTeam.h.

Member Typedef Documentation

◆ MemberList

Definition at line 121 of file ArenaTeam.h.

Constructor & Destructor Documentation

◆ ArenaTeam()

ArenaTeam::ArenaTeam ( )

Definition at line 32 of file ArenaTeam.cpp.

◆ ~ArenaTeam()

ArenaTeam::~ArenaTeam ( )

Definition at line 44 of file ArenaTeam.cpp.

Member Function Documentation

◆ AddMember()

bool ArenaTeam::AddMember ( ObjectGuid  PlayerGuid)

Definition at line 92 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BroadcastPacket()

void ArenaTeam::BroadcastPacket ( WorldPacket packet)

Definition at line 460 of file ArenaTeam.cpp.

+ Here is the call graph for this function:

◆ Create()

bool ArenaTeam::Create ( ObjectGuid  captainGuid,
uint8  type,
std::string const &  teamName,
uint32  backgroundColor,
uint8  emblemStyle,
uint32  emblemColor,
uint8  borderStyle,
uint32  borderColor 
)

Definition at line 47 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DelMember()

void ArenaTeam::DelMember ( ObjectGuid  guid,
bool  cleanDb 
)

Definition at line 313 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Disband() [1/2]

void ArenaTeam::Disband ( )

Definition at line 375 of file ArenaTeam.cpp.

+ Here is the call graph for this function:

◆ Disband() [2/2]

void ArenaTeam::Disband ( WorldSession session)

Definition at line 345 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Empty()

bool ArenaTeam::Empty ( ) const
inline

Definition at line 141 of file ArenaTeam.h.

+ Here is the caller graph for this function:

◆ FinishGame()

void ArenaTeam::FinishGame ( int32  mod)

Definition at line 597 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FinishWeek()

bool ArenaTeam::FinishWeek ( )

Definition at line 777 of file ArenaTeam.cpp.

+ Here is the caller graph for this function:

◆ GetAverageMMR()

uint32 ArenaTeam::GetAverageMMR ( Group group) const

Definition at line 504 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCaptain()

ObjectGuid ArenaTeam::GetCaptain ( ) const
inline

Definition at line 128 of file ArenaTeam.h.

+ Here is the caller graph for this function:

◆ GetChanceAgainst()

float ArenaTeam::GetChanceAgainst ( uint32  ownRating,
uint32  opponentRating 
)

Definition at line 534 of file ArenaTeam.cpp.

+ Here is the caller graph for this function:

◆ GetId()

uint32 ArenaTeam::GetId ( ) const
inline

Definition at line 123 of file ArenaTeam.h.

+ Here is the caller graph for this function:

◆ GetMatchmakerRatingMod()

int32 ArenaTeam::GetMatchmakerRatingMod ( uint32  ownRating,
uint32  opponentRating,
bool  won 
)

Definition at line 541 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetMember() [1/2]

ArenaTeamMember * ArenaTeam::GetMember ( ObjectGuid  guid)

Definition at line 816 of file ArenaTeam.cpp.

+ Here is the caller graph for this function:

◆ GetMember() [2/2]

ArenaTeamMember * ArenaTeam::GetMember ( std::string const &  name)

Definition at line 807 of file ArenaTeam.cpp.

◆ GetMembersSize()

size_t ArenaTeam::GetMembersSize ( ) const
inline

Definition at line 140 of file ArenaTeam.h.

+ Here is the caller graph for this function:

◆ GetName()

std::string const & ArenaTeam::GetName ( ) const
inline

Definition at line 129 of file ArenaTeam.h.

+ Here is the caller graph for this function:

◆ GetPoints()

uint32 ArenaTeam::GetPoints ( uint32  MemberRating)

◆ GetRating()

uint32 ArenaTeam::GetRating ( ) const
inline

Definition at line 132 of file ArenaTeam.h.

+ Here is the caller graph for this function:

◆ GetRatingMod()

int32 ArenaTeam::GetRatingMod ( uint32  ownRating,
uint32  opponentRating,
bool  won 
)
Todo:
Replace this hack with using the confidence factor (limiting the factor to 2.0f)

Definition at line 567 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSlot()

uint8 ArenaTeam::GetSlot ( ) const
inline

Definition at line 125 of file ArenaTeam.h.

+ Here is the caller graph for this function:

◆ GetSlotByType()

uint8 ArenaTeam::GetSlotByType ( uint32  type)
static

Definition at line 467 of file ArenaTeam.cpp.

+ Here is the caller graph for this function:

◆ GetStats()

ArenaTeamStats const & ArenaTeam::GetStats ( ) const
inline

Definition at line 130 of file ArenaTeam.h.

◆ GetType()

uint32 ArenaTeam::GetType ( ) const
inline

Definition at line 124 of file ArenaTeam.h.

+ Here is the caller graph for this function:

◆ GetTypeBySlot()

uint8 ArenaTeam::GetTypeBySlot ( uint8  slot)
static

Definition at line 481 of file ArenaTeam.cpp.

+ Here is the caller graph for this function:

◆ Inspect()

void ArenaTeam::Inspect ( WorldSession session,
ObjectGuid  guid 
)

Definition at line 420 of file ArenaTeam.cpp.

+ Here is the call graph for this function:

◆ IsFighting()

bool ArenaTeam::IsFighting ( ) const

Definition at line 797 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsMember()

bool ArenaTeam::IsMember ( ObjectGuid  guid) const

Definition at line 495 of file ArenaTeam.cpp.

+ Here is the caller graph for this function:

◆ LoadArenaTeamFromDB()

bool ArenaTeam::LoadArenaTeamFromDB ( QueryResult  arenaTeamDataResult)

Definition at line 185 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadMembersFromDB()

bool ArenaTeam::LoadMembersFromDB ( QueryResult  arenaTeamMembersResult)

Definition at line 211 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ LoadStatsFromDB()

void ArenaTeam::LoadStatsFromDB ( uint32  ArenaTeamId)

◆ LostAgainst()

int32 ArenaTeam::LostAgainst ( uint32  Own_MMRating,
uint32  Opponent_MMRating,
int32 rating_change 
)

Definition at line 643 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ m_membersBegin()

MemberList::iterator ArenaTeam::m_membersBegin ( )
inline

Definition at line 142 of file ArenaTeam.h.

+ Here is the caller graph for this function:

◆ m_membersEnd()

MemberList::iterator ArenaTeam::m_membersEnd ( )
inline

Definition at line 143 of file ArenaTeam.h.

+ Here is the caller graph for this function:

◆ MemberLost()

void ArenaTeam::MemberLost ( Player player,
uint32  againstMatchmakerRating,
int32  MatchmakerRatingChange = -12 
)

Definition at line 659 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MemberWon()

void ArenaTeam::MemberWon ( Player player,
uint32  againstMatchmakerRating,
int32  MatchmakerRatingChange 
)

Definition at line 707 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NotifyStatsChanged()

void ArenaTeam::NotifyStatsChanged ( )

Definition at line 411 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ OfflineMemberLost()

void ArenaTeam::OfflineMemberLost ( ObjectGuid  guid,
uint32  againstMatchmakerRating,
int32  MatchmakerRatingChange = -12 
)

Definition at line 685 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveToDB()

void ArenaTeam::SaveToDB ( bool  forceMemberSave = false)

Definition at line 734 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendStats()

void ArenaTeam::SendStats ( WorldSession session)

Definition at line 398 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCaptain()

void ArenaTeam::SetCaptain ( ObjectGuid  guid)

Definition at line 284 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetName()

bool ArenaTeam::SetName ( std::string const &  name)

Definition at line 271 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ WonAgainst()

int32 ArenaTeam::WonAgainst ( uint32  Own_MMRating,
uint32  Opponent_MMRating,
int32 rating_change 
)

Definition at line 623 of file ArenaTeam.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ BackgroundColor

uint32 ArenaTeam::BackgroundColor
protected

Definition at line 182 of file ArenaTeam.h.

◆ BorderColor

uint32 ArenaTeam::BorderColor
protected

Definition at line 186 of file ArenaTeam.h.

◆ BorderStyle

uint8 ArenaTeam::BorderStyle
protected

Definition at line 185 of file ArenaTeam.h.

◆ CaptainGuid

ObjectGuid ArenaTeam::CaptainGuid
protected

Definition at line 180 of file ArenaTeam.h.

◆ EmblemColor

uint32 ArenaTeam::EmblemColor
protected

Definition at line 184 of file ArenaTeam.h.

◆ EmblemStyle

uint8 ArenaTeam::EmblemStyle
protected

Definition at line 183 of file ArenaTeam.h.

◆ Members

MemberList ArenaTeam::Members
protected

Definition at line 188 of file ArenaTeam.h.

◆ Stats

ArenaTeamStats ArenaTeam::Stats
protected

Definition at line 189 of file ArenaTeam.h.

◆ TeamId

uint32 ArenaTeam::TeamId
protected

Definition at line 177 of file ArenaTeam.h.

◆ TeamName

std::string ArenaTeam::TeamName
protected

Definition at line 179 of file ArenaTeam.h.

◆ Type

uint8 ArenaTeam::Type
protected

Definition at line 178 of file ArenaTeam.h.


The documentation for this class was generated from the following files: