DayZ 1.24
Loading...
Searching...
No Matches
ActionRepairWithToolFromHands.c
Go to the documentation of this file.
1// This is just a test action!
3{
9
15
16 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
17 {
18 Object targetObject = target.GetObject();
19 if (targetObject /*&& targetObject.IsKindOf("ItemBase")*/)
20 {
22 bool can_repair = item_to_repair.CanRepair(item);
23 return can_repair;
24 }
25
26 return false;
27 }
28
30 {
31 Object targetObject = action_data.m_Target.GetObject();
32 if (targetObject /* && targetObject.IsKindOf("ItemBase")*/)
33 {
35 Param1<float> nacdata = Param1<float>.Cast(action_data.m_ActionComponent.GetACData());
36 bool was_repaired = item_to_repair.Repair(action_data.m_Player, action_data.m_MainItem, nacdata.param1);
37 }
38
39 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
40 }
41};
string m_Text
Definition ActionBase.c:49
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
override void OnExecuteServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
const float DEFAULT