Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiondrinkthroughcontinuous.c
Go to the documentation of this file.
2 {
3  override void CreateConditionComponents()
4  {
5  m_ConditionItem = new CCINone();
7  }
8 
9  override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
10  {
11  if (item && item.IsHeavyBehaviour())
12  return false;
13 
14  if (!player.CanEatAndDrink())
15  return false;
16 
17  return target.GetObject() && target.GetObject().GetWaterSourceObjectType() == EWaterSourceObjectType.THROUGH;
18  }
19 }
ItemBase
Definition: inventoryitem.c:730
EWaterSourceObjectType
EWaterSourceObjectType
Definition: ewatersourceobjecttype.c:1
ActionDrinkThroughContinuous
Definition: actiondrinkthroughcontinuous.c:1
CCINone
Definition: ccinone.c:1
UAMaxDistances
Definition: actionconstants.c:104
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
CCTCursor
Definition: cctcursor.c:1
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
ActionDrinkPondContinuous
void ActionDrinkPondContinuous()
Definition: actiondrinkpondcontinuous.c:14