private bool CheckUserCurrency(int userId) { var currency = _databaseCurrencyHandler.GetCurrency(userId); if (currency.HasValue) { return(currency.Value >= Properties.Price); } return(false); }
/// <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); }