summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-04-16 20:50:41 -0600
committerJared Adams <jaxad0127@gmail.com>2010-04-16 20:50:41 -0600
commit924760c45e0f1aa1105e192bd83d6a4ce2c80f81 (patch)
treed37f519b1576de0b62bceb05dbd1625c5ea54f5e
parentcf4a1da4eaffe19090a2246e0d3111b885a64ace (diff)
downloadmana-client-924760c45e0f1aa1105e192bd83d6a4ce2c80f81.tar.gz
mana-client-924760c45e0f1aa1105e192bd83d6a4ce2c80f81.tar.bz2
mana-client-924760c45e0f1aa1105e192bd83d6a4ce2c80f81.tar.xz
mana-client-924760c45e0f1aa1105e192bd83d6a4ce2c80f81.zip
Remove an unneeded monster job offset in eAthena netcode
-rw-r--r--src/net/ea/beinghandler.cpp6
-rw-r--r--src/resources/monsterdb.cpp6
2 files changed, 4 insertions, 8 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 649e93e8..55df2ede 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -148,12 +148,6 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
if (dstBeing->getType() == Being::PLAYER)
player = static_cast<Player*>(dstBeing);
- // Fix monster jobs
- if (dstBeing->getType() == Being::MONSTER)
- {
- job -= 1002;
- }
-
if (msg.getId() == 0x0078)
{
dstBeing->clearPath();
diff --git a/src/resources/monsterdb.cpp b/src/resources/monsterdb.cpp
index adf90bc6..f9acf1ce 100644
--- a/src/resources/monsterdb.cpp
+++ b/src/resources/monsterdb.cpp
@@ -31,6 +31,8 @@
#include "net/net.h"
+#define OLD_EATHENA_OFFSET 1002
+
namespace
{
MonsterDB::MonsterInfos mMonsterInfos;
@@ -55,8 +57,8 @@ void MonsterDB::load()
logger->error("Monster Database: Error while loading monster.xml!");
}
- int offset = XML::getProperty(rootNode, "offset",
- Net::getNetworkType() == ServerInfo::EATHENA ? 1002 : 0);
+ int offset = XML::getProperty(rootNode, "offset", Net::getNetworkType() ==
+ ServerInfo::EATHENA ? OLD_EATHENA_OFFSET : 0);
//iterate <monster>s
for_each_xml_child_node(monsterNode, rootNode)