DayZ 1.24
Loading...
Searching...
No Matches
ActionDrainLiquid.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 = "#drain_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)
39 return false;
40 }
41
43 {
44 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
45 }
46
47
49 {
50 if (!GetGame().IsMultiplayer() || GetGame().IsServer())
51 {
52 Bottle_Base vessel_in_hands = Bottle_Base.Cast(action_data.m_Target.GetObject());
53 Param1<bool> play = new Param1<bool>(true);
54
55 GetGame().RPCSingleParam(vessel_in_hands, SoundTypeBottle.EMPTYING, play, true);
56 }
57 }
58
60 {
61 if (!GetGame().IsMultiplayer() || GetGame().IsServer())
62 {
63 Bottle_Base target_vessel = Bottle_Base.Cast(action_data.m_Target.GetObject());
64 Param1<bool> play = new Param1<bool>(false);
65 GetGame().RPCSingleParam(target_vessel, SoundTypeBottle.EMPTYING, play, true);
66 }
67 }
68
70 {
71 if (!GetGame().IsMultiplayer() || GetGame().IsServer())
72 {
73 Bottle_Base target_vessel = Bottle_Base.Cast(action_data.m_Target.GetObject());
74 Param1<bool> play = new Param1<bool>(false);
75 GetGame().RPCSingleParam(target_vessel, SoundTypeBottle.EMPTYING, play, true);
76 }
77 }
78};
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
override void CreateActionComponent()
override void OnStartAnimationLoop(ActionData action_data)
override void OnEnd(ActionData action_data)
override void OnEndAnimationLoop(ActionData action_data)
override void OnFinishProgressServer(ActionData action_data)
override bool HasProneException()
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void CreateConditionComponents()
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()