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

◆ PredictiveTakeOrSwapAttachment()

bool EntityAI::PredictiveTakeOrSwapAttachment ( notnull EntityAI item)
inlineprotected

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

640 {
641 if( GetInventory().CanAddAttachment( item ) )
642 {
644 }
645 else
646 {
647 GameInventory inventory = GetInventory();
648 GameInventory itemInventory = item.GetInventory();
649 for( int i = 0; i < itemInventory.GetSlotIdCount(); ++i )
650 {
651 int slot_id = itemInventory.GetSlotId(i);
652 EntityAI slot_item = inventory.FindAttachment( slot_id );
653 if( slot_item && inventory.CanSwapEntitiesEx( item, slot_item ) )
654 {
655 return PredictiveSwapEntities(item, slot_item);
656 }
657 }
658 }
659 return false;
660 }
class LogManager EntityAI
override bool PredictiveTakeEntityAsAttachment(notnull EntityAI item)
Определения 3_Game/DayZ/Entities/Man.c:450
bool PredictiveSwapEntities(notnull EntityAI item1, notnull EntityAI item2)
Определения 3_Game/DayZ/Entities/Man.c:528
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() и PredictiveTakeEntityAsAttachment().