summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/statuswindow.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gui/statuswindow.cpp b/src/gui/statuswindow.cpp
index ed29be119..c4d8339e1 100644
--- a/src/gui/statuswindow.cpp
+++ b/src/gui/statuswindow.cpp
@@ -331,8 +331,15 @@ void StatusWindow::event(Channels channel _UNUSED_,
// then we fixing it :)
std::pair<int, int> exp
= PlayerInfo::getStatExperience(id);
- lvl = (exp.second - 20000) / 150;
- PlayerInfo::setStatBase(id, lvl);
+ if (exp.second < 20000)
+ {
+ lvl = 0;
+ }
+ else
+ {
+ lvl = (exp.second - 20000) / 150;
+ PlayerInfo::setStatBase(id, lvl);
+ }
}
mJobLvlLabel->setCaption(strprintf(_("Job: %d"), lvl));