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

Private Member Functions

void ActionCheckPulse ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 
override void OnExecuteClient (ActionData action_data)
 
override void OnEndServer (ActionData action_data)
 

Static Private Member Functions

static string GetPulseMessage (EPulseType pulse_type, int blood_level)
 

Private Attributes

const int TARGET_IRREGULAR_PULSE_BIT = 1 << 31
 

Detailed Description

Definition at line 1 of file ActionCheckPulse.c.

Constructor & Destructor Documentation

◆ ActionCheckPulse()

void ActionCheckPulse::ActionCheckPulse ( )
inlineprivate

Definition at line 4 of file ActionCheckPulse.c.

5 {
6 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_INTERACTONCE;
7 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
8 m_Text = "#check_pulse_target";
9 }
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CommandUID, m_StanceMask, and m_Text.

Member Function Documentation

◆ ActionCondition()

override bool ActionCheckPulse::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 51 of file ActionCheckPulse.c.

52 {
53 PlayerBase ntarget = PlayerBase.Cast(target.GetObject());
54 if (ntarget && ntarget.IsAlive())
55 return true;
56 return false;
57 }

◆ CreateConditionComponents()

override void ActionCheckPulse::CreateConditionComponents ( )
inlineprivate

Definition at line 11 of file ActionCheckPulse.c.

12 {
15 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
Definition CCTMan.c:2
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ GetPulseMessage()

static string ActionCheckPulse::GetPulseMessage ( EPulseType pulse_type,
int blood_level )
inlinestaticprivate

Definition at line 17 of file ActionCheckPulse.c.

18 {
19 //builds string table keys:
20
21 //pulse_strong
22 //pulse_decent
23 //pulse_moderate
24 //pulse_weak
25 //pulse_faint
26 //pulse_strong_irregular
27 //pulse_decent_irregular
28 //pulse_moderate_irregular
29 //pulse_weak_irregular
30 //pulse_faint_irregular
31
32 string blood_msg = "strong";
33 string pulse_msg = "";
34
35 if (pulse_type == EPulseType.IRREGULAR)
36 pulse_msg = "_irregular";
37 if (blood_level == EStatLevels.HIGH)
38 blood_msg = "decent";
39 if (blood_level == EStatLevels.MEDIUM)
40 blood_msg = "moderate";
41 if (blood_level == EStatLevels.LOW)
42 blood_msg = "weak";
43 if (blood_level == EStatLevels.CRITICAL)
44 blood_msg = "faint";
45 //string message = blood_msg + " " + pulse_msg + " pulse";
46 string message = "#" + "pulse_" + blood_msg + pulse_msg;
47 return message;
48
49 }
EPulseType
Definition EPulseType.c:2
EStatLevels
Definition EStatLevels.c:2

Referenced by ManBase::OnRPC().

◆ OnEndServer()

override void ActionCheckPulse::OnEndServer ( ActionData action_data)
inlineprivate

Definition at line 83 of file ActionCheckPulse.c.

84 {
85 /*
86 PlayerBase target_player = PlayerBase.Cast(action_data.m_Target.GetObject());
87 PlayerBase player = action_data.m_Player;
88 CachedObjectsParams.PARAM1_INT.param1 = target_player.GetStatLevelBlood();
89 GetGame().RPCSingleParam( target_player ,ERPCs.RPC_CHECK_PULSE, CachedObjectsParams.PARAM1_INT, true, target_player.GetIdentity() );
90 */
91 }

◆ OnExecuteClient()

override void ActionCheckPulse::OnExecuteClient ( ActionData action_data)
inlineprivate

Definition at line 75 of file ActionCheckPulse.c.

76 {
77 PlayerBase ntarget = PlayerBase.Cast(action_data.m_Target.GetObject());
78
79 if (ntarget)
80 action_data.m_Player.m_CheckPulseLastTarget = ntarget;
81 }

◆ OnExecuteServer()

override void ActionCheckPulse::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 59 of file ActionCheckPulse.c.

60 {
61 PlayerBase target_player = PlayerBase.Cast(action_data.m_Target.GetObject());
62 if (target_player)
63 {
64 PlayerBase player = action_data.m_Player;
65 CachedObjectsParams.PARAM1_INT.param1 = target_player.GetStatLevelBlood();
66 bool pulse_type = target_player.GetPulseType();
67 if (pulse_type == EPulseType.IRREGULAR)
69
70 GetGame().RPCSingleParam(player, ERPCs.RPC_CHECK_PULSE, CachedObjectsParams.PARAM1_INT, true, player.GetIdentity());
71 }
72 }
ERPCs
Definition ERPCs.c:2
const int TARGET_IRREGULAR_PULSE_BIT
static ref Param1< int > PARAM1_INT
proto native CGame GetGame()

References GetGame(), CachedObjectsParams::PARAM1_INT, and TARGET_IRREGULAR_PULSE_BIT.

Member Data Documentation

◆ TARGET_IRREGULAR_PULSE_BIT

const int ActionCheckPulse::TARGET_IRREGULAR_PULSE_BIT = 1 << 31
private

Definition at line 3 of file ActionCheckPulse.c.

Referenced by OnExecuteServer(), and ManBase::OnRPC().


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