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

◆ AttachItem()

void AttachItem ( ActionData action_data)
protected

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

142 {
143 EntityAI targetEAI;
144 if (action_data.m_Target.IsProxy())
145 {
146 targetEAI = EntityAI.Cast(action_data.m_Target.GetParent());
147 }
148 else
149 {
150 targetEAI = EntityAI.Cast(action_data.m_Target.GetObject());
151 }
152
153 if (targetEAI && action_data.m_MainItem)
154 {
155 int slotId = InventorySlots.GetSlotIdFromString(action_data.m_MainItem.GetExplosiveTriggerSlotName());
156 action_data.m_Player.PredictiveTakeEntityToTargetAttachmentEx(targetEAI, action_data.m_MainItem, slotId);
157 }
158 }
static proto native int GetSlotIdFromString(string slot_name)
converts string to slot_id
provides access to slot configuration
Определения InventorySlots.c:6

Перекрестные ссылки ActionData и InventorySlots::GetSlotIdFromString().

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