From 4114f1ee169f3d77d51c5261a607d3ef36a1045e Mon Sep 17 00:00:00 2001 From: fallenoak Date: Mon, 12 Jan 2026 20:27:55 -0600 Subject: [PATCH] feat(object): add CMovementStatus --- src/object/movement/CMovementStatus.cpp | 39 +++++++++++++++++++++++++ src/object/movement/CMovementStatus.hpp | 32 ++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 src/object/movement/CMovementStatus.cpp create mode 100644 src/object/movement/CMovementStatus.hpp diff --git a/src/object/movement/CMovementStatus.cpp b/src/object/movement/CMovementStatus.cpp new file mode 100644 index 0000000..1131615 --- /dev/null +++ b/src/object/movement/CMovementStatus.cpp @@ -0,0 +1,39 @@ +#include "object/movement/CMovementStatus.hpp" +#include "util/DataStore.hpp" + +CDataStore& operator>>(CDataStore& msg, CMovementStatus& move) { + msg.Get(move.moveFlags); + msg.Get(move.uint14); + msg.Get(move.uint0); + + msg >> move.position18; + msg.Get(move.facing34); + + if (move.moveFlags & 0x200) { + // TODO + } else { + move.transport = 0; + // TODO + } + + if ((move.moveFlags & (0x200000 | 0x2000000)) || (move.uint14 & 0x20)) { + msg.Get(move.float38); + } else { + move.float38 = 0.0f; + } + + msg.Get(move.uint3C); + + if (move.moveFlags & 0x1000) { + msg.Get(move.float40); + msg.Get(move.float44); + msg.Get(move.float48); + msg.Get(move.float4C); + } + + if (move.moveFlags & 0x4000000) { + msg.Get(move.float50); + } + + return msg; +} diff --git a/src/object/movement/CMovementStatus.hpp b/src/object/movement/CMovementStatus.hpp new file mode 100644 index 0000000..42993da --- /dev/null +++ b/src/object/movement/CMovementStatus.hpp @@ -0,0 +1,32 @@ +#ifndef OBJECT_MOVEMENT_C_MOVEMENT_STATUS_HPP +#define OBJECT_MOVEMENT_C_MOVEMENT_STATUS_HPP + +#include "util/GUID.hpp" +#include +#include +#include + +struct CMovementStatus { + uint32_t uint0 = 0; + // TODO + WOWGUID transport = 0; + uint32_t moveFlags = 0x0; + uint16_t uint14 = 0; + // TODO + C3Vector position18; + float facing24 = 0.0f; + C3Vector position28; + float facing34 = 0.0f; + float float38 = 0.0f; + uint32_t uint3C = 0; + float float40 = 0.0f; + float float44 = 0.0f; + float float48 = 0.0f; + float float4C = 0.0f; + float float50 = 0.0f; + // TODO +}; + +CDataStore& operator>>(CDataStore& msg, CMovementStatus& move); + +#endif