diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/attrs.h | 3 | ||||
-rw-r--r-- | src/net/eathena/generalhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/eathena/playerhandler.cpp | 11 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/net/eathena/attrs.h b/src/net/eathena/attrs.h index 049aff97f..df9e0347d 100644 --- a/src/net/eathena/attrs.h +++ b/src/net/eathena/attrs.h @@ -33,8 +33,7 @@ namespace EAthena AGI, VIT, INT, - DEX, - LUK + DEX }; } // namespace EAthena diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index bebf22842..b8c8f2322 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -351,7 +351,7 @@ void GeneralHandler::gameStarted() const statusWindow->addAttribute(VIT, _("Vitality"), "vit", true); statusWindow->addAttribute(INT, _("Intelligence"), "int", true); statusWindow->addAttribute(DEX, _("Dexterity"), "dex", true); - statusWindow->addAttribute(LUK, _("Luck"), "luk", true); + statusWindow->addAttribute(Attributes::LUK, _("Luck"), "luk", true); statusWindow->addAttribute(Attributes::ATK, _("Attack")); statusWindow->addAttribute(Attributes::DEF, _("Defense")); 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<int16_t>(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")); |