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

Private Member Functions

void ActionSplintSelf ()
 
override void CreateConditionComponents ()
 
override bool HasTarget ()
 
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 ActionSplintSelf.c.

Constructor & Destructor Documentation

◆ ActionSplintSelf()

void ActionSplintSelf::ActionSplintSelf ( )
inlineprivate

Member Function Documentation

◆ ActionCondition()

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

Definition at line 52 of file ActionSplintSelf.c.

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

References IsWearingSplint().

◆ CreateConditionComponents()

override void ActionSplintSelf::CreateConditionComponents ( )
inlineprivate

Definition at line 21 of file ActionSplintSelf.c.

22 {
25 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56

References m_ConditionItem, and m_ConditionTarget.

◆ HasTarget()

override bool ActionSplintSelf::HasTarget ( )
inlineprivate

Definition at line 27 of file ActionSplintSelf.c.

28 {
29 return false;
30 }

◆ IsWearingSplint()

bool ActionSplintSelf::IsWearingSplint ( PlayerBase player)
inlineprivate

Definition at line 60 of file ActionSplintSelf.c.

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

Referenced by ActionCondition().

◆ OnFinishProgressServer()

override void ActionSplintSelf::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 32 of file ActionSplintSelf.c.

33 {
34 action_data.m_MainItem.TransferModifiers(action_data.m_Player);
35 action_data.m_Player.ApplySplint();
36
37 //Double check to not enter splinted state if legs are not broken
38 if (action_data.m_Player.GetBrokenLegs() == eBrokenLegs.BROKEN_LEGS)
39 {
40 action_data.m_Player.SetBrokenLegs(eBrokenLegs.BROKEN_LEGS_SPLINT);
41
42 ItemBase new_item = ItemBase.Cast(action_data.m_Player.GetInventory().CreateInInventory("Splint_Applied"));
43 if (new_item)
44 {
45 MiscGameplayFunctions.TransferItemProperties(action_data.m_MainItem, new_item, true, false, true);
46 action_data.m_MainItem.Delete();
47 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
48 }
49 }
50 }

References m_SpecialtyWeight.


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