DayZ 1.24
Loading...
Searching...
No Matches
ActionDebug.c
Go to the documentation of this file.
7
9{
12}
13
14#ifdef DIAG_DEVELOPER
16{
17 override bool HasTarget()
18 {
19 return false;
20 }
21
22 override void CreateConditionComponents()
23 {
26 }
27
29 {
31 return action_data;
32 }
33
35 {
38 action_data_d.m_Action = this;
39 action_data_d.m_Player = player;
40
41 if (!GetGame().IsDedicatedServer())
42 {
44 action_data_d.m_Entity = ndata.param1;
45 action_data_d.m_DebugActionID = ndata.param2;
46 }
47
48 ActionReciveData action_recive_data = player.GetActionManager().GetReciveData();
52
53 return true;
54 }
55
57 {
60
61 ctx.Write(action_data_d.m_Entity);
62 ctx.Write(action_data_d.m_DebugActionID);
63 }
64
65 override bool ReadFromContext(ParamsReadContext ctx, out ActionReciveData action_recive_data)
66 {
69
71
73 int debugActionID;
74
75 if (!ctx.Read(ent))
76 return false;
77 if (!ctx.Read(debugActionID))
78 return false;
79
80 action_recive_data_d.m_Entity = ent;
81 action_recive_data_d.m_DebugActionID = debugActionID;
82 return true;
83 }
84
85 override void HandleReciveData(ActionReciveData action_recive_data, ActionData action_data)
86 {
89
90 action_data_d.m_Entity = action_recive_data_d.m_Entity;
91 action_data_d.m_DebugActionID = action_recive_data_d.m_DebugActionID;
92 }
93
94 override void Start(ActionData action_data)
95 {
98 if (action_data_d.m_Entity && !action_data_d.m_Entity.IsSetForDeletion())
99 action_data_d.m_Entity.OnAction(action_data_d.m_DebugActionID, action_data_d.m_Player, NULL);
100 }
101
102 override bool UseAcknowledgment()
103 {
104 return false;
105 }
106
107};
108#endif
ActionData CreateActionData()
Definition ActionBase.c:191
void CreateConditionComponents()
Definition ActionBase.c:196
bool HasTarget()
Definition ActionBase.c:210
bool UseAcknowledgment()
Definition ActionBase.c:821
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
bool SetupAction(PlayerBase player, ActionTarget target, ItemBase item, out ActionData action_data, Param extra_data=NULL)
Definition ActionBase.c:126
void HandleReciveData(ActionReciveData action_recive_data, ActionData action_data)
Definition ActionBase.c:485
EntityAI m_Entity
Definition ActionDebug.c:11
ActionDebugReciveData m_DebugActionID
void Start()
Plays all elements this effects consists of.
Definition Effect.c:149
void ReadFromContext(ParamsReadContext ctx)
Definition Hand_Events.c:70
void WriteToContext(ParamsWriteContext ctx)
Definition Hand_Events.c:72
Super root of all classes in Enforce script.
Definition EnScript.c:11
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
proto native CGame GetGame()
static proto bool CastTo(out Class to, Class from)
Try to safely down-cast base class to child class.