diff options
-rw-r--r-- | src/being/attributes.h | 1 | ||||
-rw-r--r-- | src/net/ea/eaprotocol.h | 3 | ||||
-rw-r--r-- | src/net/ea/playerhandler.cpp | 4 | ||||
-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 | ||||
-rw-r--r-- | src/net/tmwa/attrs.h | 3 | ||||
-rw-r--r-- | src/net/tmwa/generalhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/tmwa/playerhandler.cpp | 11 |
9 files changed, 24 insertions, 17 deletions
diff --git a/src/being/attributes.h b/src/being/attributes.h index 3cb0e05f0..bb8df97a4 100644 --- a/src/being/attributes.h +++ b/src/being/attributes.h @@ -42,6 +42,7 @@ namespace Attributes SKILL_POINTS, CHAR_POINTS, CORR_POINTS, + LUK = 18, ATTACK_DELAY = 100, ATTACK_RANGE = 101, WALK_SPEED = 102, diff --git a/src/net/ea/eaprotocol.h b/src/net/ea/eaprotocol.h index 98ed935f9..0ab833e5c 100644 --- a/src/net/ea/eaprotocol.h +++ b/src/net/ea/eaprotocol.h @@ -31,8 +31,7 @@ enum EA_AGI, EA_VIT, EA_INT, - EA_DEX, - EA_LUK + EA_DEX }; enum diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index cc2de72c7..f16f6103f 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -382,7 +382,7 @@ void PlayerHandler::setStat(const int type, setStatComplex(EA_DEX); break; case 0x0012: - setStatComplex(EA_LUK); + setStatComplex(Attributes::LUK); break; case 0x0014: { @@ -470,7 +470,7 @@ void PlayerHandler::setStat(const int type, statusWindow->setPointsNeeded(EA_DEX, base); break; case 0x0025: - statusWindow->setPointsNeeded(EA_LUK, base); + statusWindow->setPointsNeeded(Attributes::LUK, base); break; case 0x0029: PlayerInfo::setStatBase(Attributes::ATK, base); 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")); diff --git a/src/net/tmwa/attrs.h b/src/net/tmwa/attrs.h index 7009e6400..0377d10cd 100644 --- a/src/net/tmwa/attrs.h +++ b/src/net/tmwa/attrs.h @@ -33,8 +33,7 @@ namespace TmwAthena AGI, VIT, INT, - DEX, - LUK + DEX }; } // namespace TmwAthena diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 5107e873d..d246d1980 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -315,8 +315,7 @@ void GeneralHandler::gameStarted() const // TRANSLATORS: player stat statusWindow->addAttribute(DEX, _("Dexterity"), "dex", true); // TRANSLATORS: player stat - statusWindow->addAttribute(LUK, _("Luck"), "luk", true); - + statusWindow->addAttribute(Attributes::LUK, _("Luck"), "luk", true); // TRANSLATORS: player stat statusWindow->addAttribute(Attributes::ATK, _("Attack")); // TRANSLATORS: player stat diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index f94dabfc2..217d7aff8 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 <= LUK) + if (attr >= STR && attr <= Attributes::LUK) { createOutPacket(CMSG_STAT_UPDATE_REQUEST); outMsg.writeInt16(static_cast<int16_t>(attr)); @@ -394,11 +394,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("atk"), false); PlayerInfo::setStatMod(Attributes::ATK, msg.readInt16("atk+")); |