DDraceNetwork Documentation
Loading...
Searching...
No Matches
CScore Class Reference

#include <score.h>

Collaboration diagram for CScore:
[legend]

Public Member Functions

 CScore (CGameContext *pGameServer, CDbConnectionPool *pPool)
CPlayerDataPlayerData (int Id)
void LoadBestTime ()
void MapInfo (int ClientId, const char *pMapName)
void MapVote (int ClientId, const char *pMapName)
void LoadPlayerData (int ClientId, const char *pName="")
void LoadPlayerTimeCp (int ClientId, const char *pName="")
void SaveScore (int ClientId, int TimeTicks, const char *pTimestamp, const float aTimeCp[NUM_CHECKPOINTS], bool NotEligible)
void SaveTeamScore (int Team, int *pClientIds, unsigned int Size, int TimeTicks, const char *pTimestamp)
void ShowTop (int ClientId, int Offset=1)
void ShowRank (int ClientId, const char *pName)
void ShowTeamTop5 (int ClientId, int Offset=1)
void ShowPlayerTeamTop5 (int ClientId, const char *pName, int Offset=1)
void ShowTeamRank (int ClientId, const char *pName)
void ShowTopPoints (int ClientId, int Offset=1)
void ShowPoints (int ClientId, const char *pName)
void ShowTimes (int ClientId, const char *pName, int Offset=1)
void ShowTimes (int ClientId, int Offset=1)
void RandomMap (int ClientId, int MinStars, int MaxStars)
void RandomUnfinishedMap (int ClientId, int MinStars, int MaxStars)
void SaveTeam (int ClientId, const char *pCode, const char *pServer)
void LoadTeam (const char *pCode, int ClientId)
void GetSaves (int ClientId)

Private Member Functions

CGameContextGameServer () const
IServerServer () const
void GeneratePassphrase (char *pBuf, int BufSize)
std::shared_ptr< CScorePlayerResultNewSqlPlayerResult (int ClientId)
void ExecPlayerThread (bool(*pFuncPtr)(IDbConnection *, const ISqlData *, char *pError, int ErrorSize), const char *pThreadName, int ClientId, const char *pName, int Offset)
bool RateLimitPlayer (int ClientId)

Private Attributes

CPlayerData m_aPlayerData [MAX_CLIENTS]
CDbConnectionPoolm_pPool
CGameContextm_pGameServer
IServerm_pServer
std::vector< std::string > m_vWordlist
CPrng m_Prng

Constructor & Destructor Documentation

◆ CScore()

CScore::CScore ( CGameContext * pGameServer,
CDbConnectionPool * pPool )

Member Function Documentation

◆ ExecPlayerThread()

void CScore::ExecPlayerThread ( bool(* pFuncPtr )(IDbConnection *, const ISqlData *, char *pError, int ErrorSize),
const char * pThreadName,
int ClientId,
const char * pName,
int Offset )
private

◆ GameServer()

CGameContext * CScore::GameServer ( ) const
inlineprivate

◆ GeneratePassphrase()

void CScore::GeneratePassphrase ( char * pBuf,
int BufSize )
private

◆ GetSaves()

void CScore::GetSaves ( int ClientId)

◆ LoadBestTime()

void CScore::LoadBestTime ( )

◆ LoadPlayerData()

void CScore::LoadPlayerData ( int ClientId,
const char * pName = "" )

◆ LoadPlayerTimeCp()

void CScore::LoadPlayerTimeCp ( int ClientId,
const char * pName = "" )

◆ LoadTeam()

void CScore::LoadTeam ( const char * pCode,
int ClientId )

◆ MapInfo()

void CScore::MapInfo ( int ClientId,
const char * pMapName )

◆ MapVote()

void CScore::MapVote ( int ClientId,
const char * pMapName )

◆ NewSqlPlayerResult()

std::shared_ptr< CScorePlayerResult > CScore::NewSqlPlayerResult ( int ClientId)
private

◆ PlayerData()

CPlayerData * CScore::PlayerData ( int Id)
inline

◆ RandomMap()

void CScore::RandomMap ( int ClientId,
int MinStars,
int MaxStars )

◆ RandomUnfinishedMap()

void CScore::RandomUnfinishedMap ( int ClientId,
int MinStars,
int MaxStars )

◆ RateLimitPlayer()

bool CScore::RateLimitPlayer ( int ClientId)
private

◆ SaveScore()

void CScore::SaveScore ( int ClientId,
int TimeTicks,
const char * pTimestamp,
const float aTimeCp[NUM_CHECKPOINTS],
bool NotEligible )

◆ SaveTeam()

void CScore::SaveTeam ( int ClientId,
const char * pCode,
const char * pServer )

◆ SaveTeamScore()

void CScore::SaveTeamScore ( int Team,
int * pClientIds,
unsigned int Size,
int TimeTicks,
const char * pTimestamp )

◆ Server()

IServer * CScore::Server ( ) const
inlineprivate

◆ ShowPlayerTeamTop5()

void CScore::ShowPlayerTeamTop5 ( int ClientId,
const char * pName,
int Offset = 1 )

◆ ShowPoints()

void CScore::ShowPoints ( int ClientId,
const char * pName )

◆ ShowRank()

void CScore::ShowRank ( int ClientId,
const char * pName )

◆ ShowTeamRank()

void CScore::ShowTeamRank ( int ClientId,
const char * pName )

◆ ShowTeamTop5()

void CScore::ShowTeamTop5 ( int ClientId,
int Offset = 1 )

◆ ShowTimes() [1/2]

void CScore::ShowTimes ( int ClientId,
const char * pName,
int Offset = 1 )

◆ ShowTimes() [2/2]

void CScore::ShowTimes ( int ClientId,
int Offset = 1 )

◆ ShowTop()

void CScore::ShowTop ( int ClientId,
int Offset = 1 )

◆ ShowTopPoints()

void CScore::ShowTopPoints ( int ClientId,
int Offset = 1 )

Member Data Documentation

◆ m_aPlayerData

CPlayerData CScore::m_aPlayerData[MAX_CLIENTS]
private

◆ m_pGameServer

CGameContext* CScore::m_pGameServer
private

◆ m_pPool

CDbConnectionPool* CScore::m_pPool
private

◆ m_Prng

CPrng CScore::m_Prng
private

◆ m_pServer

IServer* CScore::m_pServer
private

◆ m_vWordlist

std::vector<std::string> CScore::m_vWordlist
private

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