protected override bool TryCastShot()
        {
            var result = base.TryCastShot();

            try
            {
                if (compBuffM == null)
                {
                    compBuffM  = EquipmentSource.GetComp <CompBuffManager>();
                    properties = (NegativeRecoilProperties)verbProps;
                }

                //네거티브 리코일 버프가 없다면
                if (!(compBuffM.FindWithDef(properties.weaponBuffDef) is NegativeRecoilBuff nRWBuff))
                {
                    compBuffM.AddBuff(properties.weaponBuffDef, EquipmentSource);
                }
                else
                {
                    nRWBuff.AddOverlapLevel(1);
                }

                if (!(compBuffM.FindWithDef(properties.pawnBuffDef) is NegativeRecoilBuff nRPBuff))
                {
                    compBuffM.AddBuff(properties.pawnBuffDef, EquipmentSource);
                }
Пример #2
0
        protected override bool TryCastShot()
        {
            bool result = base.TryCastShot();

            try
            {
                if (compBuffM == null)
                {
                    compBuffM  = EquipmentSource.GetComp <CompBuffManager>();
                    properties = (NegativeRecoilProperties)verbProps;
                }
                NegativeRecoilBuff nRWBuff = compBuffM.FindWithDef(properties.weaponBuffDef) as NegativeRecoilBuff;
                NegativeRecoilBuff nRPBuff = compBuffM.FindWithDef(properties.pawnBuffDef) as NegativeRecoilBuff;
                //네거티브 리코일 버프가 없다면
                if (nRWBuff == null)
                {
                    compBuffM.AddBuff(properties.weaponBuffDef, EquipmentSource);
                }
                else
                {
                    nRWBuff.AddOverlapLevel(1);
                }

                if (nRPBuff == null)
                {
                    compBuffM.AddBuff(properties.pawnBuffDef, EquipmentSource);
                }
                else
                {
                    nRPBuff.AddOverlapLevel(1);
                }
            }
            catch (Exception ee)
            {
                Log.Error("Error : " + ee.ToString());
            }

            return(result);
        }