515 {
516 PlayerBase player = PlayerBase.Cast(
g_Game.GetPlayer());
517 ActionManagerClient amc;
518
519 switch (combinationFlag)
520 {
521 case InventoryCombinationFlags.ADD_AS_ATTACHMENT:
522 return player.PredictiveTakeEntityToTargetAttachment(targetEntity, selectedEntity);
523 case InventoryCombinationFlags.ADD_AS_CARGO:
524 SplitItemUtils.TakeOrSplitToInventory(player, targetEntity, selectedEntity);
525 return true;
526 case InventoryCombinationFlags.COMBINE_QUANTITY2:
527 targetEntity.CombineItemsClient(selectedEntity);
528 return true;
529 case InventoryCombinationFlags.SET_ACTION:
530 Class.CastTo(amc, player.GetActionManager());
531 if (targetEntity == player.GetEntityInHands())
532 {
534 }
535 else
536 {
538 }
539 return true;
540 case InventoryCombinationFlags.PERFORM_ACTION:
541 Class.CastTo(amc, player.GetActionManager());
542 if (targetEntity == player.GetEntityInHands())
543 {
545 }
546 else
547 {
549 }
550 return true;
551 case InventoryCombinationFlags.SWAP_MAGAZINE:
552 return player.GetWeaponManager().SwapMagazine(Magazine.Cast(selectedEntity));
553 case InventoryCombinationFlags.SWAP:
554 return player.PredictiveSwapEntities(targetEntity, selectedEntity);
555 case InventoryCombinationFlags.FSWAP:
556 return player.PredictiveForceSwapEntities(selectedEntity, targetEntity, ilSwapDst);
557 default:
558 return false;
559 }
560
561 return false;
562 }
class GP5GasMask extends MaskBase ItemBase
void SetActionFromInventory(ItemBase mainItem, ItemBase targetItem)
void PerformActionFromInventory(ItemBase mainItem, ItemBase targetItem)