DayZ 1.24
Loading...
Searching...
No Matches
ActionDropItem.c File Reference

Go to the source code of this file.

Classes

class  ActionDropItemCB
 

Functions

void ActionDropItem ()
 
override void CreateConditionComponents ()
 
override GetInputType ()
 
override bool HasProneException ()
 
override bool CanBeUsedThrowing ()
 
override bool HasTarget ()
 
override bool UseAcknowledgment ()
 
override bool ActionConditionContinue (ActionData action_data)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 
override void OnExecuteClient (ActionData action_data)
 
void PhysicalDropItem (ActionData action_data)
 

Variables

ActionDropItemCB m_ItemName = ""
 

Function Documentation

◆ ActionCondition()

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

Definition at line 58 of file ActionDropItem.c.

59 {
60 HumanCommandMove hcm = player.GetCommand_Move();
61 if (hcm && hcm.IsChangingStance())
62 return false;
63
64 if (player.GetCommand_Vehicle())
65 return false;
66
67 return player && item;
68 }

◆ ActionConditionContinue()

override bool ActionConditionContinue ( ActionData action_data)

Definition at line 53 of file ActionDropItem.c.

54 {
55 return true;
56 }

◆ ActionDropItem()

void ActionDropItem ( )

Definition at line 14 of file ActionDropItem.c.

15 {
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_DROPITEM_HANDS;
17 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_DROPITEM_HANDS;
18 m_CallbackClass = ActionDropItemCB;
19 m_Text = "#drop_item";
20 }
string m_Text
Definition ActionBase.c:49
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References m_Text.

◆ CanBeUsedThrowing()

override bool CanBeUsedThrowing ( )

Definition at line 38 of file ActionDropItem.c.

39 {
40 return true;
41 }

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 22 of file ActionDropItem.c.

23 {
26 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ GetInputType()

override GetInputType ( )

Definition at line 28 of file ActionDropItem.c.

29 {
30 return DropActionInput;
31 }

◆ HasProneException()

override bool HasProneException ( )

Definition at line 33 of file ActionDropItem.c.

34 {
35 return true;
36 }

◆ HasTarget()

override bool HasTarget ( )

Definition at line 43 of file ActionDropItem.c.

44 {
45 return false;
46 }

◆ OnExecuteClient()

override void OnExecuteClient ( ActionData action_data)

Definition at line 79 of file ActionDropItem.c.

80 {
81 super.OnExecuteClient(action_data);
82
84 }
void PhysicalDropItem(ActionData action_data)

References PhysicalDropItem().

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)

Definition at line 70 of file ActionDropItem.c.

71 {
72 if (action_data.m_Player.IsPlacingServer())
73 action_data.m_Player.PlacingCancelServer();
74
75 if (!GetGame().IsMultiplayer())
77 }
proto native CGame GetGame()

References GetGame(), and PhysicalDropItem().

◆ PhysicalDropItem()

void PhysicalDropItem ( ActionData action_data)

Definition at line 86 of file ActionDropItem.c.

87 {
88 action_data.m_Player.PhysicalPredictiveDropItem(action_data.m_Player.GetItemInHands());
89 }

Referenced by OnExecuteClient(), and OnExecuteServer().

◆ UseAcknowledgment()

override bool UseAcknowledgment ( )

Definition at line 48 of file ActionDropItem.c.

49 {
50 return false;
51 }

Variable Documentation

◆ m_ItemName

ActionDropItemCB m_ItemName = ""