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

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

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

39 {
40 ItemBase tgt_item = ItemBase.Cast( target.GetObject() );
41 EntityAI tgt_parent = EntityAI.Cast( target.GetParent() );
42 EntityAI tgt_entity = EntityAI.Cast( target.GetObject() );
43
44 if ( !tgt_item || !tgt_entity || !tgt_parent )
45 return false;
46
47 if ( !tgt_parent || !tgt_item.IsItemBase() || !tgt_item.IsTakeable() || tgt_item.IsBeingPlaced() )
48 return false;
49
50 if ( player.GetCommand_Vehicle() )
51 return false;
52
53 if ( player.GetInventory().CanAddEntityIntoHands(tgt_entity) ) //&& !player.GetInventory().CanAddEntityIntoInventory(tgt_entity) )
54 {
55 if ( tgt_entity.GetHierarchyRootPlayer() != player )
56 {
57 if ( tgt_entity.CanDetachAttachment( tgt_parent ) && tgt_parent.CanReleaseAttachment( tgt_entity ) )
58 return true;
59 }
60 }
61
62 return false;
63 }
Определения Building.c:6
override bool IsTakeable()
Определения BaseBuildingBase.c:988
Определения InventoryItem.c:731

Перекрестные ссылки ActionTarget и ItemBase::IsTakeable().