23 #ifndef INC_C4RoundResults
24 #define INC_C4RoundResults
44 uint32_t iTotalPlayingTime{0};
45 int32_t iScoreOld{-1}, iScoreNew{-1};
49 int32_t iLeagueScoreNew{-1};
50 int32_t iLeagueScoreGain{0};
51 int32_t iLeagueRankNew{0};
52 int32_t iLeagueRankSymbolNew{0};
53 int32_t iLeaguePerformance{0};
57 RRPLS_Unknown=0, RRPLS_Lost, RRPLS_Won
58 } eLeagueStatus{RRPLS_Unknown};
66 int32_t
GetID()
const {
return id; }
84 void SetID(int32_t idNew) { this->
id=idNew; }
98 int32_t iPlayerCount{0}, iPlayerCapacity{0};
110 void GrowList(
size_t iByVal);
142 uint32_t iPlayingTime{0};
143 int32_t iLeaguePerformance;
144 bool fHideSettlementScore;
#define C4CFN_RoundResults
C4PacketLeagueRoundResults(const char *szResultsString, bool fSuccess)
C4PacketLeagueRoundResults(const char *szResultsString, bool fSuccess, const C4RoundResultsPlayers &Players)
void CompileFunc(StdCompiler *pComp) override
C4PacketLeagueRoundResults()=default
C4RoundResultsPlayers Players
StdCopyStrBuf sResultsString
void EvaluatePlayer(C4Player *pPlr)
void EvaluateLeague(const char *szResultMsg, bool fSuccess, const C4RoundResultsPlayers &rLeagueInfo)
const char * GetNetResultString() const
bool Save(C4Group &hGroup, const char *szFilename=C4CFN_RoundResults)
void EvaluateNetwork(NetResult eResult, const char *szResultsString)
void CompileFunc(StdCompiler *pComp)
bool Load(C4Group &hGroup, const char *szFilename=C4CFN_RoundResults)
bool HasNetResult() const
const C4RoundResultsPlayers & GetPlayers() const
const char * GetCustomEvaluationStrings() const
static void EvaluateGoals(C4IDList &GoalList, C4IDList &FulfilledGoalList, int32_t iPlayerNumber)
void HideSettlementScore(bool fHide=true)
void AddCustomEvaluationString(const char *szCustomString, int32_t idPlayer)
void SetLeaguePerformance(int32_t iNewPerf, int32_t idPlayer=0)
const C4IDList & GetFulfilledGoals() const
StdCopyStrBuf GetStatistics() const
int32_t GetLeaguePerformance(int32_t idPlayer=0) const
const C4IDList & GetGoals() const
NetResult GetNetResult() const
bool SettlementScoreIsHidden()
void SetLeaguePerformance(int32_t iNewPerf)
void EvaluatePlayer(C4Player *pPlr)
int32_t GetScoreNew() const
C4RoundResultsPlayer(const C4RoundResultsPlayer &cpy)
bool IsLeagueScoreNewValid() const
int32_t GetLeagueRankNew() const
int32_t GetLeagueScoreGain() const
int32_t GetScoreOld() const
bool IsScoreOldValid() const
uint32_t GetTotalPlayingTime() const
bool operator==(const C4RoundResultsPlayer &cmp)
void AddCustomEvaluationString(const char *szCustomString)
const char * GetCustomEvaluationStrings()
bool IsScoreNewValid() const
C4RoundResultsPlayer & operator=(const C4RoundResultsPlayer &cpy)
void EvaluateLeague(C4RoundResultsPlayer *pLeaguePlayer)
int32_t GetLeagueRankSymbolNew() const
int32_t GetLeagueScoreNew() const
int32_t GetLeaguePerformance() const
void SetID(int32_t idNew)
void CompileFunc(StdCompiler *pComp)
C4RoundResultsPlayer * GetCreateByID(int32_t id)
C4RoundResultsPlayers & operator=(const C4RoundResultsPlayers &cpy)
C4RoundResultsPlayers()=default
C4RoundResultsPlayers(const C4RoundResultsPlayers &cpy)
bool operator==(const C4RoundResultsPlayers &cmp)
C4RoundResultsPlayer * GetByID(int32_t id) const
void Add(C4RoundResultsPlayer *pNewPlayer)
C4RoundResultsPlayer * GetByIndex(int32_t idx) const
void CompileFunc(StdCompiler *pComp)
const char * getData() const