DayZ 1.24
Loading...
Searching...
No Matches
PluginDayzPlayerDebug_OtherCmds Class Reference
Collaboration diagram for PluginDayzPlayerDebug_OtherCmds:
[legend]

Private Member Functions

void PluginDayzPlayerDebug_OtherCmds (Widget pMainWnd)
 
void ~PluginDayzPlayerDebug_OtherCmds ()
 
void CreateModuleWidgets ()
 
void DestroyModuleWidgets ()
 
bool OnClick (Widget w, int x, int y, int button)
 buttons clicks
 
void CommandHandler ()
 
void Death_Start ()
 
void Hit_Start ()
 
void Uncon_Start ()
 
void Uncon_End ()
 

Private Attributes

Widget m_MainWnd
 
XComboBoxWidget m_DeathTypeCB
 
EditBoxWidget m_DeathDirectionEdit
 
ButtonWidget m_DeathStartButton
 
XComboBoxWidget m_HitTypeCB
 
ButtonWidget m_HitStartButton
 
XComboBoxWidget m_UnconTypeCB
 
ButtonWidget m_UnconStartButton
 
ButtonWidget m_UnconEndButton
 
bool m_CH_DeathStart = false
 
bool m_CH_HitStart = false
 
bool m_CH_UnconStart = false
 
bool m_CH_UnconEnd = false
 

Detailed Description

Definition at line 5 of file PluginDayzPlayerDebug_OtherCmds.c.

Constructor & Destructor Documentation

◆ PluginDayzPlayerDebug_OtherCmds()

void PluginDayzPlayerDebug_OtherCmds::PluginDayzPlayerDebug_OtherCmds ( Widget pMainWnd)
inlineprivate

◆ ~PluginDayzPlayerDebug_OtherCmds()

void PluginDayzPlayerDebug_OtherCmds::~PluginDayzPlayerDebug_OtherCmds ( )
inlineprivate

Member Function Documentation

◆ CommandHandler()

void PluginDayzPlayerDebug_OtherCmds::CommandHandler ( )
inlineprivate

◆ CreateModuleWidgets()

void PluginDayzPlayerDebug_OtherCmds::CreateModuleWidgets ( )
inlineprivate

Definition at line 44 of file PluginDayzPlayerDebug_OtherCmds.c.

45 {
46 m_DeathTypeCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("DeathTypeCB"));
47 m_DeathDirectionEdit = EditBoxWidget.Cast(m_MainWnd.FindAnyWidget("DeathDirectionEdit"));
48 m_DeathStartButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("DeathStartButton"));
49
50 m_HitTypeCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("HitTypeCB"));
51 m_HitStartButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("HitStartButton"));
52
53 m_UnconTypeCB = XComboBoxWidget.Cast(m_MainWnd.FindAnyWidget("UnconTypeCB"));
54 m_UnconStartButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("UnconStartButton"));
55 m_UnconEndButton = ButtonWidget.Cast(m_MainWnd.FindAnyWidget("UnconEndButton"));
56 }

References m_DeathDirectionEdit, m_DeathStartButton, m_DeathTypeCB, m_HitStartButton, m_HitTypeCB, m_MainWnd, m_UnconEndButton, m_UnconStartButton, and m_UnconTypeCB.

Referenced by PluginDayzPlayerDebug_OtherCmds().

◆ Death_Start()

void PluginDayzPlayerDebug_OtherCmds::Death_Start ( )
inlineprivate

Definition at line 127 of file PluginDayzPlayerDebug_OtherCmds.c.

128 {
130 if (!player)
131 return;
132
133 int deathType = m_DeathTypeCB.GetCurrentItem();
134 if (deathType > 0)
135 deathType += 9;
136
137 float deathDirection = m_DeathDirectionEdit.GetText().ToInt();
138
139
141 }
PlayerBase GetPlayer()
proto native CGame GetGame()

References GetGame(), GetPlayer(), m_DeathDirectionEdit, and m_DeathTypeCB.

Referenced by CommandHandler().

◆ DestroyModuleWidgets()

void PluginDayzPlayerDebug_OtherCmds::DestroyModuleWidgets ( )
inlineprivate

Definition at line 58 of file PluginDayzPlayerDebug_OtherCmds.c.

59 {
60 }

Referenced by ~PluginDayzPlayerDebug_OtherCmds().

◆ Hit_Start()

void PluginDayzPlayerDebug_OtherCmds::Hit_Start ( )
inlineprivate

Definition at line 143 of file PluginDayzPlayerDebug_OtherCmds.c.

144 {
146 if (!player)
147 return;
148
149 float hitDirection = m_DeathDirectionEdit.GetText().ToInt();
150 int hitType = m_HitTypeCB.GetCurrentItem();
151 if (hitType == 0)
152 player.AddCommandModifier_Damage(0, hitDirection);
153 else
154 player.StartCommand_Damage(0, hitDirection);
155 }

References GetGame(), GetPlayer(), m_DeathDirectionEdit, and m_HitTypeCB.

Referenced by CommandHandler().

◆ OnClick()

bool PluginDayzPlayerDebug_OtherCmds::OnClick ( Widget w,
int x,
int y,
int button )
inlineprivate

buttons clicks

Definition at line 66 of file PluginDayzPlayerDebug_OtherCmds.c.

67 {
68 if (w == m_DeathStartButton)
69 {
70 Print("PluginPlayerDebug: Death Start");
71 m_CH_DeathStart = true;
72 return true;
73 }
74 else if (w == m_HitStartButton)
75 {
76 Print("PluginPlayerDebug: Uncon Start");
77 m_CH_HitStart = true;
78 return true;
79 }
80 else if (w == m_UnconStartButton)
81 {
82 Print("PluginPlayerDebug: Uncon Start");
83 m_CH_UnconStart = true;
84 return true;
85 }
86 else if (w == m_UnconEndButton)
87 {
88 Print("PluginPlayerDebug: Uncon End");
89 m_CH_UnconEnd = true;
90 return true;
91 }
92
93 return false;
94 }
proto void Print(void var)
Prints content of variable to console/log.

References m_CH_DeathStart, m_CH_HitStart, m_CH_UnconEnd, m_CH_UnconStart, m_DeathStartButton, m_HitStartButton, m_UnconEndButton, m_UnconStartButton, and Print().

◆ Uncon_End()

void PluginDayzPlayerDebug_OtherCmds::Uncon_End ( )
inlineprivate

Definition at line 169 of file PluginDayzPlayerDebug_OtherCmds.c.

170 {
172 if (!player)
173 return;
174
175 player.m_UnconsciousDebug = false;
176 HumanCommandUnconscious hcu = player.GetCommand_Unconscious();
177 if (hcu)
178 hcu.WakeUp();
179 }

References GetGame(), and GetPlayer().

Referenced by CommandHandler().

◆ Uncon_Start()

void PluginDayzPlayerDebug_OtherCmds::Uncon_Start ( )
inlineprivate

Definition at line 157 of file PluginDayzPlayerDebug_OtherCmds.c.

158 {
160 if (!player)
161 return;
162
163 int type = m_UnconTypeCB.GetCurrentItem();
164
165 player.m_UnconsciousDebug = true;
166 player.StartCommand_Unconscious(type);
167 }

References GetGame(), GetPlayer(), and m_UnconTypeCB.

Referenced by CommandHandler().

Member Data Documentation

◆ m_CH_DeathStart

bool PluginDayzPlayerDebug_OtherCmds::m_CH_DeathStart = false
private

Definition at line 22 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CommandHandler(), and OnClick().

◆ m_CH_HitStart

bool PluginDayzPlayerDebug_OtherCmds::m_CH_HitStart = false
private

Definition at line 23 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CommandHandler(), and OnClick().

◆ m_CH_UnconEnd

bool PluginDayzPlayerDebug_OtherCmds::m_CH_UnconEnd = false
private

Definition at line 25 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CommandHandler(), and OnClick().

◆ m_CH_UnconStart

bool PluginDayzPlayerDebug_OtherCmds::m_CH_UnconStart = false
private

Definition at line 24 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CommandHandler(), and OnClick().

◆ m_DeathDirectionEdit

EditBoxWidget PluginDayzPlayerDebug_OtherCmds::m_DeathDirectionEdit
private

Definition at line 11 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CreateModuleWidgets(), Death_Start(), and Hit_Start().

◆ m_DeathStartButton

ButtonWidget PluginDayzPlayerDebug_OtherCmds::m_DeathStartButton
private

Definition at line 12 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CreateModuleWidgets(), and OnClick().

◆ m_DeathTypeCB

XComboBoxWidget PluginDayzPlayerDebug_OtherCmds::m_DeathTypeCB
private

Definition at line 10 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CreateModuleWidgets(), and Death_Start().

◆ m_HitStartButton

ButtonWidget PluginDayzPlayerDebug_OtherCmds::m_HitStartButton
private

Definition at line 15 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CreateModuleWidgets(), and OnClick().

◆ m_HitTypeCB

XComboBoxWidget PluginDayzPlayerDebug_OtherCmds::m_HitTypeCB
private

Definition at line 14 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CreateModuleWidgets(), and Hit_Start().

◆ m_MainWnd

Widget PluginDayzPlayerDebug_OtherCmds::m_MainWnd
private

◆ m_UnconEndButton

ButtonWidget PluginDayzPlayerDebug_OtherCmds::m_UnconEndButton
private

Definition at line 19 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CreateModuleWidgets(), and OnClick().

◆ m_UnconStartButton

ButtonWidget PluginDayzPlayerDebug_OtherCmds::m_UnconStartButton
private

Definition at line 18 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CreateModuleWidgets(), and OnClick().

◆ m_UnconTypeCB

XComboBoxWidget PluginDayzPlayerDebug_OtherCmds::m_UnconTypeCB
private

Definition at line 17 of file PluginDayzPlayerDebug_OtherCmds.c.

Referenced by CreateModuleWidgets(), and Uncon_Start().


The documentation for this class was generated from the following file: