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

Private Member Functions

void ActionSplintTarget ()
 
override void CreateConditionComponents ()
 
override void OnFinishProgressServer (ActionData action_data)
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
bool IsWearingSplint (PlayerBase player)
 
- 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 ActionSplintTarget.c.

Constructor & Destructor Documentation

◆ ActionSplintTarget()

void ActionSplintTarget::ActionSplintTarget ( )
inlineprivate

Member Function Documentation

◆ ActionCondition()

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

Definition at line 49 of file ActionSplintTarget.c.

50 {
51 PlayerBase ntarget = PlayerBase.Cast(target.GetObject());
52 if (ntarget.GetBrokenLegs() != eBrokenLegs.BROKEN_LEGS || IsWearingSplint(ntarget))
53 return false;
54 return super.ActionCondition(player, target, item);
55
56 }
eBrokenLegs
Definition EBrokenLegs.c:2
bool IsWearingSplint(PlayerBase player)

References IsWearingSplint().

◆ CreateConditionComponents()

override void ActionSplintTarget::CreateConditionComponents ( )
inlineprivate

Definition at line 20 of file ActionSplintTarget.c.

21 {
24 }
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.

◆ IsWearingSplint()

bool ActionSplintTarget::IsWearingSplint ( PlayerBase player)
inlineprivate

Definition at line 58 of file ActionSplintTarget.c.

59 {
60 if (player.GetItemOnSlot("Splint_Right"))
61 return true;
62 return false;
63 }

Referenced by ActionCondition().

◆ OnFinishProgressServer()

override void ActionSplintTarget::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 26 of file ActionSplintTarget.c.

27 {
28 PlayerBase ntarget = PlayerBase.Cast(action_data.m_Target.GetObject());
29 if (CanReceiveAction(action_data.m_Target))
30 {
31 action_data.m_MainItem.TransferModifiers(ntarget);
32 ntarget.ApplySplint();
33
34 ItemBase new_item = ItemBase.Cast(ntarget.GetInventory().CreateInInventory("Splint_Applied"));
35 if (new_item)
36 {
37 MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem, new_item, true, false, true);
38 action_data.m_MainItem.Delete();
39 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
40 }
41
42 ntarget.SetBrokenLegs(eBrokenLegs.BROKEN_LEGS_SPLINT);
43 //action_data.m_MainItem.Delete();
44
45 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
46 }
47 }
bool CanReceiveAction(ActionTarget target)
Definition ActionBase.c:594

References CanReceiveAction(), and m_SpecialtyWeight.


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