Dayz
Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Toggle main menu visibility
Loading...
Searching...
No Matches
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
}
m_Name
string m_Name
Definition
inventoryitemtype.c:34
m_Player
map m_Player
Debug
string Debug()
Definition
cachedequipmentstoragebase.c:29
PlayerBase
Definition
playerbaseclient.c:2
StatDebugObject
Definition
statdebugobject.c:2
StatDebugObject::GetType
eRemoteDebugType GetType()
Definition
statdebugobject.c:34
array
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Definition
isboxcollidinggeometryproxyclasses.c:28
vector
Definition
enconvert.c:119
Init
override Widget Init()
Definition
dayzgame.c:127
NONE
@ NONE
body is not in simulation, nor in collision world
Definition
simulationstate.c:15
GetPlayer
PlayerBase GetPlayer()
Definition
modifierbase.c:51
eRemoteDebugType
eRemoteDebugType
Definition
pluginremoteplayerdebugclient.c:2
SerializeValues
void SerializeValues(array< string > values, eRemoteDebugType type)
Definition
remoteplayerstatdebug.c:68
m_Pos
vector m_Pos
Definition
remoteplayerstatdebug.c:15
InjectDamageSystemValues
void InjectDamageSystemValues()
Definition
remoteplayerstatdebug.c:41
m_Stats
ref array< ref StatDebugObject > m_Stats
Definition
remoteplayerstatdebug.c:13
eRemoteStatType
eRemoteStatType
Definition
remoteplayerstatdebug.c:2
DAMAGE_SYSTEM
@ DAMAGE_SYSTEM
Definition
remoteplayerstatdebug.c:4
PLAYER_STATS
@ PLAYER_STATS
Definition
remoteplayerstatdebug.c:5
OTHER
@ OTHER
Definition
remoteplayerstatdebug.c:6
UpdatePlayerStatsValues
void UpdatePlayerStatsValues()
Definition
remoteplayerstatdebug.c:36
RemotePlayerStatDebug
void RemotePlayerStatDebug(PlayerBase player)
Definition
remoteplayerstatdebug.c:16
SerializeNames
void SerializeNames(array< string > names, eRemoteDebugType type)
Definition
remoteplayerstatdebug.c:48
Games
Dayz
scripts
4_world
classes
remoteplayerdebug
remoteplayerstatdebug.c
Generated by
1.17.0