diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/windows/ministatuswindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/windows/statuswindow.cpp | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp index c97fa1cd4..212906861 100644 --- a/src/gui/windows/ministatuswindow.cpp +++ b/src/gui/windows/ministatuswindow.cpp @@ -412,7 +412,7 @@ void MiniStatusWindow::mouseMoved(MouseEvent &event) const int64_t expNeed = PlayerInfo::getAttribute64( Attributes::PLAYER_JOB_EXP_NEEDED); const int32_t jobLevel = PlayerInfo::getAttribute( - Attributes::PLAYER_JOB); + Attributes::PLAYER_JOB_LEVEL); const std::string expStr = toString(CAST_U64(exp)); const std::string expNeedStr = toString(CAST_U64(expNeed)); const std::string jobLevelStr = toString(CAST_U64(jobLevel)); diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp index f096a3dd1..b86e3e847 100644 --- a/src/gui/windows/statuswindow.cpp +++ b/src/gui/windows/statuswindow.cpp @@ -322,14 +322,16 @@ void StatusWindow::attributeChanged(const AttributesT id, mLvlLabel->adjustSize(); break; - case Attributes::PLAYER_JOB: + // +++ probable need use only some attributes here + case Attributes::PLAYER_JOB_LEVEL: case Attributes::PLAYER_JOB_EXP: case Attributes::PLAYER_JOB_EXP_NEEDED: if (blocked) return; if (mJobLvlLabel != nullptr) { - int lvl = PlayerInfo::getAttribute(Attributes::PLAYER_JOB); + int lvl = PlayerInfo::getAttribute( + Attributes::PLAYER_JOB_LEVEL); const int64_t exp = PlayerInfo::getAttribute( Attributes::PLAYER_JOB_EXP); const int64_t expNeed = PlayerInfo::getAttribute( @@ -347,7 +349,8 @@ void StatusWindow::attributeChanged(const AttributesT id, { lvl = (expNeed - 20000) / 150; blocked = true; - PlayerInfo::setAttribute(Attributes::PLAYER_JOB, lvl); + PlayerInfo::setAttribute(Attributes::PLAYER_JOB_LEVEL, + lvl); blocked = false; } } @@ -361,7 +364,8 @@ void StatusWindow::attributeChanged(const AttributesT id, blocked = true; PlayerInfo::setAttribute(Attributes::PLAYER_JOB_EXP_NEEDED, 20000 + lvl * 150); - PlayerInfo::setAttribute(Attributes::PLAYER_JOB, lvl); + PlayerInfo::setAttribute(Attributes::PLAYER_JOB_LEVEL, + lvl); blocked = false; } |