diff options
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r-- | src/net/eathena/beinghandler.cpp | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index be7899830..bc5987f1c 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -237,10 +237,13 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) break; case SMSG_BEING_STATUS_CHANGE: - case SMSG_BEING_STATUS_CHANGE2: processBeingStatusChange(msg); break; + case SMSG_BEING_STATUS_CHANGE2: + processBeingStatusChange2(msg); + break; + case SMSG_SKILL_CASTING: processSkillCasting(msg); break; @@ -1040,8 +1043,31 @@ void BeingHandler::processBeingStatusChange(Net::MessageIn &msg) const uint16_t status = msg.readInt16("status"); const int id = msg.readInt32("being id"); const bool flag = msg.readUInt8("flag: 0: stop, 1: start"); - if (status1) - msg.readInt32("total"); + msg.readInt32("total"); + msg.readInt32("left"); + msg.readInt32("val1"); + msg.readInt32("val2"); + msg.readInt32("val3"); + + Being *const dstBeing = actorManager->findBeing(id); + if (dstBeing) + dstBeing->setStatusEffect(status, flag); + BLOCK_END("BeingHandler::processBeingStatusChange") +} + +void BeingHandler::processBeingStatusChange2(Net::MessageIn &msg) +{ + 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"); msg.readInt32("left"); msg.readInt32("val1"); msg.readInt32("val2"); |