summaryrefslogtreecommitdiff
path: root/src/gui/windows/statuswindow.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-27 23:13:28 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-27 23:13:28 +0300
commitf70dcfe0a82db3aee879953f117d12aecc4fce85 (patch)
tree0e0e4deac4c18ff478bdc42aba4ee3c834ae1390 /src/gui/windows/statuswindow.cpp
parent9429dc4f5b5b6102a8b575de25ce5d8e7170551f (diff)
downloadplus-f70dcfe0a82db3aee879953f117d12aecc4fce85.tar.gz
plus-f70dcfe0a82db3aee879953f117d12aecc4fce85.tar.bz2
plus-f70dcfe0a82db3aee879953f117d12aecc4fce85.tar.xz
plus-f70dcfe0a82db3aee879953f117d12aecc4fce85.zip
Rename Attributes::PLAYER_JOB to Attributes::PLAYER_JOB_LEVEL.
Diffstat (limited to 'src/gui/windows/statuswindow.cpp')
-rw-r--r--src/gui/windows/statuswindow.cpp12
1 files changed, 8 insertions, 4 deletions
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;
}