629 {
630 Weapon_Base wpn;
631 int mi;
632 InventoryLocation il;
633 int slotID;
634 bool accepted = false;
636 {
638 return false;
639
641 return false;
642
644 {
647 }
650 Magazine mag = NULL;
651
652 Weapon_Base.CastTo( wpn,
m_player.GetItemInHands() );
653 if ( wpn )
654 mi = wpn.GetCurrentMuzzle();
655
657 {
659 {
660 if ( !ctx.
Read(mag) )
661 break;
662
663 if ( !mag || !wpn )
664 break;
665
666 slotID = wpn.GetSlotFromMuzzleIndex(mi);
667 il = new InventoryLocation();
669 if(
GetGame().AddInventoryJunctureEx(
m_player, mag, il,
false, 10000) )
670 accepted = true;
671
673 break;
674 }
676 {
677 if ( !ctx.
Read(mag) )
678 break;
679
680 il = new InventoryLocation();
682 break;
683
684 if ( !mag || !wpn )
685 break;
686
687 if ( !wpn.GetMagazine(mi) )
688 break;
689
691 accepted = true;
694
695 break;
696 }
698 {
699 il = new InventoryLocation();
701 break;
702
704 break;
705
706 if ( !wpn )
707 break;
708
709 Magazine det_mag = wpn.GetMagazine(mi);
710 mag = Magazine.Cast(il.
GetItem());
711 if ( !det_mag || ( mag != det_mag) )
712 break;
713
715 accepted = true;
718 break;
719 }
721 {
723
724 if ( !mag )
725 break;
726
728 accepted = true;
730 break;
731 }
733 {
735
736 if ( !mag )
737 break;
738
740 accepted = true;
742 break;
743 }
745 {
746 accepted = true;
747
748 break;
749 }
751 {
752 accepted = true;
753 break;
754 }
756 {
757 accepted = true;
758 break;
759 }
760 default:
762 break;
763 }
765 }
766
767 return accepted;
768 }
const int AT_WPN_DETACH_MAGAZINE
const int AT_WPN_ATTACH_MAGAZINE
const int AT_WPN_LOAD_BULLET
const int AT_WPN_SWAP_MAGAZINE
const int AT_WPN_LOAD_MULTI_BULLETS_START
const int AT_WPN_EJECT_BULLET
const int AT_WPN_SET_NEXT_MUZZLE_MODE
proto native bool ClearJuncture(Man player, notnull EntityAI item)
proto native bool IsValid()
verify current set inventory location
proto native void SetAttachment(notnull EntityAI parent, EntityAI e, int slotId)
sets current inventory location type to Attachment with slot id set to <slotId>
bool ReadFromContext(ParamsReadContext ctx)
proto native EntityAI GetItem()
returns item of current inventory location
proto bool Read(void value_in)
int m_PendingWeaponActionAcknowledgmentID
Magazine m_PendingTargetMagazine
ref InventoryLocation m_PendingInventoryLocation
int m_PendingWeaponAction
proto native CGame GetGame()
void Error(string err)
Messagebox with error message.