public void UnlockWeapon()
        {
            if (WULogin.Cash(1) < weapon.Weapon.UnlockCost || Data.Unlocked.Bool(weapon.Weapon.WeaponName))
            {
                return;
            }

            WUMoney.SpendCurrency(weapon.Weapon.UnlockCost, "dust", $"unlock,{(int)weapon_type}");
        }
        public void UpgradeMaxAmmo()
        {
            int upgrade_cost = weapon.UpgradeAmmoCost;

            if (upgrade_cost <= 0)
            {
                return;
            }
            string meta = $"upgrade,ammo,{weapon.LevelAmmo + 1},{(int)weapon_type}";

            WUMoney.SpendCurrency(upgrade_cost, "dust", meta);
        }
        public void UpgradeRange()
        {
            int upgrade_cost = weapon.UpgradeRangeCost;

            if (upgrade_cost <= 0)
            {
                return;
            }
            string meta = $"upgrade,range,{weapon.LevelRange + 1},{(int)weapon_type}";

            WUMoney.SpendCurrency(upgrade_cost, "dust", meta);
        }
Exemple #4
0
        public void BuyAmmo(bool max)
        {
            int upgrade_cost = weapon.Weapon.AmmoCost[weapon.LevelAmmo] * (max ? buyable : 1);

            if (upgrade_cost <= 0)
            {
                return;
            }
            string meta = $"ammo,{(max ? buyable : 1)},{(int)weapon_type}";

            WUMoney.SpendCurrency(upgrade_cost, "dust", meta);
        }