summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/attrs.h3
-rw-r--r--src/net/tmwa/generalhandler.cpp3
-rw-r--r--src/net/tmwa/playerhandler.cpp11
3 files changed, 10 insertions, 7 deletions
diff --git a/src/net/tmwa/attrs.h b/src/net/tmwa/attrs.h
index 7009e6400..0377d10cd 100644
--- a/src/net/tmwa/attrs.h
+++ b/src/net/tmwa/attrs.h
@@ -33,8 +33,7 @@ namespace TmwAthena
AGI,
VIT,
INT,
- DEX,
- LUK
+ DEX
};
} // namespace TmwAthena
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 5107e873d..d246d1980 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -315,8 +315,7 @@ void GeneralHandler::gameStarted() const
// TRANSLATORS: player stat
statusWindow->addAttribute(DEX, _("Dexterity"), "dex", true);
// TRANSLATORS: player stat
- statusWindow->addAttribute(LUK, _("Luck"), "luk", true);
-
+ statusWindow->addAttribute(Attributes::LUK, _("Luck"), "luk", true);
// TRANSLATORS: player stat
statusWindow->addAttribute(Attributes::ATK, _("Attack"));
// TRANSLATORS: player stat
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index f94dabfc2..217d7aff8 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -161,7 +161,7 @@ void PlayerHandler::emote(const uint8_t emoteId) const
void PlayerHandler::increaseAttribute(const int attr) const
{
- if (attr >= STR && attr <= LUK)
+ if (attr >= STR && attr <= Attributes::LUK)
{
createOutPacket(CMSG_STAT_UPDATE_REQUEST);
outMsg.writeInt16(static_cast<int16_t>(attr));
@@ -394,11 +394,16 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
msg.readUInt8("dex cost");
val = msg.readUInt8("luk");
- PlayerInfo::setStatBase(LUK, val);
+ PlayerInfo::setStatBase(Attributes::LUK, val);
if (statusWindow)
- statusWindow->setPointsNeeded(LUK, msg.readUInt8("luk cost"));
+ {
+ statusWindow->setPointsNeeded(Attributes::LUK,
+ msg.readUInt8("luk cost"));
+ }
else
+ {
msg.readUInt8("luk cost");
+ }
PlayerInfo::setStatBase(Attributes::ATK, msg.readInt16("atk"), false);
PlayerInfo::setStatMod(Attributes::ATK, msg.readInt16("atk+"));