BF2MC-Matchmaker
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
Battlefield::GameStatPlayer Class Reference

Represents a player's statistics in a game. More...

#include <gamestat.h>

Public Types

typedef bool(Battlefield::GameStatPlayer::* SetterFunc) (const std::string &)
 

Public Member Functions

int GetId () const
 
std::string GetAuth () const
 
int GetProfileId () const
 
std::string GetMachineId () const
 
int GetTeam () const
 
int32_t GetScore () const
 
uint32_t GetRank () const
 
uint32_t GetPPH () const
 
uint32_t GetKills () const
 
uint32_t GetDeaths () const
 
uint32_t GetSuicides () const
 
uint32_t GetTime () const
 
uint32_t GetLAVsDestroyed () const
 
uint32_t GetMAVsDestroyed () const
 
uint32_t GetHAVsDestroyed () const
 
uint32_t GetHelicoptersDestroyed () const
 
uint32_t GetPlanesDestroyed () const
 
uint32_t GetBoatsDestroyed () const
 
uint32_t GetKillsAssualtKit () const
 
uint32_t GetSpawnsAssualtKit () const
 
uint32_t GetKillsSniperKit () const
 
uint32_t GetSpawnsSniperKit () const
 
uint32_t GetKillsSpecialOpKit () const
 
uint32_t GetSpawnsSpecialOpKit () const
 
uint32_t GetKillsCombatEngineerKit () const
 
uint32_t GetSpawnsCombatEngineerKit () const
 
uint32_t GetKillsSupportKit () const
 
uint32_t GetSpawnsSupportKit () const
 
uint32_t GetTeamKills () const
 
uint32_t GetMedals () const
 
uint32_t GetTotalTopPlayer () const
 
uint32_t GetTotalVictories () const
 
uint32_t GetTotalGameSessions () const
 
uint32_t GetCapturedFlags () const
 
uint32_t GetNeutralizedFlags () const
 
uint32_t GetSavedFlags () const
 
bool IsDisabled () const
 
bool SetId (int id)
 
bool SetAuth (const std::string &auth)
 
bool SetProfileId (int pid)
 
bool SetProfileId (const std::string &str_pid)
 
bool SetMachineId (const std::string &machine_id)
 
bool SetTeam (int team)
 
bool SetTeam (const std::string &str_team)
 
bool SetScore (int32_t score)
 
bool SetScore (const std::string &str_score)
 
bool SetRank (uint32_t rank)
 
bool SetRank (const std::string &str_rank)
 
bool SetPPH (uint32_t pph)
 
bool SetPPH (const std::string &str_pph)
 
bool SetKills (uint32_t kills)
 
bool SetKills (const std::string &str_kills)
 
bool SetDeaths (uint32_t deaths)
 
bool SetDeaths (const std::string &str_deaths)
 
bool SetSuicides (uint32_t suicides)
 
bool SetSuicides (const std::string &str_suicides)
 
bool SetTime (uint32_t time)
 
bool SetTime (const std::string &str_time)
 
bool SetLAVsDestroyed (uint32_t lavd)
 
bool SetLAVsDestroyed (const std::string &str_lavd)
 
bool SetMAVsDestroyed (uint32_t mavd)
 
bool SetMAVsDestroyed (const std::string &str_mavd)
 
bool SetHAVsDestroyed (uint32_t havd)
 
bool SetHAVsDestroyed (const std::string &str_havd)
 
bool SetHelicoptersDestroyed (uint32_t hed)
 
bool SetHelicoptersDestroyed (const std::string &str_hed)
 
bool SetPlanesDestroyed (uint32_t pld)
 
bool SetPlanesDestroyed (const std::string &str_pld)
 
bool SetBoatsDestroyed (uint32_t bod)
 
bool SetBoatsDestroyed (const std::string &str_bod)
 
bool SetKillsAssualtKit (uint32_t kills)
 
bool SetKillsAssualtKit (const std::string &str_kills)
 
bool SetDeathsAssualtKit (uint32_t deaths)
 
bool SetDeathsAssualtKit (const std::string &str_deaths)
 
bool SetKillsSniperKit (uint32_t kills)
 
bool SetKillsSniperKit (const std::string &str_kills)
 
bool SetDeathsSniperKit (uint32_t deaths)
 
bool SetDeathsSniperKit (const std::string &str_deaths)
 
bool SetKillsSpecialOpKit (uint32_t kills)
 
bool SetKillsSpecialOpKit (const std::string &str_kills)
 
bool SetDeathsSpecialOpKit (uint32_t deaths)
 
bool SetDeathsSpecialOpKit (const std::string &str_deaths)
 
bool SetKillsCombatEngineerKit (uint32_t kills)
 
bool SetKillsCombatEngineerKit (const std::string &str_kills)
 
bool SetDeathsCombatEngineerKit (uint32_t deaths)
 
bool SetDeathsCombatEngineerKit (const std::string &str_deaths)
 
bool SetKillsSupportKit (uint32_t kills)
 
bool SetKillsSupportKit (const std::string &str_kills)
 
bool SetDeathsSupportKit (uint32_t deaths)
 
bool SetDeathsSupportKit (const std::string &str_deaths)
 
bool SetTeamKills (uint32_t tk)
 
bool SetTeamKills (const std::string &str_tk)
 
bool SetMedals (uint32_t medals)
 
bool SetMedals (const std::string &str_medals)
 
bool SetTotalTopPlayer (uint32_t ttb)
 
bool SetTotalTopPlayer (const std::string &str_ttb)
 
bool SetTotalVictories (uint32_t mv)
 
bool SetTotalVictories (const std::string &str_mv)
 
bool SetTotalGameSessions (uint32_t ngp)
 
bool SetTotalGameSessions (const std::string &str_ngp)
 
bool SetCapturedFlags (uint32_t cflags)
 
bool SetCapturedFlags (const std::string &str_cflags)
 
bool SetNeutralizedFlags (uint32_t nflags)
 
bool SetNeutralizedFlags (const std::string &str_nflags)
 
bool SetSavedFlags (uint32_t sflags)
 
bool SetSavedFlags (const std::string &str_sflags)
 
bool SetDisable (bool disable)
 
bool SetDisable (uint8_t disable)
 
void UpdatePlayerStats (Battlefield::GameStat &game_stat)
 Updates the player's statistics in the player stat class.
 
void Debug ()
 

Static Public Attributes

static std::unordered_map< std::string, SetterFunc > SetterMap
 

Private Attributes

int _id = -1
 
std::string _auth = ""
 
int _pid = -1
 
std::string _machine_id = ""
 
int _team = -1
 
int32_t _score = 0
 
uint32_t _rank = 1
 
uint32_t _pph = 0
 
uint32_t _kills = 0
 
uint32_t _deaths = 0
 
uint32_t _suicides = 0
 
uint32_t _time = 0
 
uint32_t _vehicles = 0
 
uint32_t _lavd = 0
 
uint32_t _mavd = 0
 
uint32_t _havd = 0
 
uint32_t _hed = 0
 
uint32_t _pld = 0
 
uint32_t _bod = 0
 
uint32_t _k1 = 0
 
uint32_t _s1 = 0
 
uint32_t _k2 = 0
 
uint32_t _s2 = 0
 
uint32_t _k3 = 0
 
uint32_t _s3 = 0
 
uint32_t _k4 = 0
 
uint32_t _s4 = 0
 
uint32_t _k5 = 0
 
uint32_t _s5 = 0
 
uint32_t _tk = 0
 
uint32_t _medals = 0
 
uint32_t _ttb = 0
 
uint32_t _mv = 0
 
uint32_t _ngp = 0
 
uint32_t _cflags = 0
 
uint32_t _nflags = 0
 
uint32_t _sflags = 0
 
bool _disable = false
 

Detailed Description

Represents a player's statistics in a game.

Definition at line 145 of file gamestat.h.

Member Data Documentation

◆ _auth

std::string Battlefield::GameStatPlayer::_auth = ""
private

The player's authentication token.

Definition at line 151 of file gamestat.h.

◆ _bod

uint32_t Battlefield::GameStatPlayer::_bod = 0
private

Total number of boats destroyed by the player.

Definition at line 170 of file gamestat.h.

◆ _cflags

uint32_t Battlefield::GameStatPlayer::_cflags = 0
private

Total captured flags by the player.

Definition at line 186 of file gamestat.h.

◆ _deaths

uint32_t Battlefield::GameStatPlayer::_deaths = 0
private

Total number of deaths by the player.

Definition at line 161 of file gamestat.h.

◆ _disable

bool Battlefield::GameStatPlayer::_disable = false
private

Disable option to not let player progress stats.

Definition at line 190 of file gamestat.h.

◆ _havd

uint32_t Battlefield::GameStatPlayer::_havd = 0
private

Total number of HAVs (Heavy Armored Vehicles) destroyed by the player.

Definition at line 167 of file gamestat.h.

◆ _hed

uint32_t Battlefield::GameStatPlayer::_hed = 0
private

Total number of helicopters destroyed by the player.

Definition at line 168 of file gamestat.h.

◆ _id

int Battlefield::GameStatPlayer::_id = -1
private

The ID of the player's game statistics.

Definition at line 148 of file gamestat.h.

◆ _k1

uint32_t Battlefield::GameStatPlayer::_k1 = 0
private

Total kills with Assault kit by the player.

Definition at line 171 of file gamestat.h.

◆ _k2

uint32_t Battlefield::GameStatPlayer::_k2 = 0
private

Total kills with Sniper kit by the player.

Definition at line 173 of file gamestat.h.

◆ _k3

uint32_t Battlefield::GameStatPlayer::_k3 = 0
private

Total kills with Special Op. kit by the player.

Definition at line 175 of file gamestat.h.

◆ _k4

uint32_t Battlefield::GameStatPlayer::_k4 = 0
private

Total kills with Combat Engineer kit by the player.

Definition at line 177 of file gamestat.h.

◆ _k5

uint32_t Battlefield::GameStatPlayer::_k5 = 0
private

Total kills with Support kit by the player.

Definition at line 179 of file gamestat.h.

◆ _kills

uint32_t Battlefield::GameStatPlayer::_kills = 0
private

Total number of kills by the player.

Definition at line 160 of file gamestat.h.

◆ _lavd

uint32_t Battlefield::GameStatPlayer::_lavd = 0
private

Total number of LAVs (Light Armored Vehicles) destroyed by the player.

Definition at line 165 of file gamestat.h.

◆ _machine_id

std::string Battlefield::GameStatPlayer::_machine_id = ""
private

The player's machine ID

Definition at line 153 of file gamestat.h.

◆ _mavd

uint32_t Battlefield::GameStatPlayer::_mavd = 0
private

Total number of MAVs (Medium Armored Vehicles) destroyed by the player.

Definition at line 166 of file gamestat.h.

◆ _medals

uint32_t Battlefield::GameStatPlayer::_medals = 0
private

Total earned medals and ribbons by the player (see enums Battlefield::Medals and Battlefield::Ribbons).

Definition at line 182 of file gamestat.h.

◆ _mv

uint32_t Battlefield::GameStatPlayer::_mv = 0
private

Total major victories achieved by the player.

Definition at line 184 of file gamestat.h.

◆ _nflags

uint32_t Battlefield::GameStatPlayer::_nflags = 0
private

Total neutralized flags by the player.

Definition at line 187 of file gamestat.h.

◆ _ngp

uint32_t Battlefield::GameStatPlayer::_ngp = 0
private

Total participated game sessions by the player.

Definition at line 185 of file gamestat.h.

◆ _pid

int Battlefield::GameStatPlayer::_pid = -1
private

The player's profile ID.

Definition at line 152 of file gamestat.h.

◆ _pld

uint32_t Battlefield::GameStatPlayer::_pld = 0
private

Total number of planes destroyed by the player (unimplemented).

Definition at line 169 of file gamestat.h.

◆ _pph

uint32_t Battlefield::GameStatPlayer::_pph = 0
private

Points per hour earned by the player.

Definition at line 159 of file gamestat.h.

◆ _rank

uint32_t Battlefield::GameStatPlayer::_rank = 1
private

Rank of the player (see enum Battlefield::Ranks).

Definition at line 158 of file gamestat.h.

◆ _s1

uint32_t Battlefield::GameStatPlayer::_s1 = 0
private

Total spawns with Assault kit by the player.

Definition at line 172 of file gamestat.h.

◆ _s2

uint32_t Battlefield::GameStatPlayer::_s2 = 0
private

Total spawns with Sniper kit by the player.

Definition at line 174 of file gamestat.h.

◆ _s3

uint32_t Battlefield::GameStatPlayer::_s3 = 0
private

Total spawns with Special Op. kit by the player.

Definition at line 176 of file gamestat.h.

◆ _s4

uint32_t Battlefield::GameStatPlayer::_s4 = 0
private

Total spawns with Combat Engineer kit by the player.

Definition at line 178 of file gamestat.h.

◆ _s5

uint32_t Battlefield::GameStatPlayer::_s5 = 0
private

Total spawns with Support kit by the player.

Definition at line 180 of file gamestat.h.

◆ _score

int32_t Battlefield::GameStatPlayer::_score = 0
private

Total score of the player.

Definition at line 157 of file gamestat.h.

◆ _sflags

uint32_t Battlefield::GameStatPlayer::_sflags = 0
private

Total saved flags by the player.

Definition at line 188 of file gamestat.h.

◆ _suicides

uint32_t Battlefield::GameStatPlayer::_suicides = 0
private

Total number of suicides by the player.

Definition at line 162 of file gamestat.h.

◆ _team

int Battlefield::GameStatPlayer::_team = -1
private

The team the player is on.

Definition at line 154 of file gamestat.h.

◆ _time

uint32_t Battlefield::GameStatPlayer::_time = 0
private

Total time played by the player in seconds.

Definition at line 163 of file gamestat.h.

◆ _tk

uint32_t Battlefield::GameStatPlayer::_tk = 0
private

Total team kills by the player (not used in game).

Definition at line 181 of file gamestat.h.

◆ _ttb

uint32_t Battlefield::GameStatPlayer::_ttb = 0
private

Total times top player by the player.

Definition at line 183 of file gamestat.h.

◆ _vehicles

uint32_t Battlefield::GameStatPlayer::_vehicles = 0
private

Total number of vehicles destroyed by the player.

Definition at line 164 of file gamestat.h.


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