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

Private Member Functions

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

Constructor & Destructor Documentation

◆ ActionUnpackBox()

Member Function Documentation

◆ CreateConditionComponents()

override void ActionUnpackBox::CreateConditionComponents ( )
inlineprivate

Definition at line 20 of file ActionUnpackBox.c.

21 {
24 }
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 ActionUnpackBox::HasProneException ( )
inlineprivate

Definition at line 26 of file ActionUnpackBox.c.

27 {
28 return true;
29 }

◆ HasTarget()

override bool ActionUnpackBox::HasTarget ( )
inlineprivate

Definition at line 31 of file ActionUnpackBox.c.

32 {
33 return false;
34 }

◆ OnFinishProgressServer()

override void ActionUnpackBox::OnFinishProgressServer ( ActionData action_data)
inlineprivate

Definition at line 36 of file ActionUnpackBox.c.

37 {
38 if (action_data.m_MainItem && action_data.m_MainItem.GetHierarchyRootPlayer() == action_data.m_Player)
39 {
40 string path = "CfgVehicles " + action_data.m_MainItem.GetType();
41 string child_name = "";
42 int count;
44
45 if (GetGame().ConfigIsExisting(path) && GetGame().ConfigIsExisting(path + " Resources"))
46 {
47 path = path + " Resources";
48 count = GetGame().ConfigGetChildrenCount(path);
49 for (int i = 0; i < count; i++)
50 {
51 GetGame().ConfigGetChildName(path, i, child_name);
52
53 if (GetGame().ConfigGetInt(path + " " + child_name + " value"))
54 resources.Insert(child_name);
55 }
56
57 //TODO modify to allow for multiple ammo types spawning (if needed??)
58 string itemType = resources.Get(0);
59 int itemCount = GetGame().ConfigGetInt(path + " " + itemType + " value");
60
61 UnboxLambda lambda = new UnboxLambda(action_data.m_MainItem, itemType, action_data.m_Player, itemCount);
62 action_data.m_Player.ServerReplaceItemInHandsWithNew(lambda);
63
64 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
65 }
66 }
67 }
proto native CGame GetGame()

References GetGame(), m_SpecialtyWeight, and path.


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