summaryrefslogtreecommitdiff
path: root/src/gui
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
parent9429dc4f5b5b6102a8b575de25ce5d8e7170551f (diff)
downloadmanaverse-f70dcfe0a82db3aee879953f117d12aecc4fce85.tar.gz
manaverse-f70dcfe0a82db3aee879953f117d12aecc4fce85.tar.bz2
manaverse-f70dcfe0a82db3aee879953f117d12aecc4fce85.tar.xz
manaverse-f70dcfe0a82db3aee879953f117d12aecc4fce85.zip
Rename Attributes::PLAYER_JOB to Attributes::PLAYER_JOB_LEVEL.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/ministatuswindow.cpp2
-rw-r--r--src/gui/windows/statuswindow.cpp12
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;
}