DayZ 1.24
Loading...
Searching...
No Matches
ActionDropItem.c
Go to the documentation of this file.
9
10class ActionDropItem : ActionSingleUseBase
11{
12 string m_ItemName = "";
13
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 }
21
23 {
26 }
27
28 override typename GetInputType()
29 {
30 return DropActionInput;
31 }
32
33 override bool HasProneException()
34 {
35 return true;
36 }
37
38 override bool CanBeUsedThrowing()
39 {
40 return true;
41 }
42
43 override bool HasTarget()
44 {
45 return false;
46 }
47
48 override bool UseAcknowledgment()
49 {
50 return false;
51 }
52
54 {
55 return true;
56 }
57
58 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
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 }
69
71 {
72 if (action_data.m_Player.IsPlacingServer())
73 action_data.m_Player.PlacingCancelServer();
74
75 if (!GetGame().IsMultiplayer())
77 }
78
80 {
81 super.OnExecuteClient(action_data);
82
84 }
85
87 {
88 action_data.m_Player.PhysicalPredictiveDropItem(action_data.m_Player.GetItemInHands());
89 }
90}
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
bool HasTarget()
Definition ActionBase.c:210
bool UseAcknowledgment()
Definition ActionBase.c:821
GetInputType()
Definition ActionBase.c:181
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
bool CanBeUsedThrowing()
Definition ActionBase.c:314
bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition ActionBase.c:350
bool ActionConditionContinue(ActionData action_data)
Definition ActionBase.c:345
bool HasProneException()
Definition ActionBase.c:527
DetachActionData m_ItemName
override void OnExecuteServer(ActionData action_data)
override void OnExecuteClient(ActionData action_data)
void PhysicalDropItem(ActionData action_data)
void ActionDropItem()
void SetCommand(int command_uid)
ActionData m_ActionData
override void EndActionComponent()
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
proto native CGame GetGame()
const int UA_FINISHED
Definition constants.c:436