Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_PlayerData Class Reference
Inheritance diagram for SCR_PlayerData:
JsonApiStruct

Protected Member Functions

void SCR_PlayerData (int id, bool hasPlayerBeenAuditted, bool requestFromBackend=true)
void SetTimeOut (int time)
 Called manually from the SCR_DataCollectorCrimesModule.
int GetTimeOut ()
void UpdateTrackingController (EInputDeviceType oldDevice, EInputDeviceType newDevice)
void SetPreviousStats (array< float > previousStats)
array< floatGetPreviousStats ()
void SetStats (array< float > stats)
array< floatGetStats ()
void RequestLoadData (bool HasPlayerBeenAuditted=false)
ScriptInvoker GetDataReadyInvoker ()
void BackendDataReady ()
void LoadEmptyProfile ()
sealed void StoreProfile ()
Managed GetDataEventStats ()
sealed void DebugCalculateStats ()
sealed void CalculateStatsChange ()
array< floatGetArrayEarntPoints ()
bool IsDataReady ()
bool IsDataProgressionReady ()
void FillArrayWithSpecializationPoints (inout array< float > SpPoints, bool newStats=true)
sealed array< floatCalculateStatsDifference ()
float GetSpecializationPoints (int n, bool newStats=true)
void AddPointsToSpecialization (int n, float value)
void PrepareSpecializationStatsDisplay ()
 This method sets the SCR_PlayerDataSpecializationDisplay arrays from the PlayerDataConfigs. Typically the Career Menu will use this.
void PrepareSpecializationProgressionStatsDisplay ()
 This method sets the SCR_PlayerDataSpecializationDisplay arrays from the PlayerDataConfigs. Typically the Debrief screen will use this.
bool IsEmptyProfile ()
void AddStat (SCR_EDataStats stat, float amount=1, bool temp=true)
void OverrideStat (SCR_EDataStats stat, float amount=1)
float GetStat (SCR_EDataStats stat, bool newStat=true)
int GetAccumulatedActionsTick ()
int GetLatestActionTick ()
int GetLatestCriminalScoreUpdateTick ()
SCR_PlayerDataConfigs GetConfigs ()
array< floatGetAccumulatedActions ()
float GetCriminalScore ()
void SetCriminalScore (float score)
void ResetAccumulatedActions ()
void CalculateSessionDuration ()
float GetSpecializationCount (int n)

Static Protected Member Functions

static SCR_PlayerData GetPlayerData (int playerID)

Protected Attributes

int m_iPlayerID
ref array< floatm_aStats = {}
int m_iSecondsAsController = 0
int m_iSecondsAsKeyboard = 0
int m_iLastEvaluationCurrentController = 0
ref array< floatm_aPreviousStats = {}
ref array< floatm_aAccumulatedActions = {}
int m_iAccumulatedActionsTick
int m_iLatestActionTick
int m_iLatestCriminalScoreUpdateTick
float m_fCriminalScore
int m_iTimeOut = 0
ref array< floatm_aStatsGained = {}
ref SCR_PlayerDataEvent dataEvent = new SCR_PlayerDataEvent
ref array< floatm_aEarnt = {}
ref BackendCallback m_CharacterDataCallback = new BackendCallback()
ref BackendCallback m_StoringCallback = new BackendCallback()
int m_iSessionStartedTickCount
bool m_bIsEmptyProfile
ref ScriptInvoker m_OnDataReady = new ScriptInvoker()
ref SCR_PlayerDataConfigs m_Configs
bool accumulationEnabled = false

Static Protected Attributes

static ref ScriptInvoker s_OnStatAdded = new ScriptInvoker()

Detailed Description

Definition at line 2 of file SCR_PlayerData.c.

Constructor & Destructor Documentation

◆ SCR_PlayerData()

void SCR_PlayerData::SCR_PlayerData ( int id,
bool hasPlayerBeenAuditted,
bool requestFromBackend = true )
inlineprotected

Definition at line 96 of file SCR_PlayerData.c.

Member Function Documentation

◆ AddPointsToSpecialization()

void SCR_PlayerData::AddPointsToSpecialization ( int n,
float value )
inlineprotected

Definition at line 696 of file SCR_PlayerData.c.

◆ AddStat()

void SCR_PlayerData::AddStat ( SCR_EDataStats stat,
float amount = 1,
bool temp = true )
inlineprotected

temp: True: The stat should be added to temporary actions that might be evaluated further by a module False: The stat is final. Add it to this player session's stats

Definition at line 785 of file SCR_PlayerData.c.

◆ BackendDataReady()

void SCR_PlayerData::BackendDataReady ( )
inlineprotected

Definition at line 245 of file SCR_PlayerData.c.

◆ CalculateSessionDuration()

void SCR_PlayerData::CalculateSessionDuration ( )
inlineprotected

Definition at line 885 of file SCR_PlayerData.c.

◆ CalculateStatsChange()

sealed void SCR_PlayerData::CalculateStatsChange ( )
inlineprotected

Definition at line 409 of file SCR_PlayerData.c.

◆ CalculateStatsDifference()

sealed array< float > SCR_PlayerData::CalculateStatsDifference ( )
inlineprotected

Definition at line 641 of file SCR_PlayerData.c.

◆ DebugCalculateStats()

sealed void SCR_PlayerData::DebugCalculateStats ( )
inlineprotected

Definition at line 387 of file SCR_PlayerData.c.

◆ FillArrayWithSpecializationPoints()

void SCR_PlayerData::FillArrayWithSpecializationPoints ( inout array< float > SpPoints,
bool newStats = true )
inlineprotected

Definition at line 632 of file SCR_PlayerData.c.

◆ GetAccumulatedActions()

array< float > SCR_PlayerData::GetAccumulatedActions ( )
inlineprotected

Definition at line 852 of file SCR_PlayerData.c.

◆ GetAccumulatedActionsTick()

int SCR_PlayerData::GetAccumulatedActionsTick ( )
inlineprotected

Definition at line 829 of file SCR_PlayerData.c.

◆ GetArrayEarntPoints()

array< float > SCR_PlayerData::GetArrayEarntPoints ( )
inlineprotected

Definition at line 614 of file SCR_PlayerData.c.

◆ GetConfigs()

SCR_PlayerDataConfigs SCR_PlayerData::GetConfigs ( )
inlineprotected

Definition at line 846 of file SCR_PlayerData.c.

◆ GetCriminalScore()

float SCR_PlayerData::GetCriminalScore ( )
inlineprotected

Definition at line 860 of file SCR_PlayerData.c.

◆ GetDataEventStats()

Managed SCR_PlayerData::GetDataEventStats ( )
inlineprotected

Definition at line 318 of file SCR_PlayerData.c.

◆ GetDataReadyInvoker()

ScriptInvoker SCR_PlayerData::GetDataReadyInvoker ( )
inlineprotected

Definition at line 239 of file SCR_PlayerData.c.

◆ GetLatestActionTick()

int SCR_PlayerData::GetLatestActionTick ( )
inlineprotected

Definition at line 835 of file SCR_PlayerData.c.

◆ GetLatestCriminalScoreUpdateTick()

int SCR_PlayerData::GetLatestCriminalScoreUpdateTick ( )
inlineprotected

Definition at line 840 of file SCR_PlayerData.c.

◆ GetPlayerData()

SCR_PlayerData SCR_PlayerData::GetPlayerData ( int playerID)
inlinestaticprotected

Definition at line 131 of file SCR_PlayerData.c.

◆ GetPreviousStats()

array< float > SCR_PlayerData::GetPreviousStats ( )
inlineprotected

Definition at line 177 of file SCR_PlayerData.c.

◆ GetSpecializationCount()

float SCR_PlayerData::GetSpecializationCount ( int n)
inlineprotected

Definition at line 904 of file SCR_PlayerData.c.

◆ GetSpecializationPoints()

float SCR_PlayerData::GetSpecializationPoints ( int n,
bool newStats = true )
inlineprotected

Definition at line 657 of file SCR_PlayerData.c.

◆ GetStat()

float SCR_PlayerData::GetStat ( SCR_EDataStats stat,
bool newStat = true )
inlineprotected

Definition at line 816 of file SCR_PlayerData.c.

◆ GetStats()

array< float > SCR_PlayerData::GetStats ( )
inlineprotected

Definition at line 191 of file SCR_PlayerData.c.

◆ GetTimeOut()

int SCR_PlayerData::GetTimeOut ( )
inlineprotected

Definition at line 144 of file SCR_PlayerData.c.

◆ IsDataProgressionReady()

bool SCR_PlayerData::IsDataProgressionReady ( )
inlineprotected

Definition at line 626 of file SCR_PlayerData.c.

◆ IsDataReady()

bool SCR_PlayerData::IsDataReady ( )
inlineprotected

Definition at line 620 of file SCR_PlayerData.c.

◆ IsEmptyProfile()

bool SCR_PlayerData::IsEmptyProfile ( )
inlineprotected

Definition at line 769 of file SCR_PlayerData.c.

◆ LoadEmptyProfile()

void SCR_PlayerData::LoadEmptyProfile ( )
inlineprotected

Definition at line 268 of file SCR_PlayerData.c.

◆ OverrideStat()

void SCR_PlayerData::OverrideStat ( SCR_EDataStats stat,
float amount = 1 )
inlineprotected

Definition at line 808 of file SCR_PlayerData.c.

◆ PrepareSpecializationProgressionStatsDisplay()

void SCR_PlayerData::PrepareSpecializationProgressionStatsDisplay ( )
inlineprotected

This method sets the SCR_PlayerDataSpecializationDisplay arrays from the PlayerDataConfigs. Typically the Debrief screen will use this.

Definition at line 741 of file SCR_PlayerData.c.

◆ PrepareSpecializationStatsDisplay()

void SCR_PlayerData::PrepareSpecializationStatsDisplay ( )
inlineprotected

This method sets the SCR_PlayerDataSpecializationDisplay arrays from the PlayerDataConfigs. Typically the Career Menu will use this.

Definition at line 718 of file SCR_PlayerData.c.

◆ RequestLoadData()

void SCR_PlayerData::RequestLoadData ( bool HasPlayerBeenAuditted = false)
inlineprotected

Definition at line 197 of file SCR_PlayerData.c.

◆ ResetAccumulatedActions()

void SCR_PlayerData::ResetAccumulatedActions ( )
inlineprotected

Definition at line 873 of file SCR_PlayerData.c.

◆ SetCriminalScore()

void SCR_PlayerData::SetCriminalScore ( float score)
inlineprotected

Definition at line 866 of file SCR_PlayerData.c.

◆ SetPreviousStats()

void SCR_PlayerData::SetPreviousStats ( array< float > previousStats)
inlineprotected

Overrides previous stats array with the provided one To be used on clients only!

Definition at line 171 of file SCR_PlayerData.c.

◆ SetStats()

void SCR_PlayerData::SetStats ( array< float > stats)
inlineprotected

Overrides stats array with the provided one To be used on clients only!

Definition at line 185 of file SCR_PlayerData.c.

◆ SetTimeOut()

void SCR_PlayerData::SetTimeOut ( int time)
inlineprotected

Called manually from the SCR_DataCollectorCrimesModule.

Definition at line 138 of file SCR_PlayerData.c.

◆ StoreProfile()

sealed void SCR_PlayerData::StoreProfile ( )
inlineprotected

Definition at line 293 of file SCR_PlayerData.c.

◆ UpdateTrackingController()

void SCR_PlayerData::UpdateTrackingController ( EInputDeviceType oldDevice,
EInputDeviceType newDevice )
inlineprotected

Definition at line 150 of file SCR_PlayerData.c.

Member Data Documentation

◆ accumulationEnabled

bool SCR_PlayerData::accumulationEnabled = false
protected

Definition at line 93 of file SCR_PlayerData.c.

◆ dataEvent

ref SCR_PlayerDataEvent SCR_PlayerData::dataEvent = new SCR_PlayerDataEvent
protected

DataEvent to send stats to the database for tracking purposes

Definition at line 49 of file SCR_PlayerData.c.

◆ m_aAccumulatedActions

ref array<float> SCR_PlayerData::m_aAccumulatedActions = {}
protected

Possibly criminal stats - We use this to accumulate actions and afterwards decide whether they are criminal or not.

Definition at line 26 of file SCR_PlayerData.c.

◆ m_aEarnt

ref array<float> SCR_PlayerData::m_aEarnt = {}
protected

We store in m_aEarnt the number of points provided by each of the fields to the specializations, and the total sum for each specialization in the corresponding field (sp0, sp1, etc)

Definition at line 55 of file SCR_PlayerData.c.

◆ m_aPreviousStats

ref array<float> SCR_PlayerData::m_aPreviousStats = {}
protected

Original stats

Definition at line 20 of file SCR_PlayerData.c.

◆ m_aStats

ref array<float> SCR_PlayerData::m_aStats = {}
protected

Stats that we keep updating

Definition at line 10 of file SCR_PlayerData.c.

◆ m_aStatsGained

ref array<float> SCR_PlayerData::m_aStatsGained = {}
protected

Stats difference - We need this variable because we need a pointer for it to be used on TD from C++ side

Definition at line 43 of file SCR_PlayerData.c.

◆ m_bIsEmptyProfile

bool SCR_PlayerData::m_bIsEmptyProfile
protected

Empty Profile

Definition at line 74 of file SCR_PlayerData.c.

◆ m_CharacterDataCallback

ref BackendCallback SCR_PlayerData::m_CharacterDataCallback = new BackendCallback()
protected

Backend callbacks necessary to make the request to load and store the characterdata from the player's profile

Definition at line 61 of file SCR_PlayerData.c.

◆ m_Configs

ref SCR_PlayerDataConfigs SCR_PlayerData::m_Configs
protected

Stats configs

Definition at line 88 of file SCR_PlayerData.c.

◆ m_fCriminalScore

float SCR_PlayerData::m_fCriminalScore
protected

Definition at line 30 of file SCR_PlayerData.c.

◆ m_iAccumulatedActionsTick

int SCR_PlayerData::m_iAccumulatedActionsTick
protected

Definition at line 27 of file SCR_PlayerData.c.

◆ m_iLastEvaluationCurrentController

int SCR_PlayerData::m_iLastEvaluationCurrentController = 0
protected

Definition at line 14 of file SCR_PlayerData.c.

◆ m_iLatestActionTick

int SCR_PlayerData::m_iLatestActionTick
protected

Definition at line 28 of file SCR_PlayerData.c.

◆ m_iLatestCriminalScoreUpdateTick

int SCR_PlayerData::m_iLatestCriminalScoreUpdateTick
protected

Definition at line 29 of file SCR_PlayerData.c.

◆ m_iPlayerID

int SCR_PlayerData::m_iPlayerID
protected

Definition at line 4 of file SCR_PlayerData.c.

◆ m_iSecondsAsController

int SCR_PlayerData::m_iSecondsAsController = 0
protected

Definition at line 13 of file SCR_PlayerData.c.

◆ m_iSecondsAsKeyboard

int SCR_PlayerData::m_iSecondsAsKeyboard = 0
protected

Definition at line 13 of file SCR_PlayerData.c.

◆ m_iSessionStartedTickCount

int SCR_PlayerData::m_iSessionStartedTickCount
protected

Starting session tick to calculate session duration

Definition at line 68 of file SCR_PlayerData.c.

◆ m_iTimeOut

int SCR_PlayerData::m_iTimeOut = 0
protected

TimeOut in case the player is kicked or banned on the current session for notification purposes

Definition at line 36 of file SCR_PlayerData.c.

◆ m_OnDataReady

ref ScriptInvoker SCR_PlayerData::m_OnDataReady = new ScriptInvoker()
protected

Invoker that notifies UI screens listening to it that the data object is ready

Definition at line 80 of file SCR_PlayerData.c.

◆ m_StoringCallback

ref BackendCallback SCR_PlayerData::m_StoringCallback = new BackendCallback()
protected

Definition at line 62 of file SCR_PlayerData.c.

◆ s_OnStatAdded

ref ScriptInvoker SCR_PlayerData::s_OnStatAdded = new ScriptInvoker()
staticprotected

Definition at line 82 of file SCR_PlayerData.c.


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