DayZ 1.24
Loading...
Searching...
No Matches
HandActionBase Class Reference

actions More...

Private Member Functions

void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 
override void Action (HandEventBase e)
 

Detailed Description

actions

represents action executed on transition just between OnExit from old state and OnEntry to new state

Definition at line 6 of file Hand_Actions.c.

Member Function Documentation

◆ Action() [1/12]

void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 11 of file Hand_Actions.c.

11{ }

◆ Action() [2/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 17 of file Hand_Actions.c.

18 {
19#ifdef DEVELOPER
21 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionCreated", e.m_Player.ToString());
22#endif
23
24 e.m_Player.OnItemInHandsChanged();
25 }
Definition Debug.c:14
static void InventoryHFSMLog(string message=LOG_DEFAULT, string plugin=LOG_DEFAULT, string author=LOG_DEFAULT, string label=LOG_DEFAULT, string entity=LOG_DEFAULT)
Definition Debug.c:183
static bool IsInventoryHFSMLogEnable()
Definition Debug.c:749

References Debug::InventoryHFSMLog(), and LogManager::IsInventoryHFSMLogEnable().

◆ Action() [3/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 30 of file Hand_Actions.c.

31 {
32#ifdef DEVELOPER
34 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionTake", e.m_Player.ToString());
35#endif
36
37 GameInventory.LocationSyncMoveEntity(e.GetSrc(), e.GetDst());
38 e.m_Player.OnItemInHandsChanged();
39 }
script counterpart to engine's class Inventory
Definition Inventory.c:79
static proto native bool LocationSyncMoveEntity(notnull InventoryLocation src_loc, notnull InventoryLocation dst_loc)
synchronously removes item from current inventory location and adds it to destination no anims involv...

References Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), and GameInventory::LocationSyncMoveEntity().

◆ Action() [4/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 44 of file Hand_Actions.c.

45 {
46#ifdef DEVELOPER
48 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionDrop", e.m_Player.ToString());
49#endif
50
51 GameInventory.LocationSyncMoveEntity(e.GetSrc(), e.GetDst());
52 e.m_Player.OnItemInHandsChanged();
53 }

References Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), and GameInventory::LocationSyncMoveEntity().

◆ Action() [5/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 58 of file Hand_Actions.c.

59 {
60#ifdef DEVELOPER
62 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionThrow", e.m_Player.ToString());
63#endif
64 HandEventThrow throwEvent = HandEventThrow.Cast(e);
65
66 GameInventory.LocationSyncMoveEntity(e.GetSrc(), e.GetDst());
67
68 DayZPlayer player = DayZPlayer.Cast(e.m_Player);
69 if (player.GetInstanceType() != DayZPlayerInstanceType.INSTANCETYPE_REMOTE)
70 {
71 InventoryItem item = InventoryItem.Cast(e.GetSrcEntity());
72 if (item)
73 item.ThrowPhysically(player, throwEvent.GetForce());
74 else
75 Error("[hndfsm] HandActionThrow - src entity null!");
76 }
77
78 player.OnItemInHandsChanged();
79 }
DayZPlayerInstanceType
defined in C++
void Error(string err)
Messagebox with error message.
Definition EnDebug.c:90

References Error(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), and GameInventory::LocationSyncMoveEntity().

◆ Action() [6/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 84 of file Hand_Actions.c.

85 {
86#ifdef DEVELOPER
88 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionMoveTo", e.m_Player.ToString());
89#endif
90
91 HandEventMoveTo es = HandEventMoveTo.Cast(e);
92 if (es)
93 {
95 e.m_Player.OnItemInHandsChanged();
96 }
97 else
98 Error("[hndfsm] HandActionMoveTo - this is no HandEventMoveTo");
99 }

References Error(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), and GameInventory::LocationSyncMoveEntity().

◆ Action() [7/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 104 of file Hand_Actions.c.

105 {
106#ifdef DEVELOPER
108 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionDestroy", e.m_Player.ToString());
109#endif
110
111 GetGame().ObjectDelete(e.GetSrcEntity());
112 e.m_Player.OnItemInHandsChanged();
113 }
proto native CGame GetGame()

References GetGame(), Debug::InventoryHFSMLog(), and LogManager::IsInventoryHFSMLogEnable().

◆ Action() [8/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 118 of file Hand_Actions.c.

119 {
120#ifdef DEVELOPER
122 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionDestroyed", e.m_Player.ToString());
123#endif
124 e.m_Player.OnItemInHandsChanged();
125 }

References Debug::InventoryHFSMLog(), and LogManager::IsInventoryHFSMLogEnable().

◆ Action() [9/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 130 of file Hand_Actions.c.

131 {
132#ifdef DEVELOPER
134 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionDestroyAndReplaceWithNew", e.m_Player.ToString());
135#endif
136 Man player = e.m_Player;
137 EntityAI itemInHands = player.GetHumanInventory().GetEntityInHands();
138
140 if (itemInHands.GetInventory().GetCurrentInventoryLocation(src))
141 {
143 if (edr)
144 {
145 edr.m_Lambda.Execute();
146 return;
147 }
148 else
149 Error("[hndfsm] HandActionDestroyAndReplaceWithNew - not a HandEventDestroyAndReplaceWithNew event");
150 }
151 else
152 Error("[hndfsm] HandActionDestroyAndReplaceWithNew - itemInHands has no InventoryLocation");
153 }
InventoryLocation.

References Error(), Debug::InventoryHFSMLog(), and LogManager::IsInventoryHFSMLogEnable().

◆ Action() [10/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 166 of file Hand_Actions.c.

167 {
168#ifdef DEVELOPER
170 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionReplaced", e.m_Player.ToString());
171#endif
172 Man player = e.m_Player;
173
174 player.OnItemInHandsChanged();
175 }

References Debug::InventoryHFSMLog(), and LogManager::IsInventoryHFSMLogEnable().

◆ Action() [11/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 180 of file Hand_Actions.c.

181 {
182#ifdef DEVELOPER
184 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionSwap", e.m_Player.ToString());
185#endif
187 if (es)
188 {
189 GameInventory.LocationSwap(es.GetSrc(), es.m_Src2, es.GetDst(), es.m_Dst2);
190 e.m_Player.OnItemInHandsChanged();
191 }
192 else
193 Error("[hndfsm] HandActionSwap - this is no HandEventSwap");
194 }
static proto native bool LocationSwap(notnull InventoryLocation src1, notnull InventoryLocation src2, notnull InventoryLocation dst1, notnull InventoryLocation dst2)
swaps two entities

References Error(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), and GameInventory::LocationSwap().

◆ Action() [12/12]

override void HandActionBase::Action ( HandEventBase e)
inlineprivate

Definition at line 199 of file Hand_Actions.c.

200 {
201#ifdef DEVELOPER
203 Debug.InventoryHFSMLog("Action - STS = " + e.m_Player.GetSimulationTimeStamp(), e.ToString(), "n/a", "HandActionForceSwap", e.m_Player.ToString());
204#endif
205 HandEventForceSwap es = HandEventForceSwap.Cast(e);
206 if (es)
207 {
208 GameInventory.LocationSwap(es.GetSrc(), es.m_Src2, es.GetDst(), es.m_Dst2);
209 e.m_Player.OnItemInHandsChanged();
210 }
211 else
212 Error("[hndfsm] HandActionForceSwap - this is no HandEventForceSwap");
213 }

References Error(), Debug::InventoryHFSMLog(), LogManager::IsInventoryHFSMLogEnable(), and GameInventory::LocationSwap().


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