From 924760c45e0f1aa1105e192bd83d6a4ce2c80f81 Mon Sep 17 00:00:00 2001 From: Jared Adams Date: Fri, 16 Apr 2010 20:50:41 -0600 Subject: Remove an unneeded monster job offset in eAthena netcode --- src/net/ea/beinghandler.cpp | 6 ------ src/resources/monsterdb.cpp | 6 ++++-- 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(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 s for_each_xml_child_node(monsterNode, rootNode) -- cgit v1.2.3-70-g09d2