From b43ec95b7046619a35f5bdf2f3c1bb3e9663bdb7 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Oct 2014 15:47:30 +0300 Subject: Move MDEF 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 | 5 +++-- src/net/tmwa/attrs.h | 3 +-- src/net/tmwa/generalhandler.cpp | 2 +- src/net/tmwa/playerhandler.cpp | 4 ++-- 9 files changed, 14 insertions(+), 15 deletions(-) diff --git a/src/being/attributes.h b/src/being/attributes.h index d58c2247a..0c8c8e11f 100644 --- a/src/being/attributes.h +++ b/src/being/attributes.h @@ -50,7 +50,8 @@ namespace Attributes MANNER, CRIT, FLEE, - HIT + HIT, + MDEF }; } // namespace Attributes diff --git a/src/net/ea/eaprotocol.h b/src/net/ea/eaprotocol.h index df71a0a80..618b1c0c8 100644 --- a/src/net/ea/eaprotocol.h +++ b/src/net/ea/eaprotocol.h @@ -36,8 +36,7 @@ enum EA_ATK, EA_DEF, - EA_MATK, - EA_MDEF + EA_MATK }; enum diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp index 7e116e9a2..63b865784 100644 --- a/src/net/ea/playerhandler.cpp +++ b/src/net/ea/playerhandler.cpp @@ -500,10 +500,10 @@ void PlayerHandler::setStat(const int type, PlayerInfo::setStatMod(EA_DEF, base); break; case 0x002f: - PlayerInfo::setStatBase(EA_MDEF, base); + PlayerInfo::setStatBase(Attributes::MDEF, base); break; case 0x0030: - PlayerInfo::setStatMod(EA_MDEF, base); + PlayerInfo::setStatMod(Attributes::MDEF, base); break; case 0x0031: PlayerInfo::setStatBase(Attributes::HIT, base); diff --git a/src/net/eathena/attrs.h b/src/net/eathena/attrs.h index 75f5653e3..65783b3a9 100644 --- a/src/net/eathena/attrs.h +++ b/src/net/eathena/attrs.h @@ -38,8 +38,7 @@ namespace EAthena ATK, DEF, - MATK, - MDEF + MATK }; } // namespace EAthena diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp index 03c2d8864..9ca3fb3bd 100644 --- a/src/net/eathena/generalhandler.cpp +++ b/src/net/eathena/generalhandler.cpp @@ -356,7 +356,7 @@ void GeneralHandler::gameStarted() const statusWindow->addAttribute(ATK, _("Attack")); statusWindow->addAttribute(DEF, _("Defense")); statusWindow->addAttribute(MATK, _("M.Attack")); - statusWindow->addAttribute(MDEF, _("M.Defense")); + statusWindow->addAttribute(Attributes::MDEF, _("M.Defense")); // xgettext:no-c-format statusWindow->addAttribute(Attributes::HIT, _("% Accuracy")); // xgettext:no-c-format diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp index b0e58c3ff..c8a5705c7 100644 --- a/src/net/eathena/playerhandler.cpp +++ b/src/net/eathena/playerhandler.cpp @@ -345,8 +345,9 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) PlayerInfo::setStatBase(DEF, msg.readInt16("left def"), false); PlayerInfo::setStatMod(DEF, msg.readInt16("right def")); - PlayerInfo::setStatBase(MDEF, msg.readInt16("left mdef"), false); - PlayerInfo::setStatMod(MDEF, msg.readInt16("right mdef")); + PlayerInfo::setStatBase(Attributes::MDEF, + msg.readInt16("left mdef"), false); + PlayerInfo::setStatMod(Attributes::MDEF, msg.readInt16("right mdef")); PlayerInfo::setStatBase(Attributes::HIT, msg.readInt16("hit")); diff --git a/src/net/tmwa/attrs.h b/src/net/tmwa/attrs.h index 04a49a9ca..50a7ca977 100644 --- a/src/net/tmwa/attrs.h +++ b/src/net/tmwa/attrs.h @@ -38,8 +38,7 @@ namespace TmwAthena ATK, DEF, - MATK, - MDEF + MATK }; } // namespace TmwAthena diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp index 3ec0e234d..effe75204 100644 --- a/src/net/tmwa/generalhandler.cpp +++ b/src/net/tmwa/generalhandler.cpp @@ -324,7 +324,7 @@ void GeneralHandler::gameStarted() const // TRANSLATORS: player stat statusWindow->addAttribute(MATK, _("M.Attack")); // TRANSLATORS: player stat - statusWindow->addAttribute(MDEF, _("M.Defense")); + statusWindow->addAttribute(Attributes::MDEF, _("M.Defense")); // TRANSLATORS: player stat // xgettext:no-c-format statusWindow->addAttribute(Attributes::HIT, _("% Accuracy")); diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp index 514a1d839..857ac1e8d 100644 --- a/src/net/tmwa/playerhandler.cpp +++ b/src/net/tmwa/playerhandler.cpp @@ -413,8 +413,8 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg) PlayerInfo::setStatBase(DEF, msg.readInt16("def"), false); PlayerInfo::setStatMod(DEF, msg.readInt16("def+")); - PlayerInfo::setStatBase(MDEF, msg.readInt16("mdef"), false); - PlayerInfo::setStatMod(MDEF, msg.readInt16("mdef+")); + PlayerInfo::setStatBase(Attributes::MDEF, msg.readInt16("mdef"), false); + PlayerInfo::setStatMod(Attributes::MDEF, msg.readInt16("mdef+")); PlayerInfo::setStatBase(Attributes::HIT, msg.readInt16("hit")); -- cgit v1.2.3-70-g09d2