summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/enums/being/attributes.h2
-rw-r--r--src/enums/being/attributesstrings.cpp2
-rw-r--r--src/enums/simpletypes/stringdefines.h3
-rw-r--r--src/gui/windows/ministatuswindow.cpp2
-rw-r--r--src/gui/windows/statuswindow.cpp12
-rw-r--r--src/net/eathena/charserverrecv.cpp2
-rw-r--r--src/net/eathena/playerhandler.cpp2
-rw-r--r--src/net/tmwa/charserverrecv.cpp3
-rw-r--r--src/net/tmwa/playerhandler.cpp2
9 files changed, 18 insertions, 12 deletions
diff --git a/src/enums/being/attributes.h b/src/enums/being/attributes.h
index 7cda13284..bb9432137 100644
--- a/src/enums/being/attributes.h
+++ b/src/enums/being/attributes.h
@@ -37,7 +37,7 @@ enumStart(Attributes)
MONEY,
TOTAL_WEIGHT,
MAX_WEIGHT,
- PLAYER_JOB = 10,
+ PLAYER_JOB_LEVEL = 10,
PLAYER_STR = 13,
PLAYER_AGI = 14,
PLAYER_VIT = 15,
diff --git a/src/enums/being/attributesstrings.cpp b/src/enums/being/attributesstrings.cpp
index 6dd24eef9..b9cd6659a 100644
--- a/src/enums/being/attributesstrings.cpp
+++ b/src/enums/being/attributesstrings.cpp
@@ -41,7 +41,7 @@ namespace AttributesEnum
strEnumDef(Attributes, MONEY)
strEnumDef(Attributes, TOTAL_WEIGHT)
strEnumDef(Attributes, MAX_WEIGHT)
- strEnumDef(Attributes, PLAYER_JOB)
+ strEnumDef2(Attributes, PLAYER_JOB_LEVEL, "PLAYER_JOB")
strEnumDef(Attributes, PLAYER_JOB_EXP)
strEnumDef(Attributes, PLAYER_JOB_EXP_NEEDED)
strEnumDef(Attributes, PLAYER_STR)
diff --git a/src/enums/simpletypes/stringdefines.h b/src/enums/simpletypes/stringdefines.h
index 3d3dc273a..6cdebf7c0 100644
--- a/src/enums/simpletypes/stringdefines.h
+++ b/src/enums/simpletypes/stringdefines.h
@@ -41,7 +41,8 @@
mStringsArray[#name] = prefix::name; \
#define strEnumDef2(prefix, name, str) \
- mStringsArray[str] = prefix::name; \
+ mStringsArray[#name] = prefix::name; \
+ mStringsArray[str] = prefix::name;
#define stringEnumEnd \
}
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;
}
diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp
index f60fb1ff0..8e64385ef 100644
--- a/src/net/eathena/charserverrecv.cpp
+++ b/src/net/eathena/charserverrecv.cpp
@@ -101,7 +101,7 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
data.mAttributes[Attributes::PLAYER_JOB_EXP] =
msg.readInt32("job exp");
}
- data.mAttributes[Attributes::PLAYER_JOB] =msg.readInt32("job level");
+ data.mAttributes[Attributes::PLAYER_JOB_LEVEL] =msg.readInt32("job level");
msg.readInt16("shoes?");
const int gloves = msg.readInt16("gloves");
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 9106fce26..a16984cfa 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -704,7 +704,7 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
PlayerInfo::updateAttrs();
break;
case Sp::JOBLEVEL:
- PlayerInfo::setAttribute(Attributes::PLAYER_JOB, base);
+ PlayerInfo::setAttribute(Attributes::PLAYER_JOB_LEVEL, base);
break;
default:
diff --git a/src/net/tmwa/charserverrecv.cpp b/src/net/tmwa/charserverrecv.cpp
index 474595bf0..8b0f960df 100644
--- a/src/net/tmwa/charserverrecv.cpp
+++ b/src/net/tmwa/charserverrecv.cpp
@@ -75,7 +75,8 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
data.mAttributes[Attributes::PLAYER_EXP] = msg.readInt32("base exp");
data.mAttributes[Attributes::MONEY] = msg.readInt32("money");
data.mAttributes[Attributes::PLAYER_JOB_EXP] = msg.readInt32("job exp");
- data.mAttributes[Attributes::PLAYER_JOB] = msg.readInt32("job level");
+ data.mAttributes[Attributes::PLAYER_JOB_LEVEL] =
+ msg.readInt32("job level");
const int shoes = msg.readInt16("shoes");
const int gloves = msg.readInt16("gloves");
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index e31539cd6..4d2e5cc33 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -405,7 +405,7 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
PlayerInfo::updateAttrs();
break;
case Sp::JOBLEVEL:
- PlayerInfo::setAttribute(Attributes::PLAYER_JOB, base);
+ PlayerInfo::setAttribute(Attributes::PLAYER_JOB_LEVEL, base);
break;
case Sp::GM_LEVEL:
localPlayer->setGroupId(base);