summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-01 16:01:43 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-01 19:28:09 +0300
commit52c0fc91e3b59b0f9a2cac98cb4cd1eb5847884c (patch)
treecf74fecfc3e828a0aefb81545e7e5aca417787c0
parentb43ec95b7046619a35f5bdf2f3c1bb3e9663bdb7 (diff)
downloadManaVerse-52c0fc91e3b59b0f9a2cac98cb4cd1eb5847884c.tar.gz
ManaVerse-52c0fc91e3b59b0f9a2cac98cb4cd1eb5847884c.tar.bz2
ManaVerse-52c0fc91e3b59b0f9a2cac98cb4cd1eb5847884c.tar.xz
ManaVerse-52c0fc91e3b59b0f9a2cac98cb4cd1eb5847884c.zip
Move MATK stat from net enum into attributes.
-rw-r--r--src/being/attributes.h3
-rw-r--r--src/net/ea/eaprotocol.h3
-rw-r--r--src/net/ea/playerhandler.cpp6
-rw-r--r--src/net/eathena/attrs.h3
-rw-r--r--src/net/eathena/generalhandler.cpp2
-rw-r--r--src/net/eathena/playerhandler.cpp4
-rw-r--r--src/net/tmwa/attrs.h3
-rw-r--r--src/net/tmwa/generalhandler.cpp2
-rw-r--r--src/net/tmwa/playerhandler.cpp4
9 files changed, 14 insertions, 16 deletions
diff --git a/src/being/attributes.h b/src/being/attributes.h
index 0c8c8e11f..cd753c2fa 100644
--- a/src/being/attributes.h
+++ b/src/being/attributes.h
@@ -51,7 +51,8 @@ namespace Attributes
CRIT,
FLEE,
HIT,
- MDEF
+ MDEF,
+ MATK
};
} // namespace Attributes
diff --git a/src/net/ea/eaprotocol.h b/src/net/ea/eaprotocol.h
index 618b1c0c8..f355b16a9 100644
--- a/src/net/ea/eaprotocol.h
+++ b/src/net/ea/eaprotocol.h
@@ -35,8 +35,7 @@ enum
EA_LUK,
EA_ATK,
- EA_DEF,
- EA_MATK
+ EA_DEF
};
enum
diff --git a/src/net/ea/playerhandler.cpp b/src/net/ea/playerhandler.cpp
index 63b865784..4c9f5be61 100644
--- a/src/net/ea/playerhandler.cpp
+++ b/src/net/ea/playerhandler.cpp
@@ -278,7 +278,7 @@ void PlayerHandler::processPlayerArrowMessage(Net::MessageIn &msg)
bool PlayerHandler::canUseMagic() const
{
- return PlayerInfo::getStatEffective(EA_MATK) > 0;
+ return PlayerInfo::getStatEffective(Attributes::MATK) > 0;
}
int PlayerHandler::getJobLocation() const
@@ -488,10 +488,10 @@ void PlayerHandler::setStat(const int type,
PlayerInfo::updateAttrs();
break;
case 0x002b:
- PlayerInfo::setStatBase(EA_MATK, base);
+ PlayerInfo::setStatBase(Attributes::MATK, base);
break;
case 0x002c:
- PlayerInfo::setStatMod(EA_MATK, base);
+ PlayerInfo::setStatMod(Attributes::MATK, base);
break;
case 0x002d:
PlayerInfo::setStatBase(EA_DEF, base);
diff --git a/src/net/eathena/attrs.h b/src/net/eathena/attrs.h
index 65783b3a9..c40b48092 100644
--- a/src/net/eathena/attrs.h
+++ b/src/net/eathena/attrs.h
@@ -37,8 +37,7 @@ namespace EAthena
LUK,
ATK,
- DEF,
- MATK
+ DEF
};
} // namespace EAthena
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 9ca3fb3bd..a07040f18 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -355,7 +355,7 @@ void GeneralHandler::gameStarted() const
statusWindow->addAttribute(ATK, _("Attack"));
statusWindow->addAttribute(DEF, _("Defense"));
- statusWindow->addAttribute(MATK, _("M.Attack"));
+ statusWindow->addAttribute(Attributes::MATK, _("M.Attack"));
statusWindow->addAttribute(Attributes::MDEF, _("M.Defense"));
// xgettext:no-c-format
statusWindow->addAttribute(Attributes::HIT, _("% Accuracy"));
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index c8a5705c7..b3b7df25b 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -337,10 +337,10 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
PlayerInfo::updateAttrs();
val = msg.readInt16("right matk");
- PlayerInfo::setStatBase(MATK, val, false);
+ PlayerInfo::setStatBase(Attributes::MATK, val, false);
val = msg.readInt16("left matk");
- PlayerInfo::setStatMod(MATK, val);
+ PlayerInfo::setStatMod(Attributes::MATK, val);
PlayerInfo::setStatBase(DEF, msg.readInt16("left def"), false);
PlayerInfo::setStatMod(DEF, msg.readInt16("right def"));
diff --git a/src/net/tmwa/attrs.h b/src/net/tmwa/attrs.h
index 50a7ca977..03c38d804 100644
--- a/src/net/tmwa/attrs.h
+++ b/src/net/tmwa/attrs.h
@@ -37,8 +37,7 @@ namespace TmwAthena
LUK,
ATK,
- DEF,
- MATK
+ DEF
};
} // namespace TmwAthena
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index effe75204..0fdb7017c 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -322,7 +322,7 @@ void GeneralHandler::gameStarted() const
// TRANSLATORS: player stat
statusWindow->addAttribute(DEF, _("Defense"));
// TRANSLATORS: player stat
- statusWindow->addAttribute(MATK, _("M.Attack"));
+ statusWindow->addAttribute(Attributes::MATK, _("M.Attack"));
// TRANSLATORS: player stat
statusWindow->addAttribute(Attributes::MDEF, _("M.Defense"));
// TRANSLATORS: player stat
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 857ac1e8d..247a0f6d9 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -405,10 +405,10 @@ void PlayerHandler::processPlayerStatUpdate5(Net::MessageIn &msg)
PlayerInfo::updateAttrs();
val = msg.readInt16("matk");
- PlayerInfo::setStatBase(MATK, val, false);
+ PlayerInfo::setStatBase(Attributes::MATK, val, false);
val = msg.readInt16("matk+");
- PlayerInfo::setStatMod(MATK, val);
+ PlayerInfo::setStatMod(Attributes::MATK, val);
PlayerInfo::setStatBase(DEF, msg.readInt16("def"), false);
PlayerInfo::setStatMod(DEF, msg.readInt16("def+"));