Ejemplo n.º 1
0
    private void Modify()
    {
        WeaponFunction component = GetComponent <WeaponFunction>();

        if (null != component)
        {
            WpnMod wpnMod = WeaponModifier.Instance.Get((int)component.weaponBy);
            if (wpnMod != null)
            {
                maxAmmo       = wpnMod.maxAmmo;
                explosionTime = wpnMod.explosionTime;
                speedFactor   = wpnMod.fSpeedFactor;
                AtkPow        = wpnMod.fAtkPow;
                Rigidity      = wpnMod.fRigidity;
                throwForce    = wpnMod.fThrowForce;
                Radius        = wpnMod.radius;
            }
            WpnModEx ex = WeaponModifier.Instance.GetEx((int)component.weaponBy);
            if (ex != null)
            {
                persistTime = ex.persistTime;
            }
            TWeapon tWeapon = (TWeapon)GetComponent <Weapon>().tItem;
            Item    item    = MyInfoManager.Instance.GetItemBySequence(component.ItemSeq);
            if (item == null)
            {
                item = MyInfoManager.Instance.GetUsingEquipByCode(tWeapon.code);
            }
            if (item != null)
            {
                int num   = 0;
                int grade = item.upgradeProps[num].grade;
                if (grade > 0)
                {
                    float value = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                    AtkPow += value;
                }
                num   = 6;
                grade = item.upgradeProps[num].grade;
                if (grade > 0)
                {
                    float value2 = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                    throwForce += value2;
                }
                num   = 7;
                grade = item.upgradeProps[num].grade;
                if (grade > 0)
                {
                    float value3 = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                    Radius += value3;
                }
            }
        }
    }
Ejemplo n.º 2
0
    protected override void Modify()
    {
        base.Modify();
        WpnModEx ex = WeaponModifier.Instance.GetEx((int)weaponBy);

        if (ex != null)
        {
            minBuckShot = ex.minBuckShot;
            maxBuckShot = ex.maxBuckShot;
        }
    }
Ejemplo n.º 3
0
 private void Modify()
 {
     if (RoomManager.Instance.CurrentRoomType != Room.ROOM_TYPE.BUNGEE)
     {
         WeaponFunction component = GetComponent <WeaponFunction>();
         if (null != component)
         {
             WpnMod wpnMod = WeaponModifier.Instance.Get((int)component.weaponBy);
             if (wpnMod != null)
             {
                 maxAmmo       = wpnMod.maxAmmo;
                 explosionTime = wpnMod.explosionTime;
                 speedFactor   = wpnMod.fSpeedFactor;
                 throwForce    = wpnMod.fThrowForce;
             }
             WpnModEx ex = WeaponModifier.Instance.GetEx((int)component.weaponBy);
             if (ex != null)
             {
                 persistTime = ex.persistTime;
             }
             TWeapon tWeapon = (TWeapon)GetComponent <Weapon>().tItem;
             Item    item    = MyInfoManager.Instance.GetItemBySequence(component.ItemSeq);
             if (item == null)
             {
                 item = MyInfoManager.Instance.GetUsingEquipByCode(tWeapon.code);
             }
             if (item != null)
             {
                 int num   = 0;
                 int grade = item.upgradeProps[num].grade;
                 if (grade > 0)
                 {
                     float value = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                     throwForce += value;
                 }
                 num   = 8;
                 grade = item.upgradeProps[num].grade;
                 if (grade > 0)
                 {
                     float num2 = persistTime = PimpManager.Instance.getValue((int)tWeapon.upgradeCategory, num, grade - 1);
                 }
             }
         }
     }
 }