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

Private Member Functions

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

Detailed Description

Definition at line 1 of file ActionAttachOnProxy.c.

Constructor & Destructor Documentation

◆ ActionAttachOnProxy()

void ActionAttachOnProxy::ActionAttachOnProxy ( )
inlineprivate

Definition at line 3 of file ActionAttachOnProxy.c.

4 {
5 m_Text = "#attach";
6 }
string m_Text
Definition ActionBase.c:49

References m_Text.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 16 of file ActionAttachOnProxy.c.

17 {
18 Object targetObject = target.GetObject();
19 Object targetParent = target.GetParent();
22
23 if (targetParent)
24 {
26 {
27 if (target_entity.GetInventory() && target_entity.GetInventory().CanAddAttachment(item_entity))
28 return true;
29 }
30 }
31
32 return false;
33 }

◆ CreateConditionComponents()

override void ActionAttachOnProxy::CreateConditionComponents ( )
inlineprivate

Definition at line 8 of file ActionAttachOnProxy.c.

9 {
12 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_ATTACHITEM;
13 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
14 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References m_ConditionItem, m_ConditionTarget, and m_StanceMask.

◆ OnExecuteClient()

override void ActionAttachOnProxy::OnExecuteClient ( ActionData action_data)
inlineprivate

Definition at line 35 of file ActionAttachOnProxy.c.

36 {
37 super.OnExecuteClient(action_data);
38
39 if (action_data.m_Player.IsPlacingLocal())
40 action_data.m_Player.TogglePlacingLocal();
41 }

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