DayZ 1.24
Loading...
Searching...
No Matches
PlayerStatsPCO.c File Reference

Go to the source code of this file.

Classes

class  PCOHandlerStats
 
class  PlayerStatsPCO_Base
 
class  PlayerStatsPCO_v115
 

Enumerations

enum  EPlayerStats_v100 {
  HEATCOMFORT , TREMOR , WET , ENERGY ,
  WATER , STOMACH_SOLID , STOMACH_ENERGY , STOMACH_WATER ,
  DIET , STAMINA , SPECIALTY , BLOODTYPE
}
 
enum  EPlayerStats_v101 {
  HEATCOMFORT , TREMOR , WET , ENERGY ,
  WATER , STOMACH_SOLID , STOMACH_ENERGY , STOMACH_WATER ,
  DIET , STAMINA , SPECIALTY , BLOODTYPE ,
  TOXICITY
}
 
enum  EPlayerStats_v106 {
  HEATCOMFORT , TREMOR , WET , ENERGY ,
  WATER , DIET , STAMINA , SPECIALTY ,
  BLOODTYPE , TOXICITY
}
 
enum  EPlayerStats_v115 {
  HEATCOMFORT , TREMOR , WET , ENERGY ,
  WATER , DIET , STAMINA , SPECIALTY ,
  BLOODTYPE , TOXICITY , HEATBUFFER
}
 
enum  EPlayerStats_current : EPlayerStats_v115
 

Functions

void PCOHandlerStats ()
 
void RegisterPCO (PlayerStatsPCO_Base pco)
 
PlayerStatsPCO_Base GetPCO (int version=-1)
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
 
int GetVersion ()
 
PlayerStatBase GetStatObject (int id)
 
void RegisterStat (int id, PlayerStatBase stat)
 
void OnStoreSave (ParamsWriteContext ctx)
 
bool OnStoreLoad (ParamsReadContext ctx)
 
array< ref PlayerStatBaseGet ()
 
void ResetAllStats ()
 

Variables

ref map< int, ref PlayerStatsPCO_Basem_PCOs = new map<int, ref PlayerStatsPCO_Base>
 
int m_HighestVersion
 
ref array< ref PlayerStatBasem_PlayerStats = new array<ref PlayerStatBase>
 
enum EPlayerStats_v100 PlayerStatsPCO_Base
 

Enumeration Type Documentation

◆ EPlayerStats_current

Definition at line 285 of file PlayerStatsPCO.c.

286{
287
288};

◆ EPlayerStats_v100

Enumerator
HEATCOMFORT 
TREMOR 
WET 
ENERGY 
WATER 
STOMACH_SOLID 
STOMACH_ENERGY 
STOMACH_WATER 
DIET 
STAMINA 
SPECIALTY 
BLOODTYPE 

Definition at line 110 of file PlayerStatsPCO.c.

111{
113 TREMOR,
114 WET,
115 ENERGY,
116 WATER,
120 DIET,
121 STAMINA,
122 SPECIALTY,
123 BLOODTYPE,
124};
@ ENERGY
@ BLOODTYPE
@ STAMINA
@ DIET
@ HEATCOMFORT
@ TREMOR
@ SPECIALTY
@ WET
@ WATER
@ STOMACH_SOLID
@ STOMACH_ENERGY
@ STOMACH_WATER

◆ EPlayerStats_v101

Enumerator
HEATCOMFORT 
TREMOR 
WET 
ENERGY 
WATER 
STOMACH_SOLID 
STOMACH_ENERGY 
STOMACH_WATER 
DIET 
STAMINA 
SPECIALTY 
BLOODTYPE 
TOXICITY 

Definition at line 161 of file PlayerStatsPCO.c.

162{
164 TREMOR,
165 WET,
166 ENERGY,
167 WATER,
171 DIET,
172 STAMINA,
173 SPECIALTY,
174 BLOODTYPE,
175 TOXICITY,
176};
@ TOXICITY

◆ EPlayerStats_v106

Enumerator
HEATCOMFORT 
TREMOR 
WET 
ENERGY 
WATER 
DIET 
STAMINA 
SPECIALTY 
BLOODTYPE 
TOXICITY 

Definition at line 205 of file PlayerStatsPCO.c.

206{
208 TREMOR,
209 WET,
210 ENERGY,
211 WATER,
212 DIET,
213 STAMINA,
214 SPECIALTY,
215 BLOODTYPE,
216 TOXICITY,
217};

◆ EPlayerStats_v115

Enumerator
HEATCOMFORT 
TREMOR 
WET 
ENERGY 
WATER 
DIET 
STAMINA 
SPECIALTY 
BLOODTYPE 
TOXICITY 
HEATBUFFER 

Definition at line 242 of file PlayerStatsPCO.c.

243{
245 TREMOR,
246 WET,
247 ENERGY,
248 WATER,
249 DIET,
250 STAMINA,
251 SPECIALTY,
252 BLOODTYPE,
253 TOXICITY,
255};
@ HEATBUFFER

Function Documentation

◆ Get()

◆ GetPCO()

PlayerStatsPCO_Base PlayerStatsPCO_Base::GetPCO ( int version = -1)

Definition at line 75 of file PlayerStatsPCO.c.

80 {
81 for (int i = 0; i < m_PlayerStats.Count(); i++)
82 m_PlayerStats.Get(i).OnStoreSave(ctx);
83 }
84
86 {
87 for (int i = 0; i < m_PlayerStats.Count(); i++)
88 {
89 if (!m_PlayerStats.Get(i).OnStoreLoad(ctx))
90 return false;
91 }
92 return true;
93 }
94
96 {
97 return m_PlayerStats;
98 }
array< ref PlayerStatBase > Get()
bool OnStoreLoad(ParamsReadContext ctx)
Serialization general interface. Serializer API works with:
Definition Serializer.c:56

◆ GetStatObject()

◆ GetVersion()

int GetVersion ( )

Definition at line 61 of file PlayerStatsPCO.c.

62 {
63 return -1;
64 }

◆ Init()

void Init ( )

Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)

pre-init arrays

Definition at line 120 of file DayZGame.c.

121 {
122 layoutRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/dialog_queue_position.layout");
123 m_HintPanel = new UiHintPanelLoading(layoutRoot.FindAnyWidget("hint_frame0"));
124 m_txtPosition = TextWidget.Cast(layoutRoot.FindAnyWidget("txtPosition"));
125 m_txtNote = TextWidget.Cast(layoutRoot.FindAnyWidget("txtNote"));
126 m_btnLeave = ButtonWidget.Cast(layoutRoot.FindAnyWidget("btnLeave"));
127 m_txtNote.Show(true);
128 layoutRoot.FindAnyWidget("notification_root").Show(false);
129
130#ifdef PLATFORM_CONSOLE
131 layoutRoot.FindAnyWidget("toolbar_bg").Show(true);
132 RichTextWidget toolbar_b = RichTextWidget.Cast(layoutRoot.FindAnyWidget("BackIcon"));
134#ifdef PLATFORM_XBOX
135#ifdef BUILD_EXPERIMENTAL
136 layoutRoot.FindAnyWidget("notification_root").Show(true);
137#endif
138#endif
139#endif
140
141 return layoutRoot;
142 }
ref UiHintPanelLoading m_HintPanel
Definition DayZGame.c:676
ButtonWidget m_btnLeave
Definition DayZGame.c:107
class LoginScreenBase extends UIScriptedMenu m_txtPosition
TextWidget m_txtNote
Definition DayZGame.c:106
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Definition InputUtils.c:151
static const float ICON_SCALE_TOOLBAR
Definition InputUtils.c:15
proto native CGame GetGame()

◆ OnStoreLoad()

bool OnStoreLoad ( ParamsReadContext ctx)

Definition at line 85 of file PlayerStatsPCO.c.

86 {
87 for (int i = 0; i < m_PlayerStats.Count(); i++)
88 {
89 if (!m_PlayerStats.Get(i).OnStoreLoad(ctx))
90 return false;
91 }
92 return true;
93 }

References m_PlayerStats.

◆ OnStoreSave()

void OnStoreSave ( ParamsWriteContext ctx)

Definition at line 79 of file PlayerStatsPCO.c.

80 {
81 for (int i = 0; i < m_PlayerStats.Count(); i++)
82 m_PlayerStats.Get(i).OnStoreSave(ctx);
83 }

References m_PlayerStats.

◆ PCOHandlerStats()

void PlayerStatsPCO_Base::PCOHandlerStats ( )

Definition at line 58 of file PlayerStatsPCO.c.

62 {
63 return -1;

◆ RegisterPCO()

void PlayerStatsPCO_Base::RegisterPCO ( PlayerStatsPCO_Base pco)

Definition at line 65 of file PlayerStatsPCO.c.

69 {
70 return m_PlayerStats.Get(id);
71 }
72
73 void RegisterStat(int id, PlayerStatBase stat)
void RegisterStat(int id, PlayerStatBase stat)

◆ RegisterStat()

void RegisterStat ( int id,
PlayerStatBase stat )

Definition at line 73 of file PlayerStatsPCO.c.

74 {
75 m_PlayerStats.InsertAt(stat, id);
76 stat.Init(id/*, this*/);
77 }

Referenced by PlayerStatsPCO_Base::Init().

◆ ResetAllStats()

void ResetAllStats ( )

Definition at line 100 of file PlayerStatsPCO.c.

101 {
102 m_PlayerStats.Clear();
103 Init();
104 }
void Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...
Definition DayZGame.c:120

References PlayerStatsPCO_Base::Init(), and m_PlayerStats.

Variable Documentation

◆ m_HighestVersion

int m_HighestVersion

Definition at line 56 of file PlayerStatsPCO.c.

◆ m_PCOs

Definition at line 55 of file PlayerStatsPCO.c.

◆ m_PlayerStats

◆ PlayerStatsPCO_Base

class PCOHandlerStats PlayerStatsPCO_Base

Definition at line 1 of file PlayerStatsPCO.c.

55 {
56 Init();
57 }