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

Private Member Functions

void ActionUngagSelf ()
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 
bool IsWearingGag (PlayerBase player)
 
- Private Member Functions inherited from ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Detailed Description

Definition at line 1 of file ActionUngagSelf.c.

Constructor & Destructor Documentation

◆ ActionUngagSelf()

void ActionUngagSelf::ActionUngagSelf ( )
inlineprivate

Definition at line 3 of file ActionUngagSelf.c.

4 {
6 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_COVERHEAD_SELF;
7 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
8 m_Text = "#ungag";
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_CallbackClass, AnimatedActionBase::m_CommandUID, m_StanceMask, and m_Text.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 22 of file ActionUngagSelf.c.

23 {
24 if (IsWearingGag(player) && null == player.GetHumanInventory().GetEntityInHands())
25 return true;
26
27 return false;
28 }
bool IsWearingGag(PlayerBase player)

References IsWearingGag().

◆ CreateConditionComponents()

override void ActionUngagSelf::CreateConditionComponents ( )
inlineprivate

Definition at line 11 of file ActionUngagSelf.c.

12 {
15 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasTarget()

override bool ActionUngagSelf::HasTarget ( )
inlineprivate

Definition at line 17 of file ActionUngagSelf.c.

18 {
19 return false;
20 }

◆ IsWearingGag()

bool ActionUngagSelf::IsWearingGag ( PlayerBase player)
inlineprivate

Definition at line 42 of file ActionUngagSelf.c.

43 {
45 Class.CastTo(attachment, player.GetInventory().FindAttachment(InventorySlots.MASK));
46 if (attachment && attachment.GetType() == "MouthRag")
47 return true;
48 return false;
49 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
provides access to slot configuration
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo().

Referenced by ActionCondition().

◆ OnFinishProgressServer()

override void ActionUngagSelf::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 30 of file ActionUngagSelf.c.

31 {
33 Class.CastTo(attachment, action_data.m_Player.GetInventory().FindAttachment(InventorySlots.MASK));
34 if (attachment && attachment.GetType() == "MouthRag")
35 {
37 lamb.SetTransferParams(true, true, true, false, 1);
38 action_data.m_Player.ServerReplaceItemElsewhereWithNewInHands(lamb);
39 }
40 }

References Class::CastTo().


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