249{
250 std::vector<uint32> const* PauseTimes = nullptr;
252 PauseTimes = go->GetPauseTimes();
253
273
274 if (
flags.MovementUpdate)
275 {
283
285
289
295
298
301
302
303
304
305 data->
WriteBit(HasStandingOnGameObjectGUID);
313
316
317 if (HasStandingOnGameObjectGUID)
319
320 if (HasInertia)
321 {
325 }
326
327 if (HasAdvFlying)
328 {
331 }
332
333 if (HasFall)
334 {
337
338 if (data->
WriteBit(HasFallDirection))
339 {
343 }
344 }
345
355
357 {
358 *data <<
uint32(movementForces->GetForces()->size());
359 *data << float(movementForces->GetModMagnitude());
360 }
361 else
362 {
364 *data << float(1.0f);
365 }
366
367 *data << float(2.0f);
368 *data << float(65.0f);
369 *data << float(1.0f);
370 *data << float(3.0f);
371 *data << float(10.0f);
372 *data << float(100.0f);
373 *data << float(90.0f);
374 *data << float(140.0f);
375 *data << float(180.0f);
376 *data << float(360.0f);
377 *data << float(90.0f);
378 *data << float(270.0f);
379 *data << float(30.0f);
380 *data << float(80.0f);
381 *data << float(2.75f);
382 *data << float(7.0f);
383 *data << float(0.4f);
384
387
389 for (
MovementForce const& force : *movementForces->GetForces())
391
392 if (HasSpline)
394 }
395
396 *data <<
uint32(PauseTimes ? PauseTimes->size() : 0);
397
398 if (
flags.Stationary)
399 {
405 }
406
407 if (
flags.CombatVictim)
409
410 if (
flags.ServerTime)
412
414 {
418 }
419
421 {
426 }
427
430
431 if (PauseTimes && !PauseTimes->empty())
432 data->
append(PauseTimes->data(), PauseTimes->size());
433
434 if (
flags.MovementTransport)
435 {
438 }
439
440 if (
flags.AreaTrigger)
441 {
446
448
450
458 bool hasScaleCurveID = createProperties && createProperties->
ScaleCurveId != 0;
459 bool hasMorphCurveID = createProperties && createProperties->
MorphCurveId != 0;
460 bool hasFacingCurveID = createProperties && createProperties->
FacingCurveId != 0;
461 bool hasMoveCurveID = createProperties && createProperties->
MoveCurveId != 0;
462 bool hasAreaTriggerSphere = shape.
IsSphere();
463 bool hasAreaTriggerBox = shape.
IsBox();
464 bool hasAreaTriggerPolygon = createProperties && shape.
IsPolygon();
465 bool hasAreaTriggerCylinder = shape.
IsCylinder();
466 bool hasDisk = shape.
IsDisk();
468 bool hasAreaTriggerSpline = areaTrigger->
HasSplines();
469 bool hasOrbit = areaTrigger->
HasOrbit();
470 bool hasMovementScript = false;
471
472 data->
WriteBit(hasAbsoluteOrientation);
478 data->
WriteBit(hasTargetRollPitchYaw);
483 data->
WriteBit(hasAreaTriggerSphere);
485 data->
WriteBit(hasAreaTriggerPolygon);
486 data->
WriteBit(hasAreaTriggerCylinder);
489 data->
WriteBit(hasAreaTriggerSpline);
492
494
495 if (hasAreaTriggerSpline)
496 {
499
501 }
502
503 if (hasTargetRollPitchYaw)
505
506 if (hasScaleCurveID)
508
509 if (hasMorphCurveID)
511
512 if (hasFacingCurveID)
514
515 if (hasMoveCurveID)
517
518 if (hasAreaTriggerSphere)
519 {
522 }
523
524 if (hasAreaTriggerBox)
525 {
532 }
533
534 if (hasAreaTriggerPolygon)
535 {
540
542 *data << vertice;
543
545 *data << vertice;
546 }
547
548 if (hasAreaTriggerCylinder)
549 {
556 }
557
558 if (hasDisk)
559 {
568 }
569
570 if (hasBoundedPlane)
571 {
576 }
577
578
579
580
581 if (hasOrbit)
583 }
584
585 if (
flags.GameObject)
586 {
587 bool bit8 = false;
589
591
593
596 if (bit8)
598 }
599
600 if (
flags.SmoothPhasing)
601 {
603 ASSERT(smoothPhasingInfo);
604
611 }
612
613 if (
flags.SceneObject)
614 {
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 if (
flags.ActivePlayer)
724 {
726
729
730 data->
WriteBit(HasSceneInstanceIDs);
733 if (HasSceneInstanceIDs)
734 {
737 *data <<
uint32(itr.first);
738 }
739 if (HasRuneState)
740 {
743
744 *data <<
uint8((1 << maxRunes) - 1);
746 *data <<
uint32(maxRunes);
747 for (
uint32 i = 0; i < maxRunes; ++i)
749 }
750 }
751
752 if (
flags.Conversation)
753 {
757
759 }
760}
@ AREATRIGGER_FLAG_HAS_TARGET_ROLL_PITCH_YAW
@ AREATRIGGER_FLAG_HAS_FACE_MOVEMENT_DIR
@ AREATRIGGER_FLAG_HAS_DYNAMIC_SHAPE
@ AREATRIGGER_FLAG_HAS_ATTACHED
@ AREATRIGGER_FLAG_HAS_ABSOLUTE_ORIENTATION
@ AREATRIGGER_FLAG_HAS_FOLLOWS_TERRAIN
std::vector< TaggedPosition< Position::XY > > PolygonVertices
std::vector< TaggedPosition< Position::XY > > PolygonVerticesTarget
bool HasFlag(AreaTriggerFlags flag) const
AreaTriggerTemplate const * GetTemplate() const
uint32 GetTimeSinceCreated() const
AreaTriggerShapeInfo const & GetShape() const
uint32 GetTimeToTarget() const
Optional< AreaTriggerOrbitInfo > const & GetOrbit() const
uint32 GetElapsedTimeForMovement() const
::Movement::Spline< int32 > const & GetSpline() const
Position const & GetTargetRollPitchYaw() const
Position const & GetRollPitchYaw() const
AreaTriggerCreateProperties const * GetCreateProperties() const
uint32 GetTextureKitId() const
uint32 GetWorldEffectID() const
Conversation * ToConversation()
AreaTrigger * ToAreaTrigger()
GameObject * ToGameObject()
uint32 GetRuneBaseCooldown() const
uint8 GetRunesState() const
uint32 GetRuneCooldown(uint8 index) const
SceneTemplateByInstance const & GetSceneTemplateByInstanceMap() const
uint32 GetUnitMovementFlags() const
float GetSpeed(UnitMoveType mtype) const
MovementForces const * GetMovementForces() const
bool IsSplineEnabled() const
int32 GetMaxPower(Powers power) const
bool HasUnitMovementFlag(uint32 f) const
virtual uint32 GetPowerIndex(Powers power) const =0
uint32 GetExtraUnitMovementFlags() const
std::unique_ptr< Movement::MoveSpline > movespline
Vehicle * GetVehicleKit() const
uint32 GetExtraUnitMovementFlags2() const
VehicleEntry const * GetVehicleInfo() const
virtual uint16 GetMeleeAnimKitId() const
virtual uint16 GetMovementAnimKitId() const
virtual float GetStationaryO() const
virtual uint16 GetAIAnimKitId() const
virtual float GetStationaryX() const
MovementInfo m_movementInfo
virtual float GetStationaryY() const
virtual float GetStationaryZ() const
static void WriteCreateObjectSplineDataBlock(::Movement::MoveSpline const &moveSpline, ByteBuffer &data)
static void WriteCreateObjectAreaTriggerSpline(::Movement::Spline< int32 > const &spline, ByteBuffer &data)
static void WriteMovementForceWithDirection(MovementForce const &movementForce, ByteBuffer &data, Position const *objectPosition=nullptr)
struct AreaTriggerShapeInfo::@196::@202 CylinderDatas
bool IsBoudedPlane() const
struct AreaTriggerShapeInfo::@196::@200 BoxDatas
struct AreaTriggerShapeInfo::@196::@204 BoundedPlaneDatas
float LocationZOffsetTarget
struct AreaTriggerShapeInfo::@196::@199 SphereDatas
struct AreaTriggerShapeInfo::@196::@201 PolygonDatas
struct AreaTriggerShapeInfo::@196::@203 DiskDatas
Optional< Inertia > inertia
Optional< ObjectGuid > standingOnGameObjectGUID
struct MovementInfo::JumpInfo jump
float stepUpStartElevation
struct MovementInfo::TransportInfo transport
Optional< AdvFlying > advFlying
float GetPositionZ() const
float GetOrientation() const
Streamer< XYZ > PositionXYZStream()
float GetPositionX() const
float GetPositionY() const
Optional< ObjectGuid > ReplaceObject