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

Private Member Functions

void ActionRepairWithToolFromHands ()
 
override void CreateConditionComponents ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 

Detailed Description

Definition at line 2 of file ActionRepairWithToolFromHands.c.

Constructor & Destructor Documentation

◆ ActionRepairWithToolFromHands()

void ActionRepairWithToolFromHands::ActionRepairWithToolFromHands ( )
inlineprivate

Definition at line 4 of file ActionRepairWithToolFromHands.c.

5 {
7 m_Text = "#repair";
8 }
string m_Text
Definition ActionBase.c:49
float m_SpecialtyWeight
Definition ActionBase.c:68

References m_SpecialtyWeight, m_Text, and UASoftSkillsWeight::PRECISE_HIGH.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 16 of file ActionRepairWithToolFromHands.c.

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 }

◆ CreateConditionComponents()

override void ActionRepairWithToolFromHands::CreateConditionComponents ( )
inlineprivate

◆ OnExecuteServer()

override void ActionRepairWithToolFromHands::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 29 of file ActionRepairWithToolFromHands.c.

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 }

References m_SpecialtyWeight.


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