Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
remoteplayerstatdebug.c
Go to the documentation of this file.
1
enum
eRemoteStatType
2
{
3
NONE
,
4
DAMAGE_SYSTEM
= 1,
5
PLAYER_STATS
= 2,
6
OTHER
= 4,
7
}
8
9
10
class
RemotePlayerStatDebug
11
{
12
PlayerBase
m_Player
;
13
ref
array<ref StatDebugObject>
m_Stats
=
new
array<ref StatDebugObject>
;
14
string
m_Name
;
15
vector
m_Pos
;
16
void
RemotePlayerStatDebug
(
PlayerBase
player)
17
{
18
m_Player
= player;
19
Init
();
20
21
}
22
23
void
Init
()
24
{
25
UpdatePlayerStatsValues
();
26
InjectDamageSystemValues
();
27
m_Pos
=
m_Player
.GetWorldPosition();
28
m_Name
=
m_Player
.GetIdentity().GetName();
29
}
30
31
PlayerBase
GetPlayer
()
32
{
33
return
m_Player
;
34
}
35
36
void
UpdatePlayerStatsValues
()
37
{
38
m_Player
.GetPlayerStats().GetDebugInfo(
m_Stats
, 0);
39
}
40
41
void
InjectDamageSystemValues
()
42
{
43
m_Stats
.Insert(
new
StatDebugObject
(
"Health"
,
m_Player
.GetHealth(
""
,
""
),
eRemoteStatType
.DAMAGE_SYSTEM) );
44
m_Stats
.Insert(
new
StatDebugObject
(
"Blood"
,
m_Player
.GetHealth(
""
,
"Blood"
),
eRemoteStatType
.DAMAGE_SYSTEM) );
45
m_Stats
.Insert(
new
StatDebugObject
(
"Shock"
,
m_Player
.GetHealth(
""
,
"Shock"
),
eRemoteStatType
.DAMAGE_SYSTEM) );
46
}
47
48
void
SerializeNames
(
array<string>
names,
eRemoteDebugType
type)
49
{
50
for
(
int
i = 0; i <
m_Stats
.Count(); i++)
51
{
52
if
( type ==
eRemoteDebugType
.ALL )
53
{
54
names.Insert(
m_Stats
.Get(i).GetName());
55
}
56
else
if
( type ==
eRemoteDebugType
.DAMAGE_ONLY )
57
{
58
StatDebugObject
obj =
m_Stats
.Get(i);
59
eRemoteStatType
debug_type = obj.GetType();
60
if
(debug_type ==
eRemoteStatType
.DAMAGE_SYSTEM)
61
{
62
names.Insert(
m_Stats
.Get(i).GetName());
63
}
64
}
65
}
66
}
67
68
void
SerializeValues
(
array<string>
values,
eRemoteDebugType
type)
69
{
70
for
(
int
i = 0; i <
m_Stats
.Count(); i++)
71
{
72
if
( type ==
eRemoteDebugType
.ALL )
73
{
74
values.Insert(
m_Stats
.Get(i).GetValue());
75
}
76
else
if
( type ==
eRemoteDebugType
.DAMAGE_ONLY )
77
{
78
StatDebugObject
obj =
m_Stats
.Get(i);
79
eRemoteStatType
debug_type = obj.GetType();
80
if
(debug_type ==
eRemoteStatType
.DAMAGE_SYSTEM)
81
{
82
values.Insert(
m_Stats
.Get(i).GetValue());
83
}
84
}
85
}
86
}
87
88
void
Debug
()
89
{
90
for
(
int
i = 0; i <
m_Stats
.Count(); i++)
91
{
92
m_Stats
.Get(i).Debug();
93
}
94
}
95
96
}
InjectDamageSystemValues
void InjectDamageSystemValues()
Definition:
remoteplayerstatdebug.c:41
m_Player
enum eRemoteStatType m_Player
DAMAGE_SYSTEM
@ DAMAGE_SYSTEM
Definition:
remoteplayerstatdebug.c:4
Debug
void Debug()
Definition:
remoteplayerstatdebug.c:88
GetPlayer
PlayerBase GetPlayer()
Definition:
remoteplayerstatdebug.c:31
SerializeNames
void SerializeNames(array< string > names, eRemoteDebugType type)
Definition:
remoteplayerstatdebug.c:48
m_Pos
vector m_Pos
Definition:
remoteplayerstatdebug.c:15
PLAYER_STATS
@ PLAYER_STATS
Definition:
remoteplayerstatdebug.c:5
PlayerBase
Definition:
playerbaseclient.c:1
UpdatePlayerStatsValues
void UpdatePlayerStatsValues()
Definition:
remoteplayerstatdebug.c:36
vector
Definition:
enconvert.c:105
eRemoteDebugType
eRemoteDebugType
Definition:
pluginremoteplayerdebugclient.c:1
OTHER
@ OTHER
Definition:
remoteplayerstatdebug.c:6
array< ref StatDebugObject >
StatDebugObject
Definition:
statdebugobject.c:1
m_Stats
ref array< ref StatDebugObject > m_Stats
Definition:
remoteplayerstatdebug.c:13
Init
void Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...
Definition:
remoteplayerstatdebug.c:23
NONE
@ NONE
Definition:
remoteplayerstatdebug.c:3
RemotePlayerStatDebug
void RemotePlayerStatDebug(PlayerBase player)
Definition:
remoteplayerstatdebug.c:16
eRemoteStatType
eRemoteStatType
Definition:
remoteplayerstatdebug.c:1
SerializeValues
void SerializeValues(array< string > values, eRemoteDebugType type)
Definition:
remoteplayerstatdebug.c:68
m_Name
string m_Name
Definition:
remoteplayerstatdebug.c:14
DAYZ
scripts_v1.24.157551
scripts
world
classes
remoteplayerdebug
remoteplayerstatdebug.c
Generated by
1.8.17