diff --git a/data/modules/scripts/daily_reward/daily_reward.lua b/data/modules/scripts/daily_reward/daily_reward.lua index c319a37923c..1c6feba310c 100644 --- a/data/modules/scripts/daily_reward/daily_reward.lua +++ b/data/modules/scripts/daily_reward/daily_reward.lua @@ -463,7 +463,7 @@ function Player.selectDailyReward(self, msg) -- Adding items to store inbox local inbox = self:getSlotItem(CONST_SLOT_STORE_INBOX) - if inbox then + if not inbox then self:sendError("You do not have enough space in your store inbox.") return false end diff --git a/src/account/account.cpp b/src/account/account.cpp index 30b92b5c694..5c093f917bd 100644 --- a/src/account/account.cpp +++ b/src/account/account.cpp @@ -170,7 +170,7 @@ namespace account { } void Account::addPremiumDays(const int32_t &days) { - uint32_t timeLeft = static_cast((m_account.premiumLastDay - getTimeNow()) % 86400); + auto timeLeft = static_cast((m_account.premiumLastDay - getTimeNow()) % 86400); setPremiumDays(m_account.premiumRemainingDays + days); if (timeLeft > 0) { @@ -199,8 +199,8 @@ namespace account { time_t currentTime = getTimeNow(); - uint32_t daysLeft = static_cast((lastDay - currentTime) / 86400); - uint32_t timeLeft = static_cast((lastDay - currentTime) % 86400); + auto daysLeft = static_cast((lastDay - currentTime) / 86400); + auto timeLeft = static_cast((lastDay - currentTime) % 86400); m_account.premiumRemainingDays = daysLeft > 0 ? daysLeft : 0;