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

Private Member Functions

void ActionBuryBody ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool Can (PlayerBase player, ActionTarget target, ItemBase item, int condition_mask)
 
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 ActionBuryBody.c.

Constructor & Destructor Documentation

◆ ActionBuryBody()

void ActionBuryBody::ActionBuryBody ( )
inlineprivate

Member Function Documentation

◆ ActionCondition()

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

Definition at line 28 of file ActionBuryBody.c.

29 {
30 if (player.IsPlacingLocal())
31 return false;
32
34 Class.CastTo(bodyEAI, target.GetObject());
35
36 if (bodyEAI && !bodyEAI.IsAlive() && (bodyEAI.IsInherited(DayZCreature) || bodyEAI.IsInherited(Man) || bodyEAI.IsInherited(DeadChicken_ColorBase)) && !bodyEAI.GetParent())
37 {
38 int liquidType;
39 string surfaceType;
40 GetGame().SurfaceUnderObject(bodyEAI, surfaceType, liquidType);
41
42 if (GetGame().IsSurfaceDigable(surfaceType))
43 return true;
44 }
45
46 return false;
47 }
Super root of all classes in Enforce script.
Definition EnScript.c:11
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), and GetGame().

◆ Can()

override bool ActionBuryBody::Can ( PlayerBase player,
ActionTarget target,
ItemBase item,
int condition_mask )
inlineprivate

Definition at line 49 of file ActionBuryBody.c.

50 {
52 return false;
53
54 return player.CheckFreeSpace(vector.Forward, 1.0, false);
55 }
static const vector Forward
Definition EnConvert.c:109

References vector::Forward.

◆ CreateConditionComponents()

override void ActionBuryBody::CreateConditionComponents ( )
inlineprivate

Definition at line 21 of file ActionBuryBody.c.

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

References m_ConditionItem, and m_ConditionTarget.

◆ OnFinishProgressServer()

override void ActionBuryBody::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 58 of file ActionBuryBody.c.

59 {
60 Object targetObject = action_data.m_Target.GetObject();
61 g_Game.ObjectDelete(targetObject);
62
63 MiscGameplayFunctions.DealAbsoluteDmg(action_data.m_MainItem, 4);
64
65 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
66 }
DayZGame g_Game
Definition DayZGame.c:3528

References g_Game, and m_SpecialtyWeight.


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