mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(object): add CMovementStatus
This commit is contained in:
parent
1cc8c3ce40
commit
4114f1ee16
39
src/object/movement/CMovementStatus.cpp
Normal file
39
src/object/movement/CMovementStatus.cpp
Normal file
@ -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;
|
||||||
|
}
|
||||||
32
src/object/movement/CMovementStatus.hpp
Normal file
32
src/object/movement/CMovementStatus.hpp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#ifndef OBJECT_MOVEMENT_C_MOVEMENT_STATUS_HPP
|
||||||
|
#define OBJECT_MOVEMENT_C_MOVEMENT_STATUS_HPP
|
||||||
|
|
||||||
|
#include "util/GUID.hpp"
|
||||||
|
#include <common/DataStore.hpp>
|
||||||
|
#include <tempest/Vector.hpp>
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
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
|
||||||
Loading…
Reference in New Issue
Block a user