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

Private Member Functions

void ActionUngagTarget ()
 
override void CreateConditionComponents ()
 
override GetInputType ()
 
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 ActionUngagTarget.c.

Constructor & Destructor Documentation

◆ ActionUngagTarget()

void ActionUngagTarget::ActionUngagTarget ( )
inlineprivate

Definition at line 3 of file ActionUngagTarget.c.

4 {
6 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_COVERHEAD_TARGET;
7 //m_FullBody = true;
8 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
9 m_Text = "#ungag_person";
10 }
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 ActionUngagTarget::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 24 of file ActionUngagTarget.c.

25 {
27 if (Class.CastTo(targetPlayer, target.GetObject()))
28 {
29 if (IsWearingGag(targetPlayer) && null == player.GetHumanInventory().GetEntityInHands())
30 return true;
31 }
32 return false;
33 }
bool IsWearingGag(PlayerBase player)
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), and IsWearingGag().

◆ CreateConditionComponents()

override void ActionUngagTarget::CreateConditionComponents ( )
inlineprivate

Definition at line 12 of file ActionUngagTarget.c.

13 {
14
17 }
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.

◆ GetInputType()

override ActionUngagTarget::GetInputType ( )
inlineprivate

Definition at line 19 of file ActionUngagTarget.c.

◆ IsWearingGag()

bool ActionUngagTarget::IsWearingGag ( PlayerBase player)
inlineprivate

Definition at line 52 of file ActionUngagTarget.c.

53 {
55 Class.CastTo(attachment, player.GetInventory().FindAttachment(InventorySlots.MASK));
56 if (attachment && attachment.GetType() == "MouthRag")
57 return true;
58 return false;
59 }
provides access to slot configuration

References Class::CastTo().

Referenced by ActionCondition().

◆ OnFinishProgressServer()

override void ActionUngagTarget::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 35 of file ActionUngagTarget.c.

36 {
37 PlayerBase ntarget = PlayerBase.Cast(action_data.m_Target.GetObject());
38 if (CanReceiveAction(action_data.m_Target))
39 {
41 Class.CastTo(attachment, ntarget.GetInventory().FindAttachment(InventorySlots.MASK));
42
43 if (attachment && attachment.GetType() == "MouthRag")
44 {
46 lamb.SetTransferParams(true, true, true, false, 1);
47 action_data.m_Player.ServerReplaceItemElsewhereWithNewInHands(lamb);
48 }
49 }
50 }
bool CanReceiveAction(ActionTarget target)
Definition ActionBase.c:594

References CanReceiveAction(), and Class::CastTo().


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