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

Private Member Functions

void ActionUnrestrainSelf ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool HasProneException ()
 
override bool HasTarget ()
 
override void OnEndAnimationLoopServer (ActionData action_data)
 
override void OnFinishProgressServer (ActionData action_data)
 
override bool CanBeUsedInRestrain ()
 
- 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 42 of file ActionUnrestrainSelf.c.

Constructor & Destructor Documentation

◆ ActionUnrestrainSelf()

void ActionUnrestrainSelf::ActionUnrestrainSelf ( )
inlineprivate

Member Function Documentation

◆ ActionCondition()

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

Definition at line 58 of file ActionUnrestrainSelf.c.

59 {
60 return player.IsRestrained();
61 }

◆ CanBeUsedInRestrain()

override bool ActionUnrestrainSelf::CanBeUsedInRestrain ( )
inlineprivate

Definition at line 99 of file ActionUnrestrainSelf.c.

100 {
101 return true;
102 }

◆ CreateConditionComponents()

override void ActionUnrestrainSelf::CreateConditionComponents ( )
inlineprivate

Definition at line 52 of file ActionUnrestrainSelf.c.

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

References m_ConditionItem, and m_ConditionTarget.

◆ HasProneException()

override bool ActionUnrestrainSelf::HasProneException ( )
inlineprivate

Definition at line 63 of file ActionUnrestrainSelf.c.

64 {
65 return true;
66 }

◆ HasTarget()

override bool ActionUnrestrainSelf::HasTarget ( )
inlineprivate

Definition at line 68 of file ActionUnrestrainSelf.c.

69 {
70 return false;
71 }

◆ OnEndAnimationLoopServer()

override void ActionUnrestrainSelf::OnEndAnimationLoopServer ( ActionData action_data)
inlineprivate

Definition at line 73 of file ActionUnrestrainSelf.c.

74 {
75
76 }

◆ OnFinishProgressServer()

override void ActionUnrestrainSelf::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 79 of file ActionUnrestrainSelf.c.

80 {
81 PlayerBase player = PlayerBase.Cast(action_data.m_Player);
83
84 if (item_in_hands)
85 {
86 if (item_in_hands.IsInherited(BarbedWireLocked))
87 {
88 int randNum = Math.RandomInt(0, 3); // Values 0 to 3 represent fore arm and arm roll bleed sources
89 player.m_BleedingManagerServer.AttemptAddBleedingSourceBySelection(PlayerBase.m_BleedingSourcesUp[randNum]);
90 }
91 player.SetRestrained(false);
93 MiscGameplayFunctions.TransformRestrainItem(item_in_hands, null, null, player);
94 //string new_item_name = MiscGameplayFunctions.ObtainRestrainItemTargetClassname(item_in_hands);
95 //MiscGameplayFunctions.TurnItemInHandsIntoItemEx(player, new UnrestrainSelfPlayer(item_in_hands, new_item_name));
96 }
97 }
Definition EnMath.c:7
const float CLEAN_UNRESTRAIN_DAMAGE
Definition constants.c:842
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].

References GameConstants::CLEAN_UNRESTRAIN_DAMAGE, and Math::RandomInt().


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