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

◆ InventoryReservation()

override bool ActionTakeItem::InventoryReservation ( ActionData action_data)
inlineprivate

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

97 {
98 bool success = true;
99
100 InventoryLocation il = new InventoryLocation;
101
102 ItemBase targetItem;
103 if ( ItemBase.CastTo(targetItem, action_data.m_Target.GetObject()) )
104 {
105 action_data.m_Player.GetInventory().FindFreeLocationFor( targetItem , FindInventoryLocationType.ANY, il );
106 if ( action_data.m_Player.GetInventory().HasInventoryReservation( targetItem, il) )
107 {
108 success = false;
109 }
110 else
111 {
112 action_data.m_Player.GetInventory().AddInventoryReservationEx( targetItem, il, GameInventory.c_InventoryReservationTimeoutMS);
113 }
114 }
115
116 if ( success )
117 {
118 if( il )
119 action_data.m_ReservedInventoryLocations.Insert(il);
120 }
121
122 return success;
123 }
class GP5GasMask extends MaskBase ItemBase
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17

Перекрестные ссылки ActionData и GameInventory::c_InventoryReservationTimeoutMS.