diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 20:26:48 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 20:26:48 +0300 |
commit | dbadb2f336a56bc2a037c0a0386b83e88b512ca3 (patch) | |
tree | 43370122fa479bb7c9e816649984e1a2207c0d46 /src/net/eathena | |
parent | add9701f5d104cc130e6589ed211f1beb7966052 (diff) | |
download | manaverse-dbadb2f336a56bc2a037c0a0386b83e88b512ca3.tar.gz manaverse-dbadb2f336a56bc2a037c0a0386b83e88b512ca3.tar.bz2 manaverse-dbadb2f336a56bc2a037c0a0386b83e88b512ca3.tar.xz manaverse-dbadb2f336a56bc2a037c0a0386b83e88b512ca3.zip |
Move processBeingResurrect from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 28 | ||||
-rw-r--r-- | src/net/eathena/beinghandler.h | 2 |
2 files changed, 30 insertions, 0 deletions
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 |