summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-01 17:44:52 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-01 19:28:09 +0300
commit1d6c226f2aae2410f9785709aefd88f1a17e6bca (patch)
treeb5d1d89f8c0418c3c0a95875285ac4c9350692b8 /src/net/eathena/playerhandler.cpp
parentb35357cfcd58ac26d2f9d008a2db5b931cccb428 (diff)
downloadmanaplus-1d6c226f2aae2410f9785709aefd88f1a17e6bca.tar.gz
manaplus-1d6c226f2aae2410f9785709aefd88f1a17e6bca.tar.bz2
manaplus-1d6c226f2aae2410f9785709aefd88f1a17e6bca.tar.xz
manaplus-1d6c226f2aae2410f9785709aefd88f1a17e6bca.zip
Move STR stat from net enum into attributes.
Diffstat (limited to 'src/net/eathena/playerhandler.cpp')
-rw-r--r--src/net/eathena/playerhandler.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 8e3b8f910..feb8b1046 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 <= Attributes::LUK)
+ if (attr >= Attributes::STR && attr <= Attributes::LUK)
{
createOutPacket(CMSG_STAT_UPDATE_REQUEST);
outMsg.writeInt16(static_cast<int16_t>(attr));
@@ -291,11 +291,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 need");
+ }
val = msg.readUInt8("agi");
PlayerInfo::setStatBase(Attributes::AGI, val);