193 {
195 {
196 Man man_src = Man.Cast(src.GetParent());
197 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[inv] HI::RedirectToHandEvent - source location == HANDS, player has to handle this");
198
200
202
203 if (r_index >= 0)
204 {
205 InventoryLocation r_il = new InventoryLocation();
207
211 {
212 r_il.
GetParent().GetOnReleaseLock().Invoke(item);
213 }
215 {
217 }
218 }
219
220 man_src.GetHumanInventory().HandEvent(mode, new HandEventMoveTo(man_src, src, dst));
221 return true;
222 }
223
225 {
226 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[inv] HI::RedirectToHandEvent - dst location == HANDS, player has to handle this");
227
228 Man man_dst = Man.Cast(dst.GetParent());
229 man_dst.GetHumanInventory().HandEvent(mode, new HandEventTake(man_dst, src));
230 return true;
231 }
232 return false;
233 }
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