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

Go to the source code of this file.

Enumerations

enum  eRemoteStatType { NONE , DAMAGE_SYSTEM = 1 , PLAYER_STATS = 2 , OTHER = 4 }
 

Functions

void RemotePlayerStatDebug (PlayerBase player)
 
void Init ()
 Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside of a non-static system)
 
PlayerBase GetPlayer ()
 
void UpdatePlayerStatsValues ()
 
void InjectDamageSystemValues ()
 
void SerializeNames (array< string > names, eRemoteDebugType type)
 
void SerializeValues (array< string > values, eRemoteDebugType type)
 
void Debug ()
 

Variables

enum eRemoteStatType m_Player
 
ref array< ref StatDebugObjectm_Stats = new array<ref StatDebugObject>
 
string m_Name
 
vector m_Pos
 

Enumeration Type Documentation

◆ eRemoteStatType

Enumerator
NONE 
DAMAGE_SYSTEM 
PLAYER_STATS 
OTHER 

Definition at line 1 of file RemotePlayerStatDebug.c.

2{
3 NONE,
5 PLAYER_STATS = 2,
6 OTHER = 4,
7}
@ DAMAGE_SYSTEM
@ PLAYER_STATS

Function Documentation

◆ Debug()

void Debug ( )

Definition at line 80 of file RemotePlayerStatDebug.c.

81 {
82 for (int i = 0; i < m_Stats.Count(); i++)
83 m_Stats.Get(i).Debug();
84 }
ref array< ref StatDebugObject > m_Stats

References m_Stats.

◆ GetPlayer()

PlayerBase GetPlayer ( )

Definition at line 31 of file RemotePlayerStatDebug.c.

32 {
33 return m_Player;
34 }
enum eRemoteStatType m_Player

References m_Player.

◆ Init()

void Init ( )

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

Definition at line 23 of file RemotePlayerStatDebug.c.

24 {
27 m_Pos = m_Player.GetWorldPosition();
28 m_Name = m_Player.GetIdentity().GetName();
29 }
vector m_Pos
void InjectDamageSystemValues()
string m_Name
void UpdatePlayerStatsValues()

References InjectDamageSystemValues(), m_Name, m_Player, m_Pos, and UpdatePlayerStatsValues().

◆ InjectDamageSystemValues()

void InjectDamageSystemValues ( )

Definition at line 41 of file RemotePlayerStatDebug.c.

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 }

References m_Player, and m_Stats.

Referenced by Init().

◆ RemotePlayerStatDebug()

void RemotePlayerStatDebug ( PlayerBase player)

Definition at line 16 of file RemotePlayerStatDebug.c.

17 {
19 Init();
20
21 }
void Init()
Launched from 'DayZGame.DeferredInit' to make earlier access, use, and updates impossible (downside o...

References Init(), and m_Player.

Referenced by PluginBase::GatherPlayerInfo(), ScriptConsoleGeneralTab::Update(), and UpdateWidgetsStats().

◆ SerializeNames()

void SerializeNames ( array< string > names,
eRemoteDebugType type )

Definition at line 48 of file RemotePlayerStatDebug.c.

49 {
50 for (int i = 0; i < m_Stats.Count(); i++)
51 {
52 if (type == eRemoteDebugType.ALL)
53 names.Insert(m_Stats.Get(i).GetName());
54 else if (type == eRemoteDebugType.DAMAGE_ONLY)
55 {
56 StatDebugObject obj = m_Stats.Get(i);
58 if (debug_type == eRemoteStatType.DAMAGE_SYSTEM)
59 names.Insert(m_Stats.Get(i).GetName());
60 }
61 }
62 }
eRemoteDebugType GetType()

References StatDebugObject::GetType(), and m_Stats.

◆ SerializeValues()

void SerializeValues ( array< string > values,
eRemoteDebugType type )

Definition at line 64 of file RemotePlayerStatDebug.c.

65 {
66 for (int i = 0; i < m_Stats.Count(); i++)
67 {
68 if (type == eRemoteDebugType.ALL)
69 values.Insert(m_Stats.Get(i).GetValue());
70 else if (type == eRemoteDebugType.DAMAGE_ONLY)
71 {
72 StatDebugObject obj = m_Stats.Get(i);
74 if (debug_type == eRemoteStatType.DAMAGE_SYSTEM)
75 values.Insert(m_Stats.Get(i).GetValue());
76 }
77 }
78 }

References StatDebugObject::GetType(), and m_Stats.

◆ UpdatePlayerStatsValues()

void UpdatePlayerStatsValues ( )

Definition at line 36 of file RemotePlayerStatDebug.c.

37 {
38 m_Player.GetPlayerStats().GetDebugInfo(m_Stats, 0);
39 }

References m_Player, and m_Stats.

Referenced by Init().

Variable Documentation

◆ m_Name

string m_Name

Definition at line 14 of file RemotePlayerStatDebug.c.

◆ m_Player

◆ m_Pos

vector m_Pos

Definition at line 15 of file RemotePlayerStatDebug.c.

Referenced by Init().

◆ m_Stats