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

◆ PredictiveTakeOrSwapAttachment()

bool EntityAI::PredictiveTakeOrSwapAttachment ( notnull EntityAI item)
inlineprotected

См. определение в файле 3_Game/DayZ/Entities/Man.c строка 533

534 {
535 if( GetInventory().CanAddAttachment( item ) )
536 {
538 }
539 else
540 {
541 GameInventory inventory = GetInventory();
542 GameInventory itemInventory = item.GetInventory();
543 for( int i = 0; i < itemInventory.GetSlotIdCount(); ++i )
544 {
545 int slot_id = itemInventory.GetSlotId(i);
546 EntityAI slot_item = inventory.FindAttachment( slot_id );
547 if( slot_item && inventory.CanSwapEntitiesEx( item, slot_item ) )
548 {
549 return PredictiveSwapEntities(item, slot_item);
550 }
551 }
552 }
553 return false;
554 }
class LogManager EntityAI
override bool PredictiveTakeEntityToTargetAttachment(notnull EntityAI target, notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:697
bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
Определения 3_Game/DayZ/Entities/Man.c:422
static bool CanSwapEntitiesEx(notnull EntityAI item1, notnull EntityAI item2)
proto native int GetSlotId(int index)
attachments
proto native int GetSlotIdCount()
proto native EntityAI FindAttachment(int slot)
Returns attached entity in slot (you can use InventorySlots.GetSlotIdFromString(name) to get slot id)

Перекрестные ссылки GameInventory::CanSwapEntitiesEx(), GameInventory::FindAttachment(), GameInventory::GetSlotId(), GameInventory::GetSlotIdCount(), PredictiveSwapEntities() и PredictiveTakeEntityToTargetAttachment().