summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-05 23:06:16 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-06 01:18:58 +0300
commitc7c2c069010ca30352e25fa8e5010d556192835b (patch)
tree016d93480d2f871e7ee7bcc8e234787314330fe6
parenta55eae5cf0f031fcbb5be1f2c25226115d302b79 (diff)
downloadManaVerse-c7c2c069010ca30352e25fa8e5010d556192835b.tar.gz
ManaVerse-c7c2c069010ca30352e25fa8e5010d556192835b.tar.bz2
ManaVerse-c7c2c069010ca30352e25fa8e5010d556192835b.tar.xz
ManaVerse-c7c2c069010ca30352e25fa8e5010d556192835b.zip
Move processBeingMove2 from ea namespace into eathena and tmwa.
-rw-r--r--src/net/ea/beinghandler.cpp40
-rw-r--r--src/net/ea/beinghandler.h2
-rw-r--r--src/net/eathena/beinghandler.cpp40
-rw-r--r--src/net/eathena/beinghandler.h2
-rw-r--r--src/net/tmwa/beinghandler.cpp40
-rw-r--r--src/net/tmwa/beinghandler.h2
6 files changed, 84 insertions, 42 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp
index 3da2ffd02..e609cff21 100644
--- a/src/net/ea/beinghandler.cpp
+++ b/src/net/ea/beinghandler.cpp
@@ -95,46 +95,6 @@ void BeingHandler::setSprite(Being *const being, const unsigned int slot,
being->updateSprite(slot, id, color, colorId, isWeapon, isTempSprite);
}
-void BeingHandler::processBeingMove2(Net::MessageIn &msg) const
-{
- BLOCK_START("BeingHandler::processBeingMove2")
- if (!actorManager)
- {
- BLOCK_END("BeingHandler::processBeingMove2")
- return;
- }
-
- /*
- * A simplified movement packet, used by the
- * later versions of eAthena for both mobs and
- * players
- */
- Being *const dstBeing = actorManager->findBeing(msg.readInt32("being id"));
-
- /*
- * This packet doesn't have enough info to actually
- * create a new being, so if the being isn't found,
- * we'll just pretend the packet didn't happen
- */
-
- if (!dstBeing)
- {
- BLOCK_END("BeingHandler::processBeingMove2")
- return;
- }
-
- uint16_t srcX, srcY, dstX, dstY;
- msg.readCoordinatePair(srcX, srcY, dstX, dstY, "move path");
- msg.readInt32("tick");
-
- dstBeing->setAction(BeingAction::STAND, 0);
- dstBeing->setTileCoords(srcX, srcY);
- dstBeing->setDestination(dstX, dstY);
- if (dstBeing->getType() == ActorType::PLAYER)
- dstBeing->setMoveTime();
- BLOCK_END("BeingHandler::processBeingMove2")
-}
-
void BeingHandler::processBeingRemove(Net::MessageIn &msg) const
{
BLOCK_START("BeingHandler::processBeingRemove")
diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h
index 4405f1975..e68e382f6 100644
--- a/src/net/ea/beinghandler.h
+++ b/src/net/ea/beinghandler.h
@@ -46,8 +46,6 @@ class BeingHandler notfinal : public Net::BeingHandler
const bool isWeapon = false,
const bool isTempSprite = false) const;
- virtual void processBeingMove2(Net::MessageIn &msg) const;
-
virtual void processBeingRemove(Net::MessageIn &msg) const;
virtual void processBeingResurrect(Net::MessageIn &msg) const;
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index e6e16e0ad..bdfeb813a 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -910,4 +910,44 @@ void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) const
BLOCK_END("BeingHandler::processBeingStatusChange")
}
+void BeingHandler::processBeingMove2(Net::MessageIn &msg) const
+{
+ BLOCK_START("BeingHandler::processBeingMove2")
+ if (!actorManager)
+ {
+ BLOCK_END("BeingHandler::processBeingMove2")
+ return;
+ }
+
+ /*
+ * A simplified movement packet, used by the
+ * later versions of eAthena for both mobs and
+ * players
+ */
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32("being id"));
+
+ /*
+ * This packet doesn't have enough info to actually
+ * create a new being, so if the being isn't found,
+ * we'll just pretend the packet didn't happen
+ */
+
+ if (!dstBeing)
+ {
+ BLOCK_END("BeingHandler::processBeingMove2")
+ return;
+ }
+
+ uint16_t srcX, srcY, dstX, dstY;
+ msg.readCoordinatePair(srcX, srcY, dstX, dstY, "move path");
+ msg.readInt32("tick");
+
+ dstBeing->setAction(BeingAction::STAND, 0);
+ dstBeing->setTileCoords(srcX, srcY);
+ dstBeing->setDestination(dstX, dstY);
+ if (dstBeing->getType() == ActorType::PLAYER)
+ dstBeing->setMoveTime();
+ BLOCK_END("BeingHandler::processBeingMove2")
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index aea778d5c..8838c007f 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -57,6 +57,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
void processSkillCasting(Net::MessageIn &msg) const;
void processBeingStatusChange(Net::MessageIn &msg) const;
+
+ void processBeingMove2(Net::MessageIn &msg) const;
};
} // namespace EAthena
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 426ed7a24..90ec926ba 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -1019,4 +1019,44 @@ void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) const
BLOCK_END("BeingHandler::processBeingStatusChange")
}
+void BeingHandler::processBeingMove2(Net::MessageIn &msg) const
+{
+ BLOCK_START("BeingHandler::processBeingMove2")
+ if (!actorManager)
+ {
+ BLOCK_END("BeingHandler::processBeingMove2")
+ return;
+ }
+
+ /*
+ * A simplified movement packet, used by the
+ * later versions of eAthena for both mobs and
+ * players
+ */
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32("being id"));
+
+ /*
+ * This packet doesn't have enough info to actually
+ * create a new being, so if the being isn't found,
+ * we'll just pretend the packet didn't happen
+ */
+
+ if (!dstBeing)
+ {
+ BLOCK_END("BeingHandler::processBeingMove2")
+ return;
+ }
+
+ uint16_t srcX, srcY, dstX, dstY;
+ msg.readCoordinatePair(srcX, srcY, dstX, dstY, "move path");
+ msg.readInt32("tick");
+
+ dstBeing->setAction(BeingAction::STAND, 0);
+ dstBeing->setTileCoords(srcX, srcY);
+ dstBeing->setDestination(dstX, dstY);
+ if (dstBeing->getType() == ActorType::PLAYER)
+ dstBeing->setMoveTime();
+ BLOCK_END("BeingHandler::processBeingMove2")
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h
index af7004fd5..34b464c41 100644
--- a/src/net/tmwa/beinghandler.h
+++ b/src/net/tmwa/beinghandler.h
@@ -59,6 +59,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
void processSkillCasting(Net::MessageIn &msg) const;
void processBeingStatusChange(Net::MessageIn &msg) const;
+
+ void processBeingMove2(Net::MessageIn &msg) const;
};
} // namespace TmwAthena