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

◆ OnExecuteServer()

override void ActionTakeFireplaceIndoor::OnExecuteServer ( ActionData action_data)
inlineprivate

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

34 {
35 Object target_object = action_data.m_Target.GetObject();
36 FireplaceIndoor fireplace_indoor = FireplaceIndoor.Cast( target_object );
37
38 TakeFireplaceFromIndoorLambda lambda( fireplace_indoor, m_NewItemTypeName, action_data.m_Player );
39 InventoryLocation targetIL = new InventoryLocation;
40 bool found = action_data.m_Player.GetInventory().FindFirstFreeLocationForNewEntity( m_NewItemTypeName, FindInventoryLocationType.ANY, targetIL );
41 if ( found )
42 {
43 // allow action only if there is place in inventory
44 lambda.OverrideNewLocation( targetIL );
45 action_data.m_Player.ServerReplaceItemWithNew( lambda );
46 }
47 }
void TakeFireplaceFromIndoorLambda(EntityAI old_item, string new_item_type, PlayerBase player)
Определения ActionTakeFireplaceIndoor.c:54
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17
class LOD Object

Перекрестные ссылки ActionData, m_NewItemTypeName и TakeFireplaceFromIndoorLambda().