From 256d936b71d500fc14ee52c7f55959fc65b289ac Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 5 Sep 2014 13:17:59 +0300 Subject: Move processBeingStatusChange from ea namespace into eathena and tmwa. --- src/net/eathena/beinghandler.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/net/eathena/beinghandler.cpp') diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index a5f39635c..d0b76685b 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -885,4 +885,24 @@ void BeingHandler::processSkillCasting(Net::MessageIn &msg) const msg.readInt8("dispossable"); } +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 EAthena -- cgit v1.2.3-70-g09d2