339 {
340 Weapon_Base weapon;
341 InventoryLocation ilWeapon = new InventoryLocation();
342 GameInventory playerInventory =
m_player.GetInventory();
343 if (Weapon_Base.CastTo(weapon,
m_player.GetItemInHands()) )
344 {
345 weapon.GetInventory().GetCurrentInventoryLocation(ilWeapon);
347 {
348 return false;
349 }
350 else
351 {
353 }
354 }
355
356 if( invLoc )
357 {
359 {
361 return false;
362 }
363 else
364 {
366 }
367 }
368
369 if( mag )
370 {
373
375
376 {
378 if (invLoc)
379 {
381 }
382 return false;
383 }
384 else
385 {
387 }
388 }
391
392 return true;
393 }
bool ClearInventoryReservationEx(EntityAI item, InventoryLocation dst)
static proto native bool HasInventoryReservation(EntityAI item, InventoryLocation dst)
Internally: HasInventoryReservationEx(item, dst, FindInventoryReservationMode.LEGACY,...
bool AddInventoryReservationEx(EntityAI item, InventoryLocation dst, int timeout_ms)
proto native EntityAI GetItem()
returns item of current inventory location
Magazine m_PendingTargetMagazine
Weapon_Base m_WeaponInHand
ref InventoryLocation m_PendingInventoryLocation
ref InventoryLocation m_TargetInventoryLocation