DayZ 1.24
Loading...
Searching...
No Matches
ActionPourLiquid.c
Go to the documentation of this file.
10
12{
14 {
16 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_EMPTY_VESSEL;
17 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_EMPTY_VESSEL;
19 m_Text = "#pour_liquid";
20 }
21
27
28 override bool HasProneException()
29 {
30 return true;
31 }
32
33 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
34 {
35 ItemBase target_item = ItemBase.Cast(target.GetObject());
36
37 if (target_item && item)
38 {
40 }
41 return false;
42 }
43
45 {
46 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
47 }
48
50 {
51 if (!GetGame().IsMultiplayer() || GetGame().IsServer())
52 {
53 Bottle_Base vessel_in_hands = Bottle_Base.Cast(action_data.m_Target.GetObject());
54 Param1<bool> play = new Param1<bool>(true);
55
56 GetGame().RPCSingleParam(vessel_in_hands, SoundTypeBottle.POURING, play, true);
57 }
58 }
59
61 {
62 if (!GetGame().IsMultiplayer() || GetGame().IsServer())
63 {
64 Bottle_Base target_vessel = Bottle_Base.Cast(action_data.m_Target.GetObject());
65 Param1<bool> play = new Param1<bool>(false);
66
67 GetGame().RPCSingleParam(target_vessel, SoundTypeBottle.POURING, play, true);
68 }
69 }
70
72 {
73 if (!GetGame().IsMultiplayer() || GetGame().IsServer())
74 {
75 Bottle_Base target_vessel = Bottle_Base.Cast(action_data.m_Target.GetObject());
76 Param1<bool> play = new Param1<bool>(false);
77
78 GetGame().RPCSingleParam(target_vessel, SoundTypeBottle.POURING, play, true);
79 }
80 }
81};
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
SoundTypeBottle
Definition Bottle_Base.c:2
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
const float TIME_TO_REPEAT
override void CreateActionComponent()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override bool HasProneException()
override void CreateConditionComponents()
override void OnEnd(ActionData action_data)
override void OnEndAnimationLoop(ActionData action_data)
override void OnFinishProgressServer(ActionData action_data)
override void OnStartAnimationLoop(ActionData action_data)
Definition Liquid.c:2
static bool CanTransfer(ItemBase source_ent, ItemBase target_ent)
Definition Liquid.c:79
const float DEFAULT
const float DRAIN_LIQUID
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
proto native CGame GetGame()