summaryrefslogtreecommitdiff
path: root/src/net/tmwa/beinghandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-14 20:47:32 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-14 20:47:32 +0300
commit664a3cfbd51576334c1ad522d34dd5ed1d141e45 (patch)
treef94df93a088d7a5b9fde7d2f9abcd525aebff944 /src/net/tmwa/beinghandler.cpp
parent1c709b950363389755017e52f97ed3299be3b514 (diff)
downloadmanaverse-664a3cfbd51576334c1ad522d34dd5ed1d141e45.tar.gz
manaverse-664a3cfbd51576334c1ad522d34dd5ed1d141e45.tar.bz2
manaverse-664a3cfbd51576334c1ad522d34dd5ed1d141e45.tar.xz
manaverse-664a3cfbd51576334c1ad522d34dd5ed1d141e45.zip
Move processPlaterStatusChange from ea namespace into eathena and tmwa.
Diffstat (limited to 'src/net/tmwa/beinghandler.cpp')
-rw-r--r--src/net/tmwa/beinghandler.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 5b62cafb4..cdc3a59f7 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -1557,4 +1557,32 @@ void BeingHandler::applyPlayerAction(Being *const being, const uint8_t type)
}
}
+void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const
+{
+ BLOCK_START("BeingHandler::processPlayerStop")
+ if (!actorManager)
+ {
+ BLOCK_END("BeingHandler::processPlayerStop")
+ return;
+ }
+
+ // Change in players' flags
+ const int id = msg.readInt32("account id");
+ Being *const dstBeing = actorManager->findBeing(id);
+ if (!dstBeing)
+ return;
+
+ const uint16_t stunMode = msg.readInt16("stun mode");
+ uint32_t statusEffects = msg.readInt16("status effect");
+ statusEffects |= (static_cast<uint32_t>(msg.readInt16("opt?"))) << 16;
+ msg.readUInt8("Unused?");
+
+ dstBeing->setStunMode(stunMode);
+ dstBeing->setStatusEffectBlock(0, static_cast<uint16_t>(
+ (statusEffects >> 16) & 0xffff));
+ dstBeing->setStatusEffectBlock(16, static_cast<uint16_t>(
+ statusEffects & 0xffff));
+ BLOCK_END("BeingHandler::processPlayerStop")
+}
+
} // namespace TmwAthena