201 {
203 {
204 Man man_src = Man.Cast(src.GetParent());
205 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[inv] HI::RedirectToHandEvent - source location == HANDS, player has to handle this");
206
208
210
211 if (r_index >= 0)
212 {
213 InventoryLocation r_il = new InventoryLocation();
215
219 {
220 r_il.
GetParent().GetOnReleaseLock().Invoke(item);
221 }
223 {
225 }
226 }
227
228 man_src.GetHumanInventory().HandEvent(mode, new HandEventMoveTo(man_src, src, dst));
229 return true;
230 }
231
233 {
234 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[inv] HI::RedirectToHandEvent - dst location == HANDS, player has to handle this");
235
236 Man man_dst = Man.Cast(dst.GetParent());
237 man_dst.GetHumanInventory().HandEvent(mode, new HandEventTake(man_dst, src));
238 return true;
239 }
240 return false;
241 }
void hndDebugPrint(string s)
InventoryLocationType
types of Inventory Location
proto native int FindUserReservedLocationIndex(notnull EntityAI e)
proto native void GetUserReservedLocation(int index, out notnull InventoryLocation dst)
proto native bool ClearUserReservedLocationAtIndex(int index)
proto native EntityAI GetParent()
returns parent of current inventory location
proto native int GetSlot()
returns slot id if current type is Attachment
proto native int GetType()
returns type of InventoryLocation