From a6f509e5724bea354c4da040b210ad21937d9b26 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Oct 2014 15:39:59 +0300 Subject: Move FLEE stat from net enum into attributes. --- src/being/attributes.h | 3 ++- src/net/ea/eaprotocol.h | 3 +-- src/net/ea/playerhandler.cpp | 4 ++-- src/net/eathena/attrs.h | 3 +-- src/net/eathena/generalhandler.cpp | 2 +- src/net/eathena/playerhandler.cpp | 4 ++-- src/net/tmwa/attrs.h | 3 +-- src/net/tmwa/generalhandler.cpp | 2 +- src/net/tmwa/playerhandler.cpp | 4 ++-- 9 files changed, 13 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/being/attributes.h b/src/being/attributes.h index b961985e0..4f1f6ffff 100644 --- a/src/being/attributes.h +++ b/src/being/attributes.h @@ -48,7 +48,8 @@ namespace Attributes ATTACK_SPEED = 103, KARMA, MANNER, - CRIT + CRIT, + FLEE }; } // namespace Attributes diff --git a/src/net/ea/eaprotocol.h b/src/net/ea/eaprotocol.h index 5bb9ef46d..cb21ff7f1 100644 --- a/src/net/ea/eaprotocol.h +++ b/src/net/ea/eaprotocol.h @@ -38,8 +38,7 @@ enum EA_DEF, EA_MATK, EA_MDEF, - EA_HIT, - EA_FLEE + EA_HIT }; enum diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index cafd4b681..54296f181 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -509,10 +509,10 @@ void PlayerHandler::setStat(const int type, PlayerInfo::setStatBase(EA_HIT, base); break; case 0x0032: - PlayerInfo::setStatBase(EA_FLEE, base); + PlayerInfo::setStatBase(Attributes::FLEE, base); break; case 0x0033: - PlayerInfo::setStatMod(EA_FLEE, base); + PlayerInfo::setStatMod(Attributes::FLEE, base); break; case 0x0034: PlayerInfo::setStatBase(Attributes::CRIT, base); diff --git a/src/net/eathena/attrs.h b/src/net/eathena/attrs.h index 424e6ea96..af4734f45 100644 --- a/src/net/eathena/attrs.h +++ b/src/net/eathena/attrs.h @@ -40,8 +40,7 @@ namespace EAthena DEF, MATK, MDEF, - HIT, - FLEE + HIT }; } // namespace EAthena diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index 5669d452e..a2e2e1be9 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -360,7 +360,7 @@ void GeneralHandler::gameStarted() const // xgettext:no-c-format statusWindow->addAttribute(HIT, _("% Accuracy")); // xgettext:no-c-format - statusWindow->addAttribute(FLEE, _("% Evade")); + statusWindow->addAttribute(Attributes::FLEE, _("% Evade")); // xgettext:no-c-format statusWindow->addAttribute(Attributes::CRIT, _("% Critical")); statusWindow->addAttribute(Attributes::ATTACK_DELAY, _("Attack Delay")); diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index 2617b70f6..e322e1374 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -350,8 +350,8 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) PlayerInfo::setStatBase(HIT, msg.readInt16("hit")); - PlayerInfo::setStatBase(FLEE, msg.readInt16("flee"), false); - PlayerInfo::setStatMod(FLEE, msg.readInt16("flee2/10")); + PlayerInfo::setStatBase(Attributes::FLEE, msg.readInt16("flee"), false); + PlayerInfo::setStatMod(Attributes::FLEE, msg.readInt16("flee2/10")); PlayerInfo::setStatBase(Attributes::CRIT, msg.readInt16("crit/10")); diff --git a/src/net/tmwa/attrs.h b/src/net/tmwa/attrs.h index 7989349af..4ee05f44e 100644 --- a/src/net/tmwa/attrs.h +++ b/src/net/tmwa/attrs.h @@ -40,8 +40,7 @@ namespace TmwAthena DEF, MATK, MDEF, - HIT, - FLEE + HIT }; } // namespace TmwAthena diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 67f0e8dcb..24638cd39 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -330,7 +330,7 @@ void GeneralHandler::gameStarted() const statusWindow->addAttribute(HIT, _("% Accuracy")); // TRANSLATORS: player stat // xgettext:no-c-format - statusWindow->addAttribute(FLEE, _("% Evade")); + statusWindow->addAttribute(Attributes::FLEE, _("% Evade")); // TRANSLATORS: player stat // xgettext:no-c-format statusWindow->addAttribute(Attributes::CRIT, _("% Critical")); diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 2167bf4a9..196c3eabf 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -418,8 +418,8 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) PlayerInfo::setStatBase(HIT, msg.readInt16("hit")); - PlayerInfo::setStatBase(FLEE, msg.readInt16("flee"), false); - PlayerInfo::setStatMod(FLEE, msg.readInt16("flee+")); + PlayerInfo::setStatBase(Attributes::FLEE, msg.readInt16("flee"), false); + PlayerInfo::setStatMod(Attributes::FLEE, msg.readInt16("flee+")); PlayerInfo::setStatBase(Attributes::CRIT, msg.readInt16("crit")); -- cgit v1.2.3-60-g2f50