DayZ 1.24
Loading...
Searching...
No Matches
ActionDeCraftWitchHoodCoif.c
Go to the documentation of this file.
21
23 {
26 }
27
28 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
29 {
30 return true;
31 }
32
33 override bool HasTarget()
34 {
35 return false;
36 }
37
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 }
56}
bool m_FullBody
Definition ActionBase.c:52
string m_Text
Definition ActionBase.c:49
void CreateConditionComponents()
Definition ActionBase.c:196
bool HasTarget()
Definition ActionBase.c:210
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
int m_StanceMask
Definition ActionBase.c:53
ActionDeCraftWitchHoodCoifCB ActionContinuousBaseCB ActionDeCraftWitchHoodCoif()
ActionData m_ActionData
void OnFinishProgressServer(ActionData action_data)
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
const float DEFAULT_DECRAFT
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597