DayZ 1.24
Loading...
Searching...
No Matches
ActionForceDrink.c
Go to the documentation of this file.
8
9class ActionForceDrink: ActionForceConsume
10{
12 {
13 m_CallbackClass = ActionForceDrinkCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_EMPTY_VESSEL;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
17 m_Text = "#give_drink";
18 }
19
25
26 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
27 {
28 if (!super.ActionCondition(player, target, item))
29 return false;
30
31 PlayerBase target_player = PlayerBase.Cast(target.GetObject());
32
33 if (target_player)
34 return target_player.CanEatAndDrink();
35 else
36 return false;
37 }
38
39};
40
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void CreateConditionComponents()
Definition CCTMan.c:2
const float DEFAULT
const float DEFAULT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597