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

◆ OnExecuteImpl()

void ActionAttachPowerSourceToPanel::OnExecuteImpl ( ActionData action_data)
inlineprotected

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

30 {
31 EntityAI target_entity = EntityAI.Cast( action_data.m_Target.GetObject() );
32 EntityAI item_entity = action_data.m_MainItem;
33
34 //find inventory location for attachment
35 InventoryLocation target_location = new InventoryLocation;
36 if ( target_entity.GetInventory().FindFirstFreeLocationForNewEntity( item_entity.GetType(), FindInventoryLocationType.ATTACHMENT, target_location ) )
37 {
38 action_data.m_Player.PredictiveTakeEntityToTargetAttachmentEx( target_entity, item_entity, target_location.GetSlot() );
39 }
40 }
class LogManager EntityAI
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17
proto native int GetSlot()
returns slot id if current type is Attachment

Перекрестные ссылки ActionData и InventoryLocation::GetSlot().

Используется в OnExecuteClient() и OnExecuteServer().