DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ TakeEntityAsAttachmentEx()

override bool HumanInventory::TakeEntityAsAttachmentEx ( InventoryMode mode,
notnull EntityAI item,
int slot )
inlineprivate

См. определение в файле HumanInventory.c строка 308

309 {
310 InventoryLocation src = new InventoryLocation();
311 if (item.GetInventory().GetCurrentInventoryLocation(src))
312 {
313 switch (src.GetType())
314 {
315 case InventoryLocationType.HANDS:
316 EntityAI inventoryOwner = GetInventoryOwner();
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();
321 dst.SetAttachment(inventoryOwner, item, slot);
322
323 HandEvent(mode, new HandEventMoveTo(GetManOwner(), src, dst));
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.
class LogManager EntityAI
void hndDebugPrint(string s)
Определения HandFSM.c:1
InventoryLocationType
types of Inventory Location
Определения InventoryLocation.c:4
proto native EntityAI GetInventoryOwner()
Engine native functions.
Man GetManOwner()
Определения HumanInventory.c:102
bool HandEvent(InventoryMode mode, HandEventBase e)
Определения HumanInventory.c:134
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.
Определения EnDebug.c:90

Перекрестные ссылки Error(), GameInventory::GetInventoryOwner(), GetManOwner(), InventoryLocation::GetType(), HandEvent(), hndDebugPrint(), LogManager::IsInventoryHFSMLogEnable() и InventoryLocation::SetAttachment().