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

#include "ArenaTeam.h"

Public Member Functions

void ModifyPersonalRating (Player *player, int32 mod, uint32 type)
 
void ModifyMatchmakerRating (int32 mod, uint32 slot)
 

Public Attributes

ObjectGuid Guid
 
std::string Name
 
uint8 Class
 
uint16 WeekGames
 
uint16 WeekWins
 
uint16 SeasonGames
 
uint16 SeasonWins
 
uint16 PersonalRating
 
uint16 MatchMakerRating
 
uint16 MaxMMR
 

Detailed Description

Member Function Documentation

◆ ModifyMatchmakerRating()

void ArenaTeamMember::ModifyMatchmakerRating ( int32  mod,
uint32  slot 
)
546{
547 if (mod < 0)
548 {
549 // pussywizard: prevent lowering MMR too much from max achieved MMR
550 int32 maxAllowedDrop = (int32)sWorld->getIntConfig(CONFIG_MAX_ALLOWED_MMR_DROP);
551 mod = std::min<int32>(std::max<int32>(-((int32)MatchMakerRating - (int32)MaxMMR + maxAllowedDrop), mod), 0);
552 }
553
554 if (int32(MatchMakerRating) + mod < 0)
556 else
557 MatchMakerRating += mod;
558
561}
std::int32_t int32
Definition: Define.h:103
@ CONFIG_MAX_ALLOWED_MMR_DROP
Definition: IWorld.h:345
#define sWorld
Definition: World.h:443
uint16 MatchMakerRating
Definition: ArenaTeam.h:117
uint16 MaxMMR
Definition: ArenaTeam.h:118

References CONFIG_MAX_ALLOWED_MMR_DROP, MatchMakerRating, MaxMMR, and sWorld.

◆ ModifyPersonalRating()

void ArenaTeamMember::ModifyPersonalRating ( Player player,
int32  mod,
uint32  type 
)
532{
533 if (int32(PersonalRating) + mod < 0)
534 PersonalRating = 0;
535 else
536 PersonalRating += mod;
537
538 if (player && ArenaTeam::GetSlotByType(type) < 3)
539 {
542 }
543}
@ ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING
Definition: DBCEnums.h:153
@ ARENA_TEAM_PERSONAL_RATING
Definition: ArenaTeam.h:80
uint16 PersonalRating
Definition: ArenaTeam.h:116
static uint8 GetSlotByType(uint32 type)
Definition: ArenaTeam.cpp:618
void UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
Definition: PlayerUpdates.cpp:2131
void SetArenaTeamInfoField(uint8 slot, ArenaTeamInfoType type, uint32 value)
Definition: Player.cpp:16227

References ACHIEVEMENT_CRITERIA_TYPE_HIGHEST_PERSONAL_RATING, ARENA_TEAM_PERSONAL_RATING, ArenaTeam::GetSlotByType(), PersonalRating, Player::SetArenaTeamInfoField(), and Player::UpdateAchievementCriteria().

Member Data Documentation

◆ Class

uint8 ArenaTeamMember::Class

◆ Guid

◆ MatchMakerRating

uint16 ArenaTeamMember::MatchMakerRating

◆ MaxMMR

◆ Name

std::string ArenaTeamMember::Name

◆ PersonalRating

◆ SeasonGames

◆ SeasonWins

◆ WeekGames

◆ WeekWins

uint16 ArenaTeamMember::WeekWins