309 {
310 InventoryLocation src = new InventoryLocation();
311 if (item.GetInventory().GetCurrentInventoryLocation(src))
312 {
314 {
317 if (inventoryOwner.IsAlive())
318 {
319 if (LogManager.IsInventoryHFSMLogEnable())
hndDebugPrint(
"[inv] HumanInventory::Take2Att(" +
typename.EnumToString(
InventoryMode, mode) +
") item=" + item +
" slot=" + slot);
320 InventoryLocation dst = new InventoryLocation();
322
324 return true;
325 }
326
327 return super.TakeEntityAsAttachmentEx(mode, item, slot);
328
329 default:
330 return super.TakeEntityAsAttachmentEx(mode, item, slot);
331 }
332 }
333
334 Error(
"HumanInventory::TakeEntityAsAttachmentEx: No inventory location");
335 return false;
336 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
void hndDebugPrint(string s)
InventoryLocationType
types of Inventory Location
proto native EntityAI GetInventoryOwner()
Engine native functions.
bool HandEvent(InventoryMode mode, HandEventBase e)
proto native void SetAttachment(notnull EntityAI parent, EntityAI e, int slotId)
sets current inventory location type to Attachment with slot id set to <slotId>
proto native int GetType()
returns type of InventoryLocation
void Error(string err)
Messagebox with error message.