summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/being/localplayer.cpp4
-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/widgets/characterdisplay.cpp2
-rw-r--r--src/gui/windows/charselectdialog.cpp2
-rw-r--r--src/gui/windows/chatwindow.cpp2
-rw-r--r--src/gui/windows/killstats.cpp2
-rw-r--r--src/gui/windows/ministatuswindow.cpp4
-rw-r--r--src/gui/windows/statuswindow.cpp6
-rw-r--r--src/net/eathena/charserverrecv.cpp2
-rw-r--r--src/net/eathena/playerhandler.cpp2
-rw-r--r--src/net/tmwa/charserverrecv.cpp2
-rw-r--r--src/net/tmwa/playerhandler.cpp2
14 files changed, 20 insertions, 17 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 7a64dea24..e1ba96893 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -1264,7 +1264,7 @@ void LocalPlayer::attributeChanged(const AttributesT id,
addXpMessage(change);
break;
}
- case Attributes::PLAYER_LEVEL:
+ case Attributes::PLAYER_BASE_LEVEL:
mLevel = newVal;
break;
case Attributes::PLAYER_HP:
@@ -2630,7 +2630,7 @@ void LocalPlayer::respawn()
int LocalPlayer::getLevel() const
{
- return PlayerInfo::getAttribute(Attributes::PLAYER_LEVEL);
+ return PlayerInfo::getAttribute(Attributes::PLAYER_BASE_LEVEL);
}
void LocalPlayer::updateNavigateList()
diff --git a/src/enums/being/attributes.h b/src/enums/being/attributes.h
index c98413c69..7252a539a 100644
--- a/src/enums/being/attributes.h
+++ b/src/enums/being/attributes.h
@@ -27,7 +27,7 @@
enumStart(Attributes)
{
// player attributes
- PLAYER_LEVEL = 0,
+ PLAYER_BASE_LEVEL = 0,
PLAYER_HP,
PLAYER_MAX_HP,
PLAYER_MP,
diff --git a/src/enums/being/attributesstrings.cpp b/src/enums/being/attributesstrings.cpp
index 4d75d54a4..51c116355 100644
--- a/src/enums/being/attributesstrings.cpp
+++ b/src/enums/being/attributesstrings.cpp
@@ -31,7 +31,7 @@ namespace AttributesEnum
{
stringEnumStart(AttributesT)
// player attributes
- strEnumDef(Attributes, PLAYER_LEVEL)
+ strEnumDef2(Attributes, PLAYER_BASE_LEVEL, "PLAYER_LEVEL")
strEnumDef(Attributes, PLAYER_HP)
strEnumDef(Attributes, PLAYER_MAX_HP)
strEnumDef(Attributes, PLAYER_MP)
diff --git a/src/enums/simpletypes/stringdefines.h b/src/enums/simpletypes/stringdefines.h
index 67631aa8a..3d3dc273a 100644
--- a/src/enums/simpletypes/stringdefines.h
+++ b/src/enums/simpletypes/stringdefines.h
@@ -40,6 +40,9 @@
#define strEnumDef(prefix, name) \
mStringsArray[#name] = prefix::name; \
+#define strEnumDef2(prefix, name, str) \
+ mStringsArray[str] = prefix::name; \
+
#define stringEnumEnd \
}
diff --git a/src/gui/widgets/characterdisplay.cpp b/src/gui/widgets/characterdisplay.cpp
index c3b5ea064..efc256516 100644
--- a/src/gui/widgets/characterdisplay.cpp
+++ b/src/gui/widgets/characterdisplay.cpp
@@ -141,7 +141,7 @@ void CharacterDisplay::mouseMoved(MouseEvent &event A_UNUSED)
// TRANSLATORS: character level
strprintf(_("Level: %u"),
CAST_U32(
- mCharacter->data.mAttributes[Attributes::PLAYER_LEVEL])),
+ mCharacter->data.mAttributes[Attributes::PLAYER_BASE_LEVEL])),
// TRANSLATORS: character money
strprintf(_("Money: %s"), UnitsDb::formatCurrency(
mCharacter->data.mAttributes[Attributes::MONEY]).c_str()));
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index d7ba2ea83..aa4a80b4a 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -257,7 +257,7 @@ void CharSelectDialog::action(const ActionEvent &event)
CAST_U32(
character->data.mAttributes[Attributes::PLAYER_MAX_MP]),
CAST_U32(
- character->data.mAttributes[Attributes::PLAYER_LEVEL]),
+ character->data.mAttributes[Attributes::PLAYER_BASE_LEVEL]),
strExp.c_str(),
UnitsDb::formatCurrency(
character->data.mAttributes[Attributes::MONEY]).c_str());
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index 091548381..a3bb4829b 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -1045,7 +1045,7 @@ void ChatWindow::attributeChanged(const AttributesT id,
}
break;
}
- case Attributes::PLAYER_LEVEL:
+ case Attributes::PLAYER_BASE_LEVEL:
battleChatLog(std::string(
"Level: ").append(toString(CAST_S32(
newVal))),
diff --git a/src/gui/windows/killstats.cpp b/src/gui/windows/killstats.cpp
index 002bfcaf3..a110f21f1 100644
--- a/src/gui/windows/killstats.cpp
+++ b/src/gui/windows/killstats.cpp
@@ -439,7 +439,7 @@ void KillStats::attributeChanged(const AttributesT id,
case Attributes::PLAYER_EXP_NEEDED:
gainXp(newVal - oldVal);
break;
- case Attributes::PLAYER_LEVEL:
+ case Attributes::PLAYER_BASE_LEVEL:
{
const std::string strXpPercent = toString(CAST_U64(
PlayerInfo::getAttribute(
diff --git a/src/gui/windows/ministatuswindow.cpp b/src/gui/windows/ministatuswindow.cpp
index 64d1a1175..fcaff8759 100644
--- a/src/gui/windows/ministatuswindow.cpp
+++ b/src/gui/windows/ministatuswindow.cpp
@@ -356,14 +356,14 @@ void MiniStatusWindow::mouseMoved(MouseEvent &event)
{
// TRANSLATORS: status bar label
level = strprintf(_("Level: %d (GM %d)"),
- PlayerInfo::getAttribute(Attributes::PLAYER_LEVEL),
+ PlayerInfo::getAttribute(Attributes::PLAYER_BASE_LEVEL),
localPlayer->getGroupId());
}
else
{
// TRANSLATORS: status bar label
level = strprintf(_("Level: %d"),
- PlayerInfo::getAttribute(Attributes::PLAYER_LEVEL));
+ PlayerInfo::getAttribute(Attributes::PLAYER_BASE_LEVEL));
}
const int64_t exp = PlayerInfo::getAttribute64(Attributes::PLAYER_EXP);
diff --git a/src/gui/windows/statuswindow.cpp b/src/gui/windows/statuswindow.cpp
index 62da4e71d..462f22021 100644
--- a/src/gui/windows/statuswindow.cpp
+++ b/src/gui/windows/statuswindow.cpp
@@ -271,7 +271,7 @@ void StatusWindow::updateLevelLabel()
{
// TRANSLATORS: status window label
mLvlLabel->setCaption(strprintf(_("Level: %d (%s %d)"),
- PlayerInfo::getAttribute(Attributes::PLAYER_LEVEL),
+ PlayerInfo::getAttribute(Attributes::PLAYER_BASE_LEVEL),
name.c_str(),
groupId));
}
@@ -279,7 +279,7 @@ void StatusWindow::updateLevelLabel()
{
// TRANSLATORS: status window label
mLvlLabel->setCaption(strprintf(_("Level: %d"),
- PlayerInfo::getAttribute(Attributes::PLAYER_LEVEL)));
+ PlayerInfo::getAttribute(Attributes::PLAYER_BASE_LEVEL)));
}
mLvlLabel->adjustSize();
}
@@ -371,7 +371,7 @@ void StatusWindow::attributeChanged(const AttributesT id,
mMoneyLabel->adjustSize();
break;
- case Attributes::PLAYER_LEVEL:
+ case Attributes::PLAYER_BASE_LEVEL:
// TRANSLATORS: status window label
mLvlLabel->setCaption(strprintf(_("Level: %d"),
CAST_S32(newVal)));
diff --git a/src/net/eathena/charserverrecv.cpp b/src/net/eathena/charserverrecv.cpp
index 9aea7602e..3178a6d5f 100644
--- a/src/net/eathena/charserverrecv.cpp
+++ b/src/net/eathena/charserverrecv.cpp
@@ -137,7 +137,7 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
weapon);
tempPlayer->setWeaponId(weapon);
- data.mAttributes[Attributes::PLAYER_LEVEL] = msg.readInt16("level");
+ data.mAttributes[Attributes::PLAYER_BASE_LEVEL] = msg.readInt16("level");
msg.readInt16("skill points");
const int bottomClothes = msg.readInt16("head bottom");
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 606b85529..c7361e1b0 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -581,7 +581,7 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
PlayerInfo::setAttribute(Attributes::PLAYER_CHAR_POINTS, base);
break;
case Sp::BASELEVEL:
- PlayerInfo::setAttribute(Attributes::PLAYER_LEVEL, base);
+ PlayerInfo::setAttribute(Attributes::PLAYER_BASE_LEVEL, base);
if (localPlayer != nullptr)
{
localPlayer->setLevel(base);
diff --git a/src/net/tmwa/charserverrecv.cpp b/src/net/tmwa/charserverrecv.cpp
index 0f16effa9..50571b29c 100644
--- a/src/net/tmwa/charserverrecv.cpp
+++ b/src/net/tmwa/charserverrecv.cpp
@@ -106,7 +106,7 @@ void CharServerRecv::readPlayerData(Net::MessageIn &msg,
weapon);
tempPlayer->setWeaponId(weapon);
- data.mAttributes[Attributes::PLAYER_LEVEL] = msg.readInt16("level");
+ data.mAttributes[Attributes::PLAYER_BASE_LEVEL] = msg.readInt16("level");
msg.readInt16("skill point");
const int bottomClothes = msg.readInt16("bottom clothes");
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 02102a78b..d234a6a4a 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -282,7 +282,7 @@ void PlayerHandler::setStat(Net::MessageIn &msg,
PlayerInfo::setAttribute(Attributes::PLAYER_CHAR_POINTS, base);
break;
case Sp::BASELEVEL:
- PlayerInfo::setAttribute(Attributes::PLAYER_LEVEL, base);
+ PlayerInfo::setAttribute(Attributes::PLAYER_BASE_LEVEL, base);
if (localPlayer != nullptr)
{
localPlayer->setLevel(base);