diff options
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 20 | ||||
-rw-r--r-- | src/net/tmwa/beinghandler.h | 2 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index af71491d3..426ed7a24 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -999,4 +999,24 @@ void BeingHandler::processSkillCasting(Net::MessageIn &msg) const msg.readInt32("cast time"); } +void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) const +{ + BLOCK_START("BeingHandler::processBeingStatusChange") + if (!actorManager) + { + BLOCK_END("BeingHandler::processBeingStatusChange") + return; + } + + // Status change + const uint16_t status = msg.readInt16("status"); + const int id = msg.readInt32("being id"); + const bool flag = msg.readUInt8("flag: 0: stop, 1: start"); + + Being *const dstBeing = actorManager->findBeing(id); + if (dstBeing) + dstBeing->setStatusEffect(status, flag); + BLOCK_END("BeingHandler::processBeingStatusChange") +} + } // namespace TmwAthena diff --git a/src/net/tmwa/beinghandler.h b/src/net/tmwa/beinghandler.h index fb7fd872d..af7004fd5 100644 --- a/src/net/tmwa/beinghandler.h +++ b/src/net/tmwa/beinghandler.h @@ -57,6 +57,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler void processBeingSpawn(Net::MessageIn &msg); void processSkillCasting(Net::MessageIn &msg) const; + + void processBeingStatusChange(Net::MessageIn &msg) const; }; } // namespace TmwAthena |