mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-27 08:13:50 +03:00
feat(object): add CClientMoveUpdate::Skip
This commit is contained in:
6 files changed
+82
No files matched your search
@@ -1,6 +1,48 @@
|
||||
#include "object/movement/CMovementStatus.hpp"
|
||||
#include "util/DataStore.hpp"
|
||||
|
||||
uint32_t CMovementStatus::Skip(CDataStore* msg) {
|
||||
uint32_t moveFlags = 0;
|
||||
msg->Get(moveFlags);
|
||||
|
||||
uint16_t uint14;
|
||||
msg->Get(uint14);
|
||||
|
||||
void* data;
|
||||
msg->GetDataInSitu(data, 20);
|
||||
|
||||
uint32_t skipBytes = 0;
|
||||
|
||||
if (moveFlags & 0x200) {
|
||||
SmartGUID guid;
|
||||
*msg >> guid;
|
||||
|
||||
skipBytes += 21;
|
||||
|
||||
if (uint14 & 0x400) {
|
||||
skipBytes += 4;
|
||||
}
|
||||
}
|
||||
|
||||
if ((moveFlags & (0x200000 | 0x2000000)) || (uint14 & 0x20)) {
|
||||
skipBytes += 4;
|
||||
}
|
||||
|
||||
skipBytes += 4;
|
||||
|
||||
if (moveFlags & 0x1000) {
|
||||
skipBytes += 16;
|
||||
}
|
||||
|
||||
if (moveFlags & 0x4000000) {
|
||||
skipBytes += 4;
|
||||
}
|
||||
|
||||
msg->GetDataInSitu(data, skipBytes);
|
||||
|
||||
return moveFlags;
|
||||
}
|
||||
|
||||
CDataStore& operator>>(CDataStore& msg, CMovementStatus& move) {
|
||||
msg.Get(move.moveFlags);
|
||||
msg.Get(move.uint14);
|
||||
|
||||
Reference in new issue
Block a user