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

Private Member Functions

void ActionPullBodyFromTransport ()
 
override void CreateConditionComponents ()
 
override bool HasProgress ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnStartServer (ActionData action_data)
 
override bool IsInstant ()
 

Detailed Description

Definition at line 1 of file ActionPullBodyFromTransport.c.

Constructor & Destructor Documentation

◆ ActionPullBodyFromTransport()

void ActionPullBodyFromTransport::ActionPullBodyFromTransport ( )
inlineprivate

Definition at line 3 of file ActionPullBodyFromTransport.c.

4 {
5 m_StanceMask = DayZPlayerConstants.STANCEMASK_ALL;
6 m_Text = "#pull_out_body";
7 }
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References m_StanceMask, and m_Text.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 20 of file ActionPullBodyFromTransport.c.

21 {
22 PlayerBase targetPlayer = PlayerBase.Cast(target.GetObject());
23 if (!targetPlayer)
24 return false;
25
26 if (targetPlayer.IsAlive())
27 return false;
28
29 IEntity parent = targetPlayer.GetParent();
30 if (!parent || !parent.IsInherited(Transport))
31 return false;
32
33 bool found = false;
35 for (int i = 0; i < transportTarget.CrewSize(); ++i)
36 {
37 if (transportTarget.CrewMember(i) == targetPlayer)
38 {
39 found = true;
40 break;
41 }
42 }
43
44 return found && transportTarget.CrewCanGetThrough(i);
45 }
Base native class for all motorized wheeled vehicles.
Definition Car.c:75

◆ CreateConditionComponents()

override void ActionPullBodyFromTransport::CreateConditionComponents ( )
inlineprivate

Definition at line 9 of file ActionPullBodyFromTransport.c.

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

References m_ConditionItem, and m_ConditionTarget.

◆ HasProgress()

override bool ActionPullBodyFromTransport::HasProgress ( )
inlineprivate

Definition at line 15 of file ActionPullBodyFromTransport.c.

16 {
17 return false;
18 }

◆ IsInstant()

override bool ActionPullBodyFromTransport::IsInstant ( )
inlineprivate

Definition at line 58 of file ActionPullBodyFromTransport.c.

59 {
60 return true;
61 }

◆ OnStartServer()

override void ActionPullBodyFromTransport::OnStartServer ( ActionData action_data)
inlineprivate

Definition at line 47 of file ActionPullBodyFromTransport.c.

48 {
49 super.OnStartServer(action_data);
50
52 if (!Class.CastTo(player, action_data.m_Target.GetObject()))
53 return;
54
55 player.TriggerPullPlayerOutOfVehicle();
56 }
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().


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