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

◆ InventoryReservation()

override bool FirearmActionDetachMagazine_Old::InventoryReservation ( ActionData action_data)
inlineprivate

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

43 {
44 Magazine mag = Magazine.Cast(action_data.m_Target.GetObject());
45 InventoryLocation il = new InventoryLocation();
46 if( !action_data.m_Player.GetInventory().FindFreeLocationFor(mag, FindInventoryLocationType.ANY_CARGO, il) )
47 return false;
48
49 if( !super.InventoryReservation( action_data) )
50 return false;
51
52 DetachMagActionData action_data_dm = DetachMagActionData.Cast(action_data);
53 if( !action_data.m_Player.GetInventory().AddInventoryReservationEx(mag,il,10000) )
54 return false;
55
56 action_data_dm.m_ReservedInventoryLocations.Insert(il);
57 action_data_dm.m_ilMagazine = il;
58
59 return true;
60 }
FindInventoryLocationType
flags for searching locations in inventory
Определения InventoryLocation.c:17

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