summaryrefslogtreecommitdiff
path: root/src/net/tmwa/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-01 17:11:12 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-01 19:28:09 +0300
commit1b9ea6d00c6923abe1da37833e7772d5a5e34b6d (patch)
treea4c4da9f46f171dfd559a10d7fb673164cd03e59 /src/net/tmwa/playerhandler.cpp
parente6eef288f86dcc16aa2b5ba20c9079ead78f17e2 (diff)
downloadplus-1b9ea6d00c6923abe1da37833e7772d5a5e34b6d.tar.gz
plus-1b9ea6d00c6923abe1da37833e7772d5a5e34b6d.tar.bz2
plus-1b9ea6d00c6923abe1da37833e7772d5a5e34b6d.tar.xz
plus-1b9ea6d00c6923abe1da37833e7772d5a5e34b6d.zip
Move LUK stat from net enum into attributes.
Diffstat (limited to 'src/net/tmwa/playerhandler.cpp')
-rw-r--r--src/net/tmwa/playerhandler.cpp11
1 files changed, 8 insertions, 3 deletions
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+"));