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

◆ OnExecuteImpl()

void ActionTakeHybridAttachmentToHands::OnExecuteImpl ( ActionData action_data)
inlineprotected

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

67 {
68 EntityAI tgt_entity = EntityAI.Cast( action_data.m_Target.GetObject() );
69 string component_name = tgt_entity.GetActionComponentName( action_data.m_Target.GetComponentIndex() );
70 ItemBase attachment;
71
72 if ( tgt_entity && ItemBase.CastTo(attachment, tgt_entity.FindAttachmentBySlotName(component_name)) )
73 {
74 ClearInventoryReservationEx(action_data);
75 float stackable = attachment.GetTargetQuantityMax(-1);
76
77 if( stackable == 0 || stackable >= attachment.GetQuantity() )
78 {
79 //take to hands
80 action_data.m_Player.PredictiveTakeEntityToHands( attachment );
81 }
82 else if( stackable != 0 && stackable < attachment.GetQuantity() )
83 {
84 //split and take to hands
85 attachment.SplitIntoStackMaxHandsClient( action_data.m_Player );
86 }
87 }
88 }
class LogManager EntityAI
class GP5GasMask extends MaskBase ItemBase
void ClearInventoryReservationEx(ActionData action_data)
Определения ActionBase.c:1025

Перекрестные ссылки ActionData и ActionBase::ClearInventoryReservationEx().

Используется в OnExecute().