Esempio n. 1
0
        private bool CheckUserCurrency(int userId)
        {
            var currency = _databaseCurrencyHandler.GetCurrency(userId);

            if (currency.HasValue)
            {
                return(currency.Value >= Properties.Price);
            }

            return(false);
        }
Esempio n. 2
0
        /// <summary>
        /// Checks if the user has enough currency
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        private bool UserHasEnoughCurrency(int id)
        {
            var currency = _currencyDatabaseHandler.GetCurrency(id);

            if (currency.HasValue)
            {
                if (currency.Value >= Properties.Cost)
                {
                    return(true);
                }
            }

            return(false);
        }