DayZ 1.24
Loading...
Searching...
No Matches
ActionDeCraftWitchHoodCoif.c File Reference

Go to the source code of this file.

Classes

class  ActionDeCraftWitchHoodCoifCB
 

Functions

ActionDeCraftWitchHoodCoifCB ActionContinuousBaseCB ActionDeCraftWitchHoodCoif ()
 
override void CreateActionComponent ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override bool HasTarget ()
 
override void OnFinishProgressServer (ActionData action_data)
 

Function Documentation

◆ ActionCondition()

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

Definition at line 28 of file ActionDeCraftWitchHoodCoif.c.

29 {
30 return true;
31 }

◆ ActionDeCraftWitchHoodCoif()

ActionDeCraftWitchHoodCoifCB ActionContinuousBaseCB ActionDeCraftWitchHoodCoif ( )

Definition at line 1 of file ActionDeCraftWitchHoodCoif.c.

12 {
13 m_CallbackClass = ActionDeCraftWitchHoodCoifCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15 m_FullBody = true;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH;
18
19 m_Text = "#dismantle";
20 }
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68
int m_StanceMask
Definition ActionBase.c:53
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), and WitchHoodCoif_ColorBase::SetActions().

◆ CreateActionComponent()

override void ActionDeCraftWitchHoodCoif::CreateActionComponent ( )

Definition at line 12 of file ActionDeCraftWitchHoodCoif.c.

12 {
13 m_CallbackClass = ActionDeCraftWitchHoodCoifCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONFB_CRAFTING;
15 m_FullBody = true;

References m_FullBody, m_SpecialtyWeight, m_StanceMask, m_Text, and UASoftSkillsWeight::ROUGH_HIGH.

◆ CreateConditionComponents()

override void CreateConditionComponents ( )

Definition at line 22 of file ActionDeCraftWitchHoodCoif.c.

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

References m_ConditionItem, and m_ConditionTarget.

◆ HasTarget()

override bool HasTarget ( )

Definition at line 33 of file ActionDeCraftWitchHoodCoif.c.

34 {
35 return false;
36 }

◆ OnFinishProgressServer()

override void OnFinishProgressServer ( ActionData action_data)

Definition at line 38 of file ActionDeCraftWitchHoodCoif.c.

39 {
40 EntityAI mainItem = action_data.m_MainItem;
41
42 string color = mainItem.ConfigGetString("color");
43 string className = "WitchHood_" + color;
44
45 EntityAI result1 = action_data.m_Player.SpawnEntityOnGroundPos(className, action_data.m_Player.GetPosition());
46 EntityAI result2 = action_data.m_Player.SpawnEntityOnGroundPos("Chainmail_Coif", action_data.m_Player.GetPosition());
47
48 if (!result1 || !result2)
49 return;
50
51 MiscGameplayFunctions.TransferItemProperties(mainItem, result1);
52 MiscGameplayFunctions.TransferItemProperties(mainItem, result2);
53
54 action_data.m_MainItem.Delete();
55 }