DayZ 1.24
Loading...
Searching...
No Matches
ActionShaveTarget.c
Go to the documentation of this file.
8
10{
12 {
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_INTERACT;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_ERECT | DayZPlayerConstants.STANCEMASK_CROUCH;
18 m_Text = "#shave_target";
19 }
20
26
27 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
28 {
30 Class.CastTo(man, target.GetObject());
31
32 if (man.CanShave())
33 return true;
34
35 return false;
36 }
37
39 {
41 if (action_data.m_Target && Class.CastTo(man, action_data.m_Target.GetObject()))
42 {
43 if (CanReceiveAction(action_data.m_Target))
44 {
45 man.ShavePlayer();
46 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
47 }
48 }
49 }
50};
bool m_FullBody
Definition ActionBase.c:52
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
bool CanReceiveAction(ActionTarget target)
Definition ActionBase.c:594
int m_StanceMask
Definition ActionBase.c:53
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void CreateActionComponent()
override void CreateConditionComponents()
override void OnFinishProgressServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition CCTMan.c:2
Super root of all classes in Enforce script.
Definition EnScript.c:11
const float DEFAULT
const float SHAVE
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.