1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
|
/*
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TRINITYCORE_MOVEMENT_PACKETS_H
#define TRINITYCORE_MOVEMENT_PACKETS_H
#include "Packet.h"
#include "CombatLogPacketsCommon.h"
#include "MovementInfo.h"
#include "Optional.h"
namespace Movement
{
class MoveSpline;
}
namespace WorldPackets
{
namespace Movement
{
struct MovementAck
{
MovementInfo Status;
int32 AckIndex = 0;
};
class ClientPlayerMovement final : public ClientPacket
{
public:
explicit ClientPlayerMovement(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
void Read() override;
MovementInfo Status;
};
class TC_GAME_API MoveUpdate final : public ServerPacket
{
public:
explicit MoveUpdate() : ServerPacket(SMSG_MOVE_UPDATE) { }
WorldPacket const* Write() override;
MovementInfo* Status = nullptr;
};
struct MonsterSplineFilterKey
{
int16 Idx = 0;
uint16 Speed = 0;
};
struct MonsterSplineFilter
{
std::vector<MonsterSplineFilterKey> FilterKeys;
uint8 FilterFlags = 0;
float BaseSpeed = 0.0f;
int16 StartOffset = 0;
float DistToPrevFilterKey = 0.0f;
int16 AddedToStart = 0;
};
struct MonsterSplineSpellEffectExtraData
{
ObjectGuid TargetGUID;
uint32 SpellVisualID = 0;
uint32 ProgressCurveID = 0;
uint32 ParabolicCurveID = 0;
float JumpGravity = 0.0f;
};
struct MonsterSplineJumpExtraData
{
float JumpGravity = 0.0f;
uint32 StartTime = 0;
uint32 Duration = 0;
};
struct MonsterSplineTurnData
{
float StartFacing = 0.0f;
float TotalTurnRads = 0.0f;
float RadsPerSec = 0.0f;
};
struct MonsterSplineAnimTierTransition
{
int32 TierTransitionID = 0;
uint32 StartTime = 0;
uint32 ExtraDuration = 0; ///< Duration of the transition (unit does not move during this time)
uint8 AnimTier = 0;
};
struct MonsterSplineUnknown901
{
struct Inner
{
int32 Unknown_1 = 0;
Spells::SpellCastVisual Visual;
uint32 Unknown_4 = 0;
};
std::array<Inner, 16> Data;
};
struct MovementSpline
{
uint32 Flags = 0; // Spline flags
uint8 Face = 0; // Movement direction (see MonsterMoveType enum)
int32 Elapsed = 0;
uint32 MoveTime = 0;
uint32 FadeObjectTime = 0;
std::vector<TaggedPosition<Position::XYZ>> Points; // Spline path
uint8 Mode = 0; // Spline mode - actually always 0 in this packet - Catmullrom mode appears only in SMSG_UPDATE_OBJECT. In this packet it is determined by flags
bool VehicleExitVoluntary = false;
bool TaxiSmoothing = false;
ObjectGuid TransportGUID;
int8 VehicleSeat = -1;
std::vector<TaggedPosition<Position::PackedXYZ>> PackedDeltas;
Optional<MonsterSplineFilter> SplineFilter;
Optional<MonsterSplineSpellEffectExtraData> SpellEffectExtraData;
Optional<MonsterSplineJumpExtraData> JumpExtraData;
Optional<MonsterSplineTurnData> TurnData;
Optional<MonsterSplineAnimTierTransition> AnimTierTransition;
Optional<MonsterSplineUnknown901> Unknown901;
float FaceDirection = 0.0f;
ObjectGuid FaceGUID;
TaggedPosition<Position::XYZ> FaceSpot;
};
struct MovementMonsterSpline
{
uint32 ID = 0;
bool CrzTeleport = false;
bool StopUseFaceDirection = false;
uint8 StopSplineStyle = 0; // Determines how far from spline destination the mover is allowed to stop in place 0, 0, 3.0, 2.76, numeric_limits<float>::max, 1.1, float(INT_MAX); default before this field existed was distance 3.0 (index 2)
MovementSpline Move;
};
class CommonMovement
{
public:
static void WriteCreateObjectSplineDataBlock(::Movement::MoveSpline const& moveSpline, ByteBuffer& data);
static void WriteMovementForceWithDirection(MovementForce const& movementForce, ByteBuffer& data, Position const* objectPosition = nullptr);
};
class MonsterMove final : public ServerPacket
{
public:
explicit MonsterMove() : ServerPacket(SMSG_ON_MONSTER_MOVE) { }
void InitializeSplineData(::Movement::MoveSpline const& moveSpline);
WorldPacket const* Write() override;
MovementMonsterSpline SplineData;
ObjectGuid MoverGUID;
TaggedPosition<Position::XYZ> Pos;
};
class FlightSplineSync final : public ServerPacket
{
public:
explicit FlightSplineSync() : ServerPacket(SMSG_FLIGHT_SPLINE_SYNC, 16 + 4) { }
WorldPacket const* Write() override;
ObjectGuid Guid;
float SplineDist = 0.0f;
};
class MoveSplineSetSpeed : public ServerPacket
{
public:
explicit MoveSplineSetSpeed(OpcodeServer opcode) : ServerPacket(opcode, 12) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
float Speed = 1.0f;
};
class MoveSetSpeed : public ServerPacket
{
public:
explicit MoveSetSpeed(OpcodeServer opcode) : ServerPacket(opcode) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
uint32 SequenceIndex = 0; ///< Unit movement packet index, incremented each time
float Speed = 1.0f;
};
class MoveUpdateSpeed : public ServerPacket
{
public:
explicit MoveUpdateSpeed(OpcodeServer opcode) : ServerPacket(opcode) { }
WorldPacket const* Write() override;
MovementInfo* Status = nullptr;
float Speed = 1.0f;
};
class SetAdvFlyingSpeed final : public ServerPacket
{
public:
explicit SetAdvFlyingSpeed(OpcodeServer opcode) : ServerPacket(opcode, 16 + 4 + 4) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
uint32 SequenceIndex = 0;
float Speed = 1.0f;
};
class SetAdvFlyingSpeedRange final : public ServerPacket
{
public:
explicit SetAdvFlyingSpeedRange(OpcodeServer opcode) : ServerPacket(opcode, 16 + 4 + 4 + 4) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
uint32 SequenceIndex = 0;
float SpeedMin = 1.0f;
float SpeedMax = 1.0f;
};
class MoveSplineSetFlag final : public ServerPacket
{
public:
explicit MoveSplineSetFlag(OpcodeServer opcode) : ServerPacket(opcode, 8) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
};
class MoveSetFlag final : public ServerPacket
{
public:
explicit MoveSetFlag(OpcodeServer opcode) : ServerPacket(opcode, 12) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
uint32 SequenceIndex = 0; ///< Unit movement packet index, incremented each time
};
struct ShipTransferPending
{
uint32 ID = 0; ///< gameobject_template.entry of the transport the player is teleporting on
int32 OriginMapID = -1; ///< Map id the player is currently on (before teleport)
};
class TransferPending final : public ServerPacket
{
public:
explicit TransferPending() : ServerPacket(SMSG_TRANSFER_PENDING, 16) { }
WorldPacket const* Write() override;
int32 MapID = -1;
TaggedPosition<Position::XYZ> OldMapPosition;
Optional<ShipTransferPending> Ship;
Optional<int32> TransferSpellID;
Optional<int32> TaxiPathID;
};
class TransferAborted final : public ServerPacket
{
public:
explicit TransferAborted() : ServerPacket(SMSG_TRANSFER_ABORTED, 4 + 1 + 4 + 1) { }
WorldPacket const* Write() override;
uint32 MapID = 0;
uint8 Arg = 0;
int32 MapDifficultyXConditionID = 0;
uint32 TransfertAbort = 0;
};
struct TeleportLocation
{
TaggedPosition<Position::XYZO> Pos;
int32 FloorDifficulty = -1;
int32 FloorIndex = -1;
};
class NewWorld final : public ServerPacket
{
public:
explicit NewWorld() : ServerPacket(SMSG_NEW_WORLD, 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4 + 4) { }
WorldPacket const* Write() override;
int32 MapID = 0;
uint32 Reason = 0;
TeleportLocation Loc;
TaggedPosition<Position::XYZ> MovementOffset; // Adjusts all pending movement events by this offset
int32 Counter = 0;
};
class WorldPortResponse final : public ClientPacket
{
public:
explicit WorldPortResponse(WorldPacket&& packet) : ClientPacket(CMSG_WORLD_PORT_RESPONSE, std::move(packet)) { }
void Read() override { }
};
struct VehicleTeleport
{
uint8 VehicleSeatIndex = 0;
bool VehicleExitVoluntary = false;
bool VehicleExitTeleport = false;
};
class MoveTeleport final : public ServerPacket
{
public:
explicit MoveTeleport() : ServerPacket(SMSG_MOVE_TELEPORT, 12+4+16+16+4) { }
WorldPacket const* Write() override;
TaggedPosition<Position::XYZ> Pos;
Optional<VehicleTeleport> Vehicle;
uint32 SequenceIndex = 0;
ObjectGuid MoverGUID;
Optional<ObjectGuid> TransportGUID;
float Facing = 0.0f;
uint8 PreloadWorld = 0;
};
class MoveUpdateTeleport final : public ServerPacket
{
public:
explicit MoveUpdateTeleport() : ServerPacket(SMSG_MOVE_UPDATE_TELEPORT) { }
WorldPacket const* Write() override;
MovementInfo* Status = nullptr;
::MovementForces::Container const* MovementForces = nullptr;
Optional<float> SwimBackSpeed;
Optional<float> FlightSpeed;
Optional<float> SwimSpeed;
Optional<float> WalkSpeed;
Optional<float> TurnRate;
Optional<float> RunSpeed;
Optional<float> FlightBackSpeed;
Optional<float> RunBackSpeed;
Optional<float> PitchRate;
};
class MoveApplyMovementForce final : public ServerPacket
{
public:
explicit MoveApplyMovementForce() : ServerPacket(SMSG_MOVE_APPLY_MOVEMENT_FORCE, 16 + 4 + 16 + 12 + 12 + 4 + 4 + 1) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
int32 SequenceIndex = 0;
MovementForce const* Force = nullptr;
};
class MoveApplyMovementForceAck final : public ClientPacket
{
public:
explicit MoveApplyMovementForceAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_APPLY_MOVEMENT_FORCE_ACK, std::move(packet)) { }
void Read() override;
MovementAck Ack;
MovementForce Force;
};
class MoveRemoveMovementForce final : public ServerPacket
{
public:
explicit MoveRemoveMovementForce() : ServerPacket(SMSG_MOVE_REMOVE_MOVEMENT_FORCE, 16 + 4 + 16) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
int32 SequenceIndex = 0;
ObjectGuid ID;
};
class MoveRemoveMovementForceAck final : public ClientPacket
{
public:
explicit MoveRemoveMovementForceAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_REMOVE_MOVEMENT_FORCE_ACK, std::move(packet)) { }
void Read() override;
MovementAck Ack;
ObjectGuid ID;
};
class MoveUpdateApplyMovementForce final : public ServerPacket
{
public:
explicit MoveUpdateApplyMovementForce() : ServerPacket(SMSG_MOVE_UPDATE_APPLY_MOVEMENT_FORCE, sizeof(MovementInfo) + 16 + 12 + 12 + 4 + 4 + 1) { }
WorldPacket const* Write() override;
MovementInfo* Status = nullptr;
MovementForce const* Force = nullptr;
};
class MoveUpdateRemoveMovementForce final : public ServerPacket
{
public:
explicit MoveUpdateRemoveMovementForce() : ServerPacket(SMSG_MOVE_UPDATE_REMOVE_MOVEMENT_FORCE, sizeof(MovementInfo) + 16) { }
WorldPacket const* Write() override;
MovementInfo* Status = nullptr;
ObjectGuid TriggerGUID;
};
class MoveTeleportAck final : public ClientPacket
{
public:
explicit MoveTeleportAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_TELEPORT_ACK, std::move(packet)) { }
void Read() override;
ObjectGuid MoverGUID;
int32 AckIndex = 0;
int32 MoveTime = 0;
};
class MovementAckMessage final : public ClientPacket
{
public:
explicit MovementAckMessage(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
void Read() override;
MovementAck Ack;
};
class MovementSpeedAck final : public ClientPacket
{
public:
explicit MovementSpeedAck(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
void Read() override;
MovementAck Ack;
float Speed = 0.0f;
};
class MovementSpeedRangeAck final : public ClientPacket
{
public:
explicit MovementSpeedRangeAck(WorldPacket&& packet) : ClientPacket(std::move(packet)) { }
void Read() override;
MovementAck Ack;
float SpeedMin = 1.0f;
float SpeedMax = 1.0f;
};
class SetActiveMover final : public ClientPacket
{
public:
explicit SetActiveMover(WorldPacket&& packet) : ClientPacket(CMSG_SET_ACTIVE_MOVER, std::move(packet)) { }
void Read() override;
ObjectGuid ActiveMover;
};
class MoveSetActiveMover final : public ServerPacket
{
public:
explicit MoveSetActiveMover() : ServerPacket(SMSG_MOVE_SET_ACTIVE_MOVER, 8) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
};
struct MoveKnockBackSpeeds
{
float HorzSpeed = 0.0f;
float VertSpeed = 0.0f;
};
class MoveKnockBack final : public ServerPacket
{
public:
explicit MoveKnockBack() : ServerPacket(SMSG_MOVE_KNOCK_BACK, 16 + 8 + 4 + 4 + 4) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
TaggedPosition<Position::XY> Direction;
MoveKnockBackSpeeds Speeds;
uint32 SequenceIndex = 0;
};
class MoveUpdateKnockBack final : public ServerPacket
{
public:
explicit MoveUpdateKnockBack() : ServerPacket(SMSG_MOVE_UPDATE_KNOCK_BACK) { }
WorldPacket const* Write() override;
MovementInfo* Status = nullptr;
};
class MoveKnockBackAck final : public ClientPacket
{
public:
explicit MoveKnockBackAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_KNOCK_BACK_ACK, std::move(packet)) { }
void Read() override;
MovementAck Ack;
Optional<MoveKnockBackSpeeds> Speeds;
};
enum class UpdateCollisionHeightReason : uint8
{
Scale = 0,
Mount = 1,
Force = 2
};
class MoveSetCollisionHeight final : public ServerPacket
{
public:
explicit MoveSetCollisionHeight() : ServerPacket(SMSG_MOVE_SET_COLLISION_HEIGHT, 4 + 16 + 4 + 1 + 4 + 4) { }
WorldPacket const* Write() override;
float Scale = 1.0f;
ObjectGuid MoverGUID;
uint32 MountDisplayID = 0;
UpdateCollisionHeightReason Reason = UpdateCollisionHeightReason::Scale;
uint32 SequenceIndex = 0;
int32 ScaleDuration = 0;
float Height = 1.0f;
};
class MoveUpdateCollisionHeight final : public ServerPacket
{
public:
explicit MoveUpdateCollisionHeight() : ServerPacket(SMSG_MOVE_UPDATE_COLLISION_HEIGHT) { }
WorldPacket const* Write() override;
MovementInfo* Status = nullptr;
float Scale = 1.0f;
float Height = 1.0f;
};
class MoveSetCollisionHeightAck final : public ClientPacket
{
public:
explicit MoveSetCollisionHeightAck(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_SET_COLLISION_HEIGHT_ACK, std::move(packet)) { }
void Read() override;
MovementAck Data;
UpdateCollisionHeightReason Reason = UpdateCollisionHeightReason::Scale;
uint32 MountDisplayID = 0;
float Height = 1.0f;
};
class MoveTimeSkipped final : public ClientPacket
{
public:
explicit MoveTimeSkipped(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_TIME_SKIPPED, std::move(packet)) { }
void Read() override;
ObjectGuid MoverGUID;
uint32 TimeSkipped = 0;
};
class MoveSkipTime final : public ServerPacket
{
public:
explicit MoveSkipTime() : ServerPacket(SMSG_MOVE_SKIP_TIME, 16 + 4) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
uint32 TimeSkipped = 0;
};
class SummonResponse final : public ClientPacket
{
public:
explicit SummonResponse(WorldPacket&& packet) : ClientPacket(CMSG_SUMMON_RESPONSE, std::move(packet)) { }
void Read() override;
bool Accept = false;
ObjectGuid SummonerGUID;
};
class TC_GAME_API ControlUpdate final : public ServerPacket
{
public:
explicit ControlUpdate() : ServerPacket(SMSG_CONTROL_UPDATE, 16 + 1) { }
WorldPacket const* Write() override;
ObjectGuid Guid;
bool On = false;
};
class MoveSplineDone final : public ClientPacket
{
public:
explicit MoveSplineDone(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_SPLINE_DONE, std::move(packet)) { }
void Read() override;
MovementInfo Status;
int32 SplineID = 0;
};
class SummonRequest final : public ServerPacket
{
public:
enum SummonReason : uint8
{
SPELL = 0,
SCENARIO = 1
};
explicit SummonRequest() : ServerPacket(SMSG_SUMMON_REQUEST, 16 + 4 + 4 + 1) { }
WorldPacket const* Write() override;
ObjectGuid SummonerGUID;
uint32 SummonerVirtualRealmAddress = 0;
int32 AreaID = 0;
SummonReason Reason = SPELL;
bool SkipStartingArea = false;
};
class SuspendToken final : public ServerPacket
{
public:
explicit SuspendToken() : ServerPacket(SMSG_SUSPEND_TOKEN, 4 + 1) { }
WorldPacket const* Write() override;
uint32 SequenceIndex = 1;
uint32 Reason = 1;
};
class SuspendTokenResponse final : public ClientPacket
{
public:
explicit SuspendTokenResponse(WorldPacket&& packet) : ClientPacket(CMSG_SUSPEND_TOKEN_RESPONSE, std::move(packet)) { }
void Read() override;
uint32 SequenceIndex = 0;
};
class ResumeToken final : public ServerPacket
{
public:
explicit ResumeToken() : ServerPacket(SMSG_RESUME_TOKEN, 4 + 1) { }
WorldPacket const* Write() override;
uint32 SequenceIndex = 1;
uint32 Reason = 1;
};
struct CollisionHeightInfo
{
float Height = 0.0f;
float Scale = 0.0f;
UpdateCollisionHeightReason Reason = UpdateCollisionHeightReason::Scale;
};
struct StateChangeRangeInfo
{
float Min = 0.0f;
float Max = 0.0f;
};
struct KnockBackInfo
{
float HorzSpeed = 0.0f;
TaggedPosition<Position::XY> Direction;
float InitVertSpeed = 0.0f;
};
struct MoveStateChange
{
MoveStateChange(OpcodeServer messageId, uint32 sequenceIndex) : MessageID(messageId), SequenceIndex(sequenceIndex) { }
uint32 MessageID = 0;
uint32 SequenceIndex = 0;
Optional<float> Speed;
Optional<StateChangeRangeInfo> Range;
Optional<KnockBackInfo> KnockBack;
Optional<int32> VehicleRecID;
Optional<CollisionHeightInfo> CollisionHeight;
Optional<MovementForce> MovementForce_;
Optional<ObjectGuid> MovementForceGUID;
Optional<int32> MovementInertiaID;
Optional<uint32> MovementInertiaLifetimeMs;
Optional<int32> DriveCapabilityRecID;
};
class MoveSetCompoundState final : public ServerPacket
{
public:
explicit MoveSetCompoundState() : ServerPacket(SMSG_MOVE_SET_COMPOUND_STATE, 4 + 1) { }
WorldPacket const* Write() override;
ObjectGuid MoverGUID;
std::vector<MoveStateChange> StateChanges;
};
class MoveInitActiveMoverComplete final : public ClientPacket
{
public:
explicit MoveInitActiveMoverComplete(WorldPacket&& packet) : ClientPacket(CMSG_MOVE_INIT_ACTIVE_MOVER_COMPLETE, std::move(packet)) { }
void Read() override;
uint32 Ticks = 0;
};
ByteBuffer& operator>>(ByteBuffer& data, MovementAck& ack);
}
}
ByteBuffer& operator>>(ByteBuffer& data, MovementInfo& movementInfo);
ByteBuffer& operator<<(ByteBuffer& data, MovementInfo::TransportInfo const& transportInfo);
#endif // TRINITYCORE_MOVEMENT_PACKETS_H
|