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

◆ InventoryReservation()

override bool ActionTakeItem::InventoryReservation ( ActionData action_data)
inlineprivate

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

68 {
69 bool success = true;
70
71 InventoryLocation il = new InventoryLocation;
72
73 ItemBase targetItem;
74 if ( ItemBase.CastTo(targetItem, action_data.m_Target.GetObject()) )
75 {
76 action_data.m_Player.GetInventory().FindFreeLocationFor( targetItem , FindInventoryLocationType.ANY, il );
77 if ( action_data.m_Player.GetInventory().HasInventoryReservation( targetItem, il) )
78 {
79 success = false;
80 }
81 else
82 {
83 action_data.m_Player.GetInventory().AddInventoryReservationEx( targetItem, il, GameInventory.c_InventoryReservationTimeoutMS);
84 }
85 }
86
87 if ( success )
88 {
89 if( il )
90 action_data.m_ReservedInventoryLocations.Insert(il);
91 }
92
93 return success;
94 }
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:18
PlayerBase m_Player
Определения ActionBase.c:40
ref ActionTarget m_Target
Определения ActionBase.c:39
ref array< ref InventoryLocation > m_ReservedInventoryLocations
Определения ActionBase.c:42

Перекрестные ссылки GameInventory::c_InventoryReservationTimeoutMS, ActionData::m_Player, ActionData::m_ReservedInventoryLocations и ActionData::m_Target.