Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionwashhandswellone.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CAInteractLoop(UATimeSpent.WASH_HANDS);
6  }
7 }
8 
10 {
12  {
13  m_CallbackClass = ActionWashHandsWellOneCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_WASHHANDSWELL;
15  m_FullBody = true;
16  m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
17 
18  m_Text = "#wash_hands";
19  }
20 
21  override void CreateConditionComponents()
22  {
23  m_ConditionItem = new CCINone();
25  }
26 
27  override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item )
28  {
29  return player.HasBloodyHands() && !player.GetItemInHands() && !player.GetItemOnSlot("Gloves") && target.GetObject() && (target.GetObject().GetWaterSourceObjectType() == EWaterSourceObjectType.WELL || target.GetObject().IsWell());
30  }
31 
32  override void OnEndServer(ActionData action_data)
33  {
34  if (action_data.m_State == UA_FINISHED)
35  {
36  PluginLifespan moduleLifespan = PluginLifespan.Cast(GetPlugin(PluginLifespan));
37  moduleLifespan.UpdateBloodyHandsVisibility(action_data.m_Player, false);
38  }
39  }
40 }
ItemBase
Definition: inventoryitem.c:730
EWaterSourceObjectType
EWaterSourceObjectType
Definition: ewatersourceobjecttype.c:1
ActionInteractLoopBaseCB
Definition: actioninteractloopbase.c:1
CCINone
Definition: ccinone.c:1
CCTObject
Definition: cctobject.c:1
UAMaxDistances
Definition: actionconstants.c:104
GetPlugin
PluginBase GetPlugin(typename plugin_type)
Definition: pluginmanager.c:316
m_FullBody
protected bool m_FullBody
Definition: actionbase.c:52
PlayerBase
Definition: playerbaseclient.c:1
UA_FINISHED
const int UA_FINISHED
Definition: constants.c:436
CreateConditionComponents
override void CreateConditionComponents()
Definition: actionwashhandswellone.c:21
ActionInteractLoopBase
Definition: actioninteractloopbase.c:37
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
PluginLifespan
void PluginLifespan()
Definition: pluginlifespan.c:45
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionWashHandsWellOneCB
Definition: actionwashhandswellone.c:1
ActionWashHandsWellOne
ActionWashHandsWellOneCB ActionInteractLoopBaseCB ActionWashHandsWellOne()
Definition: actionwashhandswellone.c:11
OnEndServer
override void OnEndServer(ActionData action_data)
Definition: actionwashhandswellone.c:32
UATimeSpent
Definition: actionconstants.c:26
CAInteractLoop
Definition: cainteractloop.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actionwashhandswellone.c:27