Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
MovementStructures.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef SF_MOVEMENT_STRUCTURES_H
7#define SF_MOVEMENT_STRUCTURES_H
8
9#include "Object.h"
10#include "Opcodes.h"
11
12class ByteBuffer;
13class Unit;
14
16{
49
95
97
100
101 // Special
102 MSEZeroBit, // writes bit value 1 or skips read bit
103 MSEOneBit, // writes bit value 0 or skips read bit
104 MSEEnd, // marks end of parsing
105 MSEExtraElement, // Used to signalize reading into ExtraMovementStatusElement, element sequence inside it is declared as separate array
106 // Allowed internal elements are: GUID markers (not transport), MSEExtraFloat, MSEExtraInt8
112};
113
114namespace Movement
115{
116 class PacketSender;
117
119 {
120 friend class PacketSender;
121
122 public:
124
125 void ReadNextElement(ByteBuffer& packet);
126 void WriteNextElement(ByteBuffer& packet);
127
128 struct
129 {
137
138 protected:
139 void ResetIndex() { _index = 0; }
140
141 private:
144 };
145
147 {
148 public:
149 PacketSender(Unit* unit, Opcodes serverControl, Opcodes playerControl, Opcodes broadcast = SMSG_PLAYER_MOVE, ExtraMovementStatusElement* extras = NULL);
150
151 void Send() const;
152
153 private:
158 };
159
160 bool PrintInvalidSequenceElement(MovementStatusElements element, char const* function);
161}
162
164
165#endif
std::int32_t int32
Definition Define.h:73
std::uint32_t uint32
Definition Define.h:77
std::int8_t int8
Definition Define.h:75
MovementStatusElements const * GetMovementStatusElementsSequence(Opcodes opcode)
MovementStatusElements
@ MSEFallHorizontalSpeed
@ MSETransportGuidByte6
@ MSEHasGuidByte6
@ MSEExtraFloat2
@ MSEZeroBit
@ MSEHasTransportData
@ MSEFlushBits
@ MSEHasCounter
@ MSEFallVerticalSpeed
@ MSEMountDisplayIdWithCheck
@ MSEForcesCount
@ MSESplineElevation
@ MSEHasMovementFlags
@ MSEFallTime
@ MSEHasTransportVehicleId
@ MSEExtraInt32
@ MSEGuidByte6
@ MSEHasTransportGuidByte5
@ MSEHasGuidByte4
@ MSEHasGuidByte5
@ MSEHasOrientation
@ MSETransportGuidByte0
@ MSEOrientation
@ MSETransportGuidByte2
@ MSETransportVehicleId
@ MSETransportGuidByte1
@ MSECounter
@ MSETransportGuidByte7
@ MSEPositionX
@ MSEMountDisplayIdWithoutCheck
@ MSEExtraInt8
@ MSEFallSinAngle
@ MSEHasPitch
@ MSEMovementFlags2
@ MSEHasGuidByte3
@ MSEHasTimestamp
@ MSEHasFallData
@ MSEFallCosAngle
@ MSEHasMovementFlags2
@ MSETransportPositionX
@ MSEHasSpline
@ MSEAckCount
@ MSEHasTransportTime2
@ MSEHasTransportGuidByte3
@ MSEGuidByte1
@ MSEHasFallDirection
@ MSETransportTime3
@ MSETransportGuidByte3
@ MSEHasTransportGuidByte6
@ MSEHasGuidByte0
@ MSEHasTransportTime3
@ MSEHasTransportGuidByte2
@ MSEGuidByte2
@ MSEGuidByte0
@ MSEHasTransportGuidByte1
@ MSEHasSplineElevation
@ MSETransportTime
@ MSETransportTime2
@ MSEPositionZ
@ MSEPitch
@ MSEUintCount
@ MSEExtraElement
@ MSEHasTransportGuidByte7
@ MSETransportSeat
@ MSEPositionY
@ MSEHasGuidByte7
@ MSEExtraFloat
@ MSEMovementFlags
@ MSEHasMountDisplayId
@ MSEOrientationWithoutCheck
@ MSEHasGuidByte2
@ MSECount
@ MSEGuidByte3
@ MSETransportGuidByte5
@ MSEOneBit
@ MSETransportOrientation
@ MSETransportPositionY
@ MSETransportGuidByte4
@ MSEGuidByte5
@ MSEHasTransportGuidByte4
@ MSETransportPositionZ
@ MSEHasTransportGuidByte0
@ MSEForces
@ MSEGuidByte7
@ MSETimestamp
@ MSEExtra2Bits
@ MSEGuidByte4
@ MSEHasGuidByte1
MovementStatusElements const * _elements
ExtraMovementStatusElement(MovementStatusElements const *elements)
ExtraMovementStatusElement * _extraElements
PacketSender(Unit *unit, Opcodes serverControl, Opcodes playerControl, Opcodes broadcast=SMSG_PLAYER_MOVE, ExtraMovementStatusElement *extras=NULL)
Definition Unit.h:1367
Opcodes
List of Opcodes.
Definition Opcodes.h:21
@ SMSG_PLAYER_MOVE
Definition Opcodes.h:878
Data
Definition molten_core.h:55
bool PrintInvalidSequenceElement(MovementStatusElements element, char const *function)