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

◆ TakeEntityAsAttachmentEx()

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

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

299 {
300 InventoryLocation src = new InventoryLocation();
301 if (item.GetInventory().GetCurrentInventoryLocation(src))
302 {
303 switch (src.GetType())
304 {
305 case InventoryLocationType.HANDS:
306 if (GetInventoryOwner().IsAlive())
307 {
308 if (LogManager.IsInventoryHFSMLogEnable()) hndDebugPrint("[inv] HumanInventory::Take2Att(" + typename.EnumToString(InventoryMode, mode) + ") item=" + item + " slot=" + slot);
309 InventoryLocation dst = new InventoryLocation();
310 EntityAI src_entity = GetInventoryOwner();
311 dst.SetAttachment(src_entity, item, slot);
312
313 HandEvent(mode, new HandEventMoveTo(GetManOwner(), src, dst));
314 return true;
315 }
316
317 return super.TakeEntityAsAttachmentEx(mode, item, slot);
318
319 default:
320 return super.TakeEntityAsAttachmentEx(mode, item, slot);
321 }
322 }
323
324 Error("HumanInventory::TakeEntityAsAttachmentEx: No inventory location");
325 return false;
326 }
InventoryMode
NOTE: PREDICTIVE is not to be used at all in multiplayer.
Определения Inventory.c:22
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().

Используется в EntityAI::TakeEntityAsAttachmentExImpl().