summaryrefslogtreecommitdiff
path: root/src/net/eathena
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/beinghandler.cpp27
-rw-r--r--src/net/eathena/beinghandler.h2
2 files changed, 29 insertions, 0 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index 958cd1391..c68be6f24 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -1110,4 +1110,31 @@ void BeingHandler::processRanksList(Net::MessageIn &msg) const
msg.readInt32("my points");
}
+void BeingHandler::processBeingChangeDirection(Net::MessageIn &msg) const
+{
+ BLOCK_START("BeingHandler::processBeingChangeDirection")
+ if (!actorManager)
+ {
+ BLOCK_END("BeingHandler::processBeingChangeDirection")
+ return;
+ }
+
+ Being *const dstBeing = actorManager->findBeing(msg.readInt32("being id"));
+
+ if (!dstBeing)
+ {
+ BLOCK_END("BeingHandler::processBeingChangeDirection")
+ return;
+ }
+
+ msg.readInt16("unused");
+
+ const uint8_t dir = static_cast<uint8_t>(
+ msg.readUInt8("direction") & 0x0FU);
+ dstBeing->setDirection(dir);
+ if (localPlayer)
+ localPlayer->imitateDirection(dstBeing, dir);
+ BLOCK_END("BeingHandler::processBeingChangeDirection")
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index 344a672b1..4dceb3388 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -69,6 +69,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
void processSkillAutoCast(Net::MessageIn &msg) const;
void processRanksList(Net::MessageIn &msg) const;
+
+ void processBeingChangeDirection(Net::MessageIn &msg) const;
};
} // namespace EAthena