diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/dialogsmanager.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/characterdisplay.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/charselectdialog.cpp | 4 | ||||
-rw-r--r-- | src/gui/windows/killstats.cpp | 11 | ||||
-rw-r--r-- | src/gui/windows/killstats.h | 2 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 4 |
6 files changed, 13 insertions, 12 deletions
diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp index 8f63662db..f24352a43 100644 --- a/src/gui/dialogsmanager.cpp +++ b/src/gui/dialogsmanager.cpp @@ -168,7 +168,7 @@ void DialogsManager::attributeChanged(const AttributesT id, percent = 50; const int max = PlayerInfo::getAttribute( Attributes::MAX_WEIGHT) * percent / 100; - const int total = oldVal; + const int total = CAST_S32(oldVal); if (newVal >= max && total < max) { weightNoticeTime = cur_time + 5; diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp index efc256516..e5743615a 100644 --- a/src/gui/widgets/characterdisplay.cpp +++ b/src/gui/widgets/characterdisplay.cpp @@ -143,7 +143,7 @@ void CharacterDisplay::mouseMoved(MouseEvent &event A_UNUSED) CAST_U32( mCharacter->data.mAttributes[Attributes::PLAYER_BASE_LEVEL])), // TRANSLATORS: character money - strprintf(_("Money: %s"), UnitsDb::formatCurrency( + strprintf(_("Money: %s"), UnitsDb::formatCurrency64( mCharacter->data.mAttributes[Attributes::MONEY]).c_str())); } else diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp index aa4a80b4a..7b43aca09 100644 --- a/src/gui/windows/charselectdialog.cpp +++ b/src/gui/windows/charselectdialog.cpp @@ -259,8 +259,8 @@ void CharSelectDialog::action(const ActionEvent &event) CAST_U32( character->data.mAttributes[Attributes::PLAYER_BASE_LEVEL]), strExp.c_str(), - UnitsDb::formatCurrency( - character->data.mAttributes[Attributes::MONEY]).c_str()); + UnitsDb::formatCurrency(CAST_S32( + character->data.mAttributes[Attributes::MONEY])).c_str()); CREATEWIDGET(OkDialog, data->getName(), msg, // TRANSLATORS: ok dialog button _("OK"), diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp index a110f21f1..ec6d331d8 100644 --- a/src/gui/windows/killstats.cpp +++ b/src/gui/windows/killstats.cpp @@ -288,7 +288,8 @@ void KillStats::gainXp(int64_t xp) } // TRANSLATORS: kill stats window label mLine4->setCaption(strprintf(_("Kills: %s, total exp: %s"), - toString(mKillCounter).c_str(), toString(mExpCounter).c_str())); + toString(mKillCounter).c_str(), + toString(CAST_U64(mExpCounter)).c_str())); // TRANSLATORS: kill stats window label mLine7->setCaption(strprintf(_("Kills/Min: %s, Exp/Min: %s"), @@ -314,7 +315,7 @@ void KillStats::recalcStats() { const int64_t newExp = PlayerInfo::getAttribute(Attributes::PLAYER_EXP); if (m1minExpTime != 0) - m1minSpeed = newExp - m1minExpNum; + m1minSpeed = CAST_S32(newExp - m1minExpNum); else m1minSpeed = 0; m1minExpTime = curTime; @@ -326,7 +327,7 @@ void KillStats::recalcStats() const int newExp = PlayerInfo::getAttribute( Attributes::PLAYER_EXP_NEEDED); if (m1minExpTime != 0) - m1minSpeed = newExp - m1minExpNum; + m1minSpeed = CAST_S32(newExp - m1minExpNum); mStatsReUpdated = true; m1minExpNum = newExp; } @@ -335,7 +336,7 @@ void KillStats::recalcStats() { const int64_t newExp = PlayerInfo::getAttribute(Attributes::PLAYER_EXP); if (m5minExpTime != 0) - m5minSpeed = newExp - m5minExpNum; + m5minSpeed = CAST_S32(newExp - m5minExpNum); else m5minSpeed = 0; m5minExpTime = curTime; @@ -346,7 +347,7 @@ void KillStats::recalcStats() { const int64_t newExp = PlayerInfo::getAttribute(Attributes::PLAYER_EXP); if (m15minExpTime != 0) - m15minSpeed = newExp - m15minExpNum; + m15minSpeed = CAST_S32(newExp - m15minExpNum); else m15minSpeed = 0; m15minExpTime = curTime; diff --git a/src/gui/windows/killstats.h b/src/gui/windows/killstats.h index d471e1f73..a57c5c439 100644 --- a/src/gui/windows/killstats.h +++ b/src/gui/windows/killstats.h @@ -94,7 +94,7 @@ class KillStats final : public Window, Label *mLastKillExpLabel A_NONNULLPOINTER; int mKillCounter; /**< Session Kill counter. */ - int mExpCounter; /**< Session Exp counter. */ + int64_t mExpCounter; /**< Session Exp counter. */ int mKillTCounter; /**< Timer Kill counter. */ int mExpTCounter; /**< Timer Exp counter. */ diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index b86e3e847..092e401c2 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -311,7 +311,7 @@ void StatusWindow::attributeChanged(const AttributesT id, case Attributes::MONEY: // TRANSLATORS: status window label mMoneyLabel->setCaption(strprintf(_("Money: %s"), - UnitsDb::formatCurrency(newVal).c_str())); + UnitsDb::formatCurrency64(newVal).c_str())); mMoneyLabel->adjustSize(); break; @@ -347,7 +347,7 @@ void StatusWindow::attributeChanged(const AttributesT id, } else { - lvl = (expNeed - 20000) / 150; + lvl = CAST_S32((expNeed - 20000) / 150); blocked = true; PlayerInfo::setAttribute(Attributes::PLAYER_JOB_LEVEL, lvl); |