summaryrefslogtreecommitdiff
path: root/src/net/eathena/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-01 22:44:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-01 22:44:49 +0300
commit7b89f203b208f885fa7a6f69ca656f1ca711ed42 (patch)
tree9b7bc88aa7499771872f427fe36b65d9312d9955 /src/net/eathena/beinghandler.cpp
parent9aa0f34c4a6205590d7dbba6f0a65f91a4897ed0 (diff)
downloadmanaverse-7b89f203b208f885fa7a6f69ca656f1ca711ed42.tar.gz
manaverse-7b89f203b208f885fa7a6f69ca656f1ca711ed42.tar.bz2
manaverse-7b89f203b208f885fa7a6f69ca656f1ca711ed42.tar.xz
manaverse-7b89f203b208f885fa7a6f69ca656f1ca711ed42.zip
eathena: add packet SMSG_PLAYER_STATUS_CHANGE2 0x028a.
Diffstat (limited to 'src/net/eathena/beinghandler.cpp')
-rw-r--r--src/net/eathena/beinghandler.cpp25
1 files changed, 25 insertions, 0 deletions
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<uint16_t>(
+ (statusEffects >> 16) & 0xffff));
+ dstBeing->setStatusEffectBlock(16, static_cast<uint16_t>(
+ statusEffects & 0xffff));
+}
+
void BeingHandler::processPlaterStatusChangeNoTick(Net::MessageIn &msg) const
{
// +++ probably need show some effect?