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

Private Member Functions

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

Detailed Description

Definition at line 12 of file ActionDisinfectPlantBit.c.

Constructor & Destructor Documentation

◆ ActionDisinfectPlantBit()

Member Function Documentation

◆ ActionCondition()

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

Definition at line 27 of file ActionDisinfectPlantBit.c.

28 {
29 Object targetObject = target.GetObject();
30
31 if (targetObject != NULL && targetObject.IsInherited(PlantBase) && !item.IsDamageDestroyed())
32 {
33 PlantBase plant = PlantBase.Cast(targetObject);
34
35 if (plant.IsGrowing() && plant.NeedsSpraying())
36 {
37 if (item.GetQuantity() > 0)
38 return true;
39 }
40 }
41
42 return false;
43 }

◆ CreateConditionComponents()

override void ActionDisinfectPlantBit::CreateConditionComponents ( )
inlineprivate

◆ OnExecuteServer()

override void ActionDisinfectPlantBit::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 45 of file ActionDisinfectPlantBit.c.

46 {
47 Object targetObject = action_data.m_Target.GetObject();
48
49 if (targetObject != NULL && targetObject.IsInherited(PlantBase))
50 {
51
52 PlantBase plant = PlantBase.Cast(targetObject);
53 Param1<float> nacdata = Param1<float>.Cast(action_data.m_ActionComponent.GetACData());
54 SendMessageToClient(action_data.m_Player, plant.StopInfestation(nacdata.param1));
55 }
56
57 action_data.m_Player.GetSoftSkillsManager().AddSpecialty(m_SpecialtyWeight);
58 }
void SendMessageToClient(Object reciever, string message)
Definition ActionBase.c:829

References m_SpecialtyWeight, and SendMessageToClient().


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