Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionforcedrink.c
Go to the documentation of this file.
1
class
ActionForceDrinkCB
:
ActionContinuousBaseCB
2
{
3
override
void
CreateActionComponent()
4
{
5
m_ActionData.m_ActionComponent =
new
CAContinuousQuantityEdible
(
UAQuantityConsumed
.DRINK,
UATimeSpent
.DEFAULT);
6
}
7
};
8
9
class
ActionForceDrink
:
ActionForceConsume
10
{
11
void
ActionForceDrink
()
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
20
override
void
CreateConditionComponents()
21
{
22
m_ConditionTarget
=
new
CCTMan
(
UAMaxDistances
.DEFAULT);
23
m_ConditionItem
=
new
CCINonRuined
;
24
}
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
41
ItemBase
Definition:
inventoryitem.c:730
CCTMan
Definition:
cctman.c:1
UAQuantityConsumed
Definition:
actionconstants.c:3
UAMaxDistances
Definition:
actionconstants.c:104
m_FullBody
protected bool m_FullBody
Definition:
actionbase.c:52
PlayerBase
Definition:
playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition:
dayzplayer.c:601
ActionForceConsume
ActionForceDrinkCB ActionForceConsume
CAContinuousQuantityEdible
Definition:
cacontinuousquantityedible.c:1
UATimeSpent
Definition:
actionconstants.c:26
ActionContinuousBaseCB
Definition:
actioncontinuousbase.c:1
ActionForceDrink
Definition:
actionforcedrink.c:9
m_Text
protected string m_Text
Definition:
actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition:
actionbase.c:55
CCINonRuined
Definition:
ccinonruined.c:1
ActionForceDrinkCB
Definition:
actionforcedrink.c:1
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition:
actionbase.c:56
m_StanceMask
protected int m_StanceMask
Definition:
actionbase.c:53
DAYZ
scripts_v1.24.157551
scripts
world
classes
useractionscomponent
actions
continuous
actionforcedrink.c
Generated by
1.8.17