diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/attrs.h | 4 | ||||
-rw-r--r-- | src/net/eathena/charserverhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 11 |
4 files changed, 14 insertions, 8 deletions
diff --git a/src/net/eathena/attrs.h b/src/net/eathena/attrs.h index 77eeb5efd..a8db3fec5 100644 --- a/src/net/eathena/attrs.h +++ b/src/net/eathena/attrs.h @@ -27,9 +27,7 @@ namespace EAthena { enum { - JOB = 0xa, - - STR = 0xd + JOB = 0xa }; } // namespace EAthena diff --git a/src/net/eathena/charserverhandler.cpp b/src/net/eathena/charserverhandler.cpp index 0b48e8d80..6a0bd6509 100644 --- a/src/net/eathena/charserverhandler.cpp +++ b/src/net/eathena/charserverhandler.cpp @@ -198,7 +198,10 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg, character->dummy = tempPlayer; for (int i = 0; i < 6; i++) - character->data.mStats[i + STR].base = msg.readUInt8("stat"); + { + character->data.mStats[i + Attributes::STR].base + = msg.readUInt8("stat"); + } tempPlayer->setSprite(SPRITE_SHOE, shoes); tempPlayer->setSprite(SPRITE_GLOVES, gloves); diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index f94594933..0ddef128a 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -346,7 +346,7 @@ void GeneralHandler::gameStarted() const // protection against double addition attributes. statusWindow->clearAttributes(); - statusWindow->addAttribute(STR, _("Strength"), "str", true); + statusWindow->addAttribute(Attributes::STR, _("Strength"), "str", true); statusWindow->addAttribute(Attributes::AGI, _("Agility"), "agi", true); statusWindow->addAttribute(Attributes::VIT, _("Vitality"), "vit", true); statusWindow->addAttribute(Attributes::INT, 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); |