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

◆ TransferItem()

override bool ZombieContainer::TransferItem ( )
inlineprotected

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

631 {
632 LeftArea left_area = LeftArea.Cast( GetParent() );
633 EntityAI item;
634 if (CanTakeToInventory())
635 {
636
637 if (left_area)
638 {
639 if (GetFocusedContainer().IsInherited( ContainerWithCargo ) || GetFocusedContainer().IsInherited( ContainerWithCargoAndAttachments ))
640 {
641 return GetFocusedContainer().TransferItem();
642 }
643 else
644 {
645 item = GetFocusedItem();
646 if( item )
647 {
648 GetGame().GetPlayer().PredictiveTakeEntityToInventory( FindInventoryLocationType.CARGO, item );
649 return true;
650 }
651 }
652 }
653 else
654 {
655 if (!GetFocusedContainer().IsInherited( ContainerWithCargo ) && !GetFocusedContainer().IsInherited( ContainerWithCargoAndAttachments ))
656 {
657 item = GetFocusedItem();
658 if (item)
659 {
660 GetGame().GetPlayer().PredictiveTakeEntityToInventory( FindInventoryLocationType.CARGO, item );
661 return true;
662 }
663 }
664 }
665 }
666 return false;
667 }
class LogManager EntityAI
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17
proto native DayZPlayer GetPlayer()
override EntityAI GetFocusedItem()
Определения CargoContainer.c:733
proto native CGame GetGame()
proto native Widget GetParent()
Get parent of the Effect.
Определения Effect.c:407

Перекрестные ссылки Container::GetFocusedItem(), GetGame(), GetParent() и CGame::GetPlayer().