From 1b9ea6d00c6923abe1da37833e7772d5a5e34b6d Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Oct 2014 17:11:12 +0300 Subject: Move LUK stat from net enum into attributes. --- src/net/eathena/playerhandler.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/net/eathena/playerhandler.cpp') diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 6fca5bb08..54876f14b 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -154,7 +154,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(attr)); @@ -326,11 +326,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("left atk"), false); PlayerInfo::setStatMod(Attributes::ATK, msg.readInt16("right atk")); -- cgit v1.2.3-70-g09d2