From 7b89f203b208f885fa7a6f69ca656f1ca711ed42 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 1 Oct 2014 22:44:49 +0300 Subject: eathena: add packet SMSG_PLAYER_STATUS_CHANGE2 0x028a. --- src/net/eathena/beinghandler.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/net/eathena/beinghandler.cpp') diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp index f96fdd332..366bddf85 100644 --- a/src/net/eathena/beinghandler.cpp +++ b/src/net/eathena/beinghandler.cpp @@ -88,6 +88,7 @@ BeingHandler::BeingHandler(const bool enableSync) : SMSG_PLAYER_STOP, SMSG_PLAYER_MOVE_TO_ATTACK, SMSG_PLAYER_STATUS_CHANGE, + SMSG_PLAYER_STATUS_CHANGE2, SMSG_PLAYER_STATUS_CHANGE_NO_TICK, SMSG_BEING_STATUS_CHANGE, SMSG_BEING_STATUS_CHANGE2, @@ -236,6 +237,10 @@ void BeingHandler::handleMessage(Net::MessageIn &msg) processPlaterStatusChange(msg); break; + case SMSG_PLAYER_STATUS_CHANGE2: + processPlaterStatusChange2(msg); + break; + case SMSG_PLAYER_STATUS_CHANGE_NO_TICK: processPlaterStatusChangeNoTick(msg); break; @@ -1798,6 +1803,26 @@ void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const BLOCK_END("BeingHandler::processPlayerStop") } +void BeingHandler::processPlaterStatusChange2(Net::MessageIn &msg) const +{ + if (!actorManager) + return; + + const int id = msg.readInt32("account id"); + Being *const dstBeing = actorManager->findBeing(id); + if (!dstBeing) + return; + + uint32_t statusEffects = msg.readInt32("status effect"); + dstBeing->setLevel(msg.readInt32("level")); + msg.readInt32("showEFST"); + + dstBeing->setStatusEffectBlock(0, static_cast( + (statusEffects >> 16) & 0xffff)); + dstBeing->setStatusEffectBlock(16, static_cast( + statusEffects & 0xffff)); +} + void BeingHandler::processPlaterStatusChangeNoTick(Net::MessageIn &msg) const { // +++ probably need show some effect? -- cgit v1.2.3-70-g09d2