예제 #1
0
        //============================================================================*
        // Copy()
        //============================================================================*

        public void Copy(cFirearm Firearm)
        {
            base.Copy(Firearm);

            //----------------------------------------------------------------------------*
            // General
            //----------------------------------------------------------------------------*

            m_eFirearmType = Firearm.m_eFirearmType;

            //----------------------------------------------------------------------------*
            // Specs
            //----------------------------------------------------------------------------*

            m_dBarrelLength = Firearm.m_dBarrelLength;

            m_fScoped     = Firearm.m_fScoped;
            m_dTwist      = Firearm.m_dTwist;
            m_eTurretType = Firearm.m_eTurretType;

            m_dSightHeight = Firearm.m_dSightHeight;
            m_dScopeClick  = Firearm.m_dScopeClick;

            m_dZeroRange = Firearm.m_dZeroRange;

            m_dHeadSpace = Firearm.m_dHeadSpace;
            m_dNeck      = Firearm.m_dNeck;

            m_FirearmCaliberList = new cFirearmCaliberList(Firearm.m_FirearmCaliberList);

            m_FirearmBulletList = new cFirearmBulletList(Firearm.m_FirearmBulletList);

            //----------------------------------------------------------------------------*
            // Details
            //----------------------------------------------------------------------------*

            m_strImageFile = Firearm.m_strImageFile;

            m_dTransferFees = Firearm.m_dTransferFees;
            m_dOtherFees    = Firearm.m_dOtherFees;

            m_strReceiverFinish = Firearm.m_strReceiverFinish;
            m_strBarrelFinish   = Firearm.m_strBarrelFinish;

            m_strType   = Firearm.m_strType;
            m_strAction = Firearm.m_strAction;
            m_strHammer = Firearm.m_strHammer;

            m_strMagazine = Firearm.m_strMagazine;
            m_nCapacity   = Firearm.m_nCapacity;
        }
예제 #2
0
        //============================================================================*
        // cFirearmCaliberList() - Copy Constructor
        //============================================================================*

        public cFirearmCaliberList(cFirearmCaliberList FirearmCaliberList)
        {
            Clear();

            if (FirearmCaliberList == null)
            {
                return;
            }

            foreach (cFirearmCaliber CheckFirearmCaliber in FirearmCaliberList)
            {
                cFirearmCaliber FirearmCaliber = new cFirearmCaliber(CheckFirearmCaliber);

                Add(FirearmCaliber);
            }
        }
예제 #3
0
        //============================================================================*
        // Synch() - Caliber
        //============================================================================*

        public bool Synch(cCaliber Caliber)
        {
            if (m_FirearmCaliberList == null)
            {
                m_FirearmCaliberList = new cFirearmCaliberList();
            }

            foreach (cFirearmCaliber FirearmCaliber in m_FirearmCaliberList)
            {
                if (FirearmCaliber.Caliber != null && FirearmCaliber.Caliber.CompareTo(Caliber) == 0)
                {
                    FirearmCaliber.Caliber = Caliber;

                    return(true);
                }
            }

            return(false);
        }
예제 #4
0
        //============================================================================*
        // HasCaliber()
        //============================================================================*

        public bool HasCaliber(cCaliber Caliber)
        {
            if (Caliber == null)
            {
                return(false);
            }

            if (m_FirearmCaliberList == null)
            {
                m_FirearmCaliberList = new cFirearmCaliberList();
            }

            foreach (cFirearmCaliber CheckFirearmCaliber in m_FirearmCaliberList)
            {
                if (CheckFirearmCaliber.Caliber.CompareTo(Caliber) == 0)
                {
                    return(true);
                }
            }

            return(false);
        }