Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
remoteplayerstatdebug.c
Go to the documentation of this file.
2 {
3  NONE,
6  OTHER = 4,
7 }
8 
9 
11 {
14  string m_Name;
17  {
18  m_Player = player;
19  Init();
20 
21  }
22 
23  void Init()
24  {
27  m_Pos = m_Player.GetWorldPosition();
28  m_Name = m_Player.GetIdentity().GetName();
29  }
30 
32  {
33  return m_Player;
34  }
35 
37  {
38  m_Player.GetPlayerStats().GetDebugInfo(m_Stats, 0);
39  }
40 
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 
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 
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