DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
PlayerStats.c
См. документацию.
2{
3 EMPTY = 0,
4 SYNCED = 1,
5}
6
7class PlayerStats
8{
11
13
17 string m_System = "Stats"; //debuging tag
18
19 void PlayerStats(Man player)
20 {
21 Init(player);
22 m_PCOhandler = new PCOHandlerStats(player);
23 }
24
25 void Init(Man player)
26 {
27 m_Player = player;
28 }
29
30 PlayerStatsPCO_Base GetPCO(int version = -1 )
31 {
32 return m_PCOhandler.GetPCO(version);
33 }
34
36 {
37 //if( GetGame() && GetGame().IsDebugActions() ) GatherAllRecords();
38 }
39
40
42 {
44 if ( pco )
45 {
46 return pco.GetStatObject(id);
47 }
48 else
49 {
50 return null;
51 }
52 }
53
54 void SetAllowLogs(bool enable)
55 {
56 m_AllowLogs = enable;
57 }
58
60 {
61 return m_AllowLogs;
62 }
63
64 void GetDebugInfo( array<ref StatDebugObject> objects, int flags )
65 {
66 /*
67 for(int i = 0; i < m_PlayerStats.Count(); i++)
68 {
69 m_PlayerStats.Get(i).SerializeValue(objects, flags);
70 }
71 */
72 }
73
75 {
76 /*
77 FileHandle file = OpenFile("$profile:StatRecords.log", FileMode.WRITE);
78
79 FPrintln(file, "================================================================");
80 FPrintln(file," ================== " + m_Player.ToString() +" ================== ");
81 FPrintln(file, "================================================================");
82
83 for(int i = 0; i < m_PlayerStats.Count(); i++)
84 {
85 array<PlayerStatRecord> records = m_PlayerStats.Get(i).GetRecords();
86
87 FPrintln(file, m_PlayerStats.Get(i).GetLabel() );
88
89 for(int z = 0; z < records.Count(); z++)
90 {
91 PlayerStatRecord record = records.Get(z);
92 string output = record.GetStringOutput();
93 FPrintln(file, output);
94 }
95 }
96 */
97 }
98
100 {
101 int current_version = GetGame().SaveVersion();
102 PlayerStatsPCO_Base pco = GetPCO(current_version);
103
104 if ( pco )
105 {
106 pco.OnStoreSave(ctx);
107 //Print("Saving stats in version: "+ pco.GetVersion());
108 }
109 else
110 {
111 return;
112 }
113 }
114
115 bool LoadStats( ParamsReadContext ctx, int version )
116 {
117 PlayerStatsPCO_Base pco = GetPCO(version);
118 if (pco && pco.OnStoreLoad(ctx))
119 {
120 //Print("********* LoadStats loading version: " + pco.GetVersion());
121 return true;
122 }
123 else
124 {
125 return false;
126 }
127
128 }
129
131 {
132 GetPCO().ResetAllStats();
133 }
134
136 {
137 GetPCO().OnRPC(ctx);
138 }
139
141 {
142 GetPCO().OnAfterStoreLoad();
143 }
144}
const string EMPTY
Lists loot spawns that are not abandoned but have no loot.
Определения CentralEconomy.c:256
override Widget Init()
Определения DayZGame.c:127
DayZPlayer m_Player
Определения Hand_Events.c:42
string m_System
the manager instance
Определения ModifierBase.c:12
override void OnAfterStoreLoad()
engine reaction to load from database originates in: engine - Person::BinLoad script - PlayerBase....
Определения PlayerStatBase.c:189
override void OnRPC(ParamsReadContext ctx)
Определения PlayerStatBase.c:69
ref array< ref StatDebugObject > m_PlayerStatsDebug
Определения PlayerStats.c:10
bool LoadStats(ParamsReadContext ctx, int version)
Определения PlayerStats.c:115
void GatherAllRecords()
Определения PlayerStats.c:74
void SetAllowLogs(bool enable)
Определения PlayerStats.c:54
void SaveStats(ParamsWriteContext ctx)
Определения PlayerStats.c:99
void ~PlayerStats()
Определения PlayerStats.c:35
void PlayerStats(Man player)
Определения PlayerStats.c:19
void GetDebugInfo(array< ref StatDebugObject > objects, int flags)
Определения PlayerStats.c:64
EPSstatsFlags
Определения PlayerStats.c:2
@ SYNCED
Определения PlayerStats.c:4
enum EPSstatsFlags m_PlayerStats
bool GetAllowLogs()
Определения PlayerStats.c:59
ref PCOHandlerStats m_PCOhandler
Определения PlayerStats.c:12
bool m_AllowLogs
Определения PlayerStats.c:16
ref Timer m_SyncTimer
Определения PlayerStats.c:14
void ResetAllStats()
Определения PlayerStats.c:130
PlayerStatsPCO_Base GetPCO(int version=-1)
Определения PlayerStats.c:30
PlayerStatBase GetStatObject(int id)
Определения PlayerStats.c:41
proto native int SaveVersion()
Returns actual storage version - saving.
Определения PlayerStatsPCO.c:2
Определения PlayerStatBase.c:2
Определения DayZPlayerImplement.c:63
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
Определения gameplay.c:15
proto native CGame GetGame()
Serializer ParamsWriteContext
Определения gameplay.c:16