From dbadb2f336a56bc2a037c0a0386b83e88b512ca3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 17 Sep 2014 20:26:48 +0300 Subject: Move processBeingResurrect from ea namespace into eathena and tmwa. --- src/net/ea/beinghandler.cpp | 28 ---------------------------- src/net/ea/beinghandler.h | 2 -- src/net/eathena/beinghandler.cpp | 28 ++++++++++++++++++++++++++++ src/net/eathena/beinghandler.h | 2 ++ src/net/tmwa/beinghandler.cpp | 28 ++++++++++++++++++++++++++++ src/net/tmwa/beinghandler.h | 2 ++ 6 files changed, 60 insertions(+), 30 deletions(-) (limited to 'src/net') diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 82154f6d9..807c9b3ef 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -132,34 +132,6 @@ void BeingHandler::processBeingRemove(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processBeingRemove") } -void BeingHandler::processBeingResurrect(Net::MessageIn &msg) const -{ - BLOCK_START("BeingHandler::processBeingResurrect") - if (!actorManager || !localPlayer) - { - BLOCK_END("BeingHandler::processBeingResurrect") - return; - } - - // A being changed mortality status - - const int id = msg.readInt32("being id"); - Being *const dstBeing = actorManager->findBeing(id); - if (!dstBeing) - { - BLOCK_END("BeingHandler::processBeingResurrect") - return; - } - - // If this is player's current target, clear it. - if (dstBeing == localPlayer->getTarget()) - localPlayer->stopAttack(); - - if (msg.readUInt8("flag?") == 1U) - dstBeing->setAction(BeingAction::STAND, 0); - BLOCK_END("BeingHandler::processBeingResurrect") -} - void BeingHandler::processSkillDamage(Net::MessageIn &msg) const { BLOCK_START("BeingHandler::processSkillDamage") diff --git a/src/net/ea/beinghandler.h b/src/net/ea/beinghandler.h index 83d7776eb..84758630c 100644 --- a/src/net/ea/beinghandler.h +++ b/src/net/ea/beinghandler.h @@ -48,8 +48,6 @@ class BeingHandler notfinal : public Net::BeingHandler virtual void processBeingRemove(Net::MessageIn &msg) const; - virtual void processBeingResurrect(Net::MessageIn &msg) const; - virtual void processSkillDamage(Net::MessageIn &msg) const; virtual void processBeingAction(Net::MessageIn &msg) const; diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index 76debad6d..b6327b30f 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -1734,4 +1734,32 @@ void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processPlayerStop") } +void BeingHandler::processBeingResurrect(Net::MessageIn &msg) const +{ + BLOCK_START("BeingHandler::processBeingResurrect") + if (!actorManager || !localPlayer) + { + BLOCK_END("BeingHandler::processBeingResurrect") + return; + } + + // A being changed mortality status + + const int id = msg.readInt32("being id"); + Being *const dstBeing = actorManager->findBeing(id); + if (!dstBeing) + { + BLOCK_END("BeingHandler::processBeingResurrect") + return; + } + + // If this is player's current target, clear it. + if (dstBeing == localPlayer->getTarget()) + localPlayer->stopAttack(); + + if (msg.readUInt8("flag?") == 1U) + dstBeing->setAction(BeingAction::STAND, 0); + BLOCK_END("BeingHandler::processBeingResurrect") +} + } // namespace EAthena diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h index 991374d6f..2a12b7fa1 100644 --- a/src/net/eathena/beinghandler.h +++ b/src/net/eathena/beinghandler.h @@ -103,6 +103,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void processSkillEntry(Net::MessageIn &msg) const; void processPlaterStatusChange(Net::MessageIn &msg) const; + + void processBeingResurrect(Net::MessageIn &msg) const; }; } // namespace EAthena diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index 2a9b31c0f..a8fe157da 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -1589,4 +1589,32 @@ void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processPlayerStop") } +void BeingHandler::processBeingResurrect(Net::MessageIn &msg) const +{ + BLOCK_START("BeingHandler::processBeingResurrect") + if (!actorManager || !localPlayer) + { + BLOCK_END("BeingHandler::processBeingResurrect") + return; + } + + // A being changed mortality status + + const int id = msg.readInt32("being id"); + Being *const dstBeing = actorManager->findBeing(id); + if (!dstBeing) + { + BLOCK_END("BeingHandler::processBeingResurrect") + return; + } + + // If this is player's current target, clear it. + if (dstBeing == localPlayer->getTarget()) + localPlayer->stopAttack(); + + if (msg.readUInt8("flag?") == 1U) + dstBeing->setAction(BeingAction::STAND, 0); + BLOCK_END("BeingHandler::processBeingResurrect") +} + } // namespace TmwAthena diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h index f6bbcffae..2087b5c53 100644 --- a/src/net/tmwa/beinghandler.h +++ b/src/net/tmwa/beinghandler.h @@ -83,6 +83,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void processPlaterStatusChange(Net::MessageIn &msg) const; + void processBeingResurrect(Net::MessageIn &msg) const; + static void setServerGender(Being *const being, const uint8_t gender); -- cgit v1.2.3-60-g2f50