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

Private Member Functions

void UncoverHead (PlayerBase target, PlayerBase source)
 
- 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 10 of file ActionUncoverHeadSelf.c.

Member Function Documentation

◆ UncoverHead()

void ActionUncoverHeadBase::UncoverHead ( PlayerBase target,
PlayerBase source )
inlineprivate

Definition at line 12 of file ActionUncoverHeadSelf.c.

13 {
15 if (Class.CastTo(attachment, target.GetInventory().FindAttachment(InventorySlots.HEADGEAR)) && attachment.GetType() == "BurlapSackCover")
16 {
18 if (!source.GetHumanInventory().GetEntityInHands())
19 new_item = ItemBase.Cast(HumanInventory.Cast(source.GetInventory()).CreateInHands("BurlapSack"));
20 else
21 {
22 if (!Class.CastTo(new_item, source.GetInventory().CreateInInventory("BurlapSack"))) //full inventory
23 {
24 vector m4[4];
25 source.GetTransformWS(m4);
27 target_gnd.SetGround(null, m4);
29 }
30 }
31
32 if (new_item)
33 {
34 MiscGameplayFunctions.TransferItemProperties(attachment, new_item, true, false, true);
35 attachment.Delete();
36
37 source.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
38 }
39 }
40 }
float m_SpecialtyWeight
Definition ActionBase.c:68
const int ECE_IN_INVENTORY
const int RF_DEFAULT
Super root of all classes in Enforce script.
Definition EnScript.c:11
script counterpart to engine's class Inventory
Definition Inventory.c:79
static proto native EntityAI LocationCreateEntity(notnull InventoryLocation inv_loc, string type, int iSetupFlags, int iRotation)
creates new item directly at location
inventory for plain man/human
proto native EntityAI CreateInHands(string typeName)
creates new entity in hands
InventoryLocation.
provides access to slot configuration
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.

References Class::CastTo(), HumanInventory::CreateInHands(), ECE_IN_INVENTORY, GameInventory::LocationCreateEntity(), m_SpecialtyWeight, and RF_DEFAULT.

Referenced by OnFinishProgressServer(), and ActionUncoverHeadTarget::OnFinishProgressServer().


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