DayZ 1.24
Loading...
Searching...
No Matches
ActionShaveTarget Class Reference
Inheritance diagram for ActionShaveTarget:
[legend]
Collaboration diagram for ActionShaveTarget:
[legend]

Private Member Functions

void ActionShaveTarget ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnFinishProgressServer (ActionData action_data)
 
- Private Member Functions inherited from ActionContinuousBase
void OnStartAnimationLoopServer (ActionData action_data)
 
void OnStartAnimationLoopClient (ActionData action_data)
 
void OnEndAnimationLoopServer (ActionData action_data)
 
void OnEndAnimationLoopClient (ActionData action_data)
 
void OnFinishProgressServer (ActionData action_data)
 
void OnFinishProgressClient (ActionData action_data)
 

Detailed Description

Definition at line 9 of file ActionShaveTarget.c.

Constructor & Destructor Documentation

◆ ActionShaveTarget()

void ActionShaveTarget::ActionShaveTarget ( )
inlineprivate

Member Function Documentation

◆ ActionCondition()

override bool ActionShaveTarget::ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )
inlineprivate

Definition at line 27 of file ActionShaveTarget.c.

28 {
30 Class.CastTo(man, target.GetObject());
31
32 if (man.CanShave())
33 return true;
34
35 return false;
36 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo().

◆ CreateConditionComponents()

override void ActionShaveTarget::CreateConditionComponents ( )
inlineprivate

Definition at line 21 of file ActionShaveTarget.c.

22 {
25 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
Definition CCTMan.c:2
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ OnFinishProgressServer()

override void ActionShaveTarget::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 38 of file ActionShaveTarget.c.

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 }
bool CanReceiveAction(ActionTarget target)
Definition ActionBase.c:594

References CanReceiveAction(), Class::CastTo(), and m_SpecialtyWeight.


The documentation for this class was generated from the following file: