From 1d6c226f2aae2410f9785709aefd88f1a17e6bca Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Oct 2014 17:44:52 +0300 Subject: Move STR stat from net enum into attributes. --- src/net/tmwa/playerhandler.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/net/tmwa/playerhandler.cpp') diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 0899e9508..89ba976a9 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 <= Attributes::LUK) + if (attr >= Attributes::STR && attr <= Attributes::LUK) { createOutPacket(CMSG_STAT_UPDATE_REQUEST); outMsg.writeInt16(static_cast(attr)); @@ -359,11 +359,16 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) msg.readInt16("char points")); unsigned int val = msg.readUInt8("str"); - PlayerInfo::setStatBase(STR, val); + PlayerInfo::setStatBase(Attributes::STR, val); if (statusWindow) - statusWindow->setPointsNeeded(STR, msg.readUInt8("str cost")); + { + statusWindow->setPointsNeeded(Attributes::STR, + msg.readUInt8("str cost")); + } else + { msg.readUInt8("str cost"); + } val = msg.readUInt8("agi"); PlayerInfo::setStatBase(Attributes::AGI, val); -- cgit v1.2.3-60-g2f50