DayZ 1.24
Loading...
Searching...
No Matches
ActionDisinfectPlantBit.c
Go to the documentation of this file.
1// TO DO: Remove this script!
2
10
11
13{
20
26
27 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
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 }
44
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 }
59};
string m_Text
Definition ActionBase.c:49
void SendMessageToClient(Object reciever, string message)
Definition ActionBase.c:829
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
float m_SpecialtyWeight
Definition ActionBase.c:68
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnExecuteServer(ActionData action_data)
override void CreateConditionComponents()
const float DEFAULT
const float GARDEN_DISINFECT_PLANT