AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
MovementInfo Struct Reference

#include "Object.h"

Classes

struct  JumpInfo
 
struct  TransportInfo
 

Public Member Functions

 MovementInfo ()
 
uint32 GetMovementFlags () const
 
void SetMovementFlags (uint32 flag)
 
void AddMovementFlag (uint32 flag)
 
void RemoveMovementFlag (uint32 flag)
 
bool HasMovementFlag (uint32 flag) const
 
uint16 GetExtraMovementFlags () const
 
void AddExtraMovementFlag (uint16 flag)
 
bool HasExtraMovementFlag (uint16 flag) const
 
void SetFallTime (uint32 newFallTime)
 
void OutDebug ()
 

Public Attributes

ObjectGuid guid
 
uint32 flags {0}
 
uint16 flags2 {0}
 
Position pos
 
uint32 time {0}
 
struct MovementInfo::TransportInfo transport
 
float pitch {0.0f}
 
uint32 fallTime {0}
 
struct MovementInfo::JumpInfo jump
 
float splineElevation {0.0f}
 

Detailed Description

Constructor & Destructor Documentation

◆ MovementInfo()

MovementInfo::MovementInfo ( )
inline
312 {
313 pos.Relocate(0.0f, 0.0f, 0.0f, 0.0f);
315 jump.Reset();
316 }
struct MovementInfo::JumpInfo jump
struct MovementInfo::TransportInfo transport
Position pos
Definition: Object.h:269
void Reset()
Definition: Object.h:275
void Reset()
Definition: Object.h:300
void Relocate(float x, float y)
Definition: Position.h:73

References jump, pos, Position::Relocate(), MovementInfo::TransportInfo::Reset(), MovementInfo::JumpInfo::Reset(), and transport.

Member Function Documentation

◆ AddExtraMovementFlag()

void MovementInfo::AddExtraMovementFlag ( uint16  flag)
inline
325{ flags2 |= flag; }
uint16 flags2
Definition: Object.h:268

References flags2.

◆ AddMovementFlag()

void MovementInfo::AddMovementFlag ( uint32  flag)
inline
320{ flags |= flag; }
uint32 flags
Definition: Object.h:267

References flags.

◆ GetExtraMovementFlags()

uint16 MovementInfo::GetExtraMovementFlags ( ) const
inline
324{ return flags2; }

References flags2.

◆ GetMovementFlags()

uint32 MovementInfo::GetMovementFlags ( ) const
inline

◆ HasExtraMovementFlag()

bool MovementInfo::HasExtraMovementFlag ( uint16  flag) const
inline
326{ return flags2 & flag; }

References flags2.

Referenced by WorldSession::ReadMovementInfo(), and WorldSession::WriteMovementInfo().

◆ HasMovementFlag()

◆ OutDebug()

void MovementInfo::OutDebug ( )
1017{
1018 LOG_INFO("movement", "MOVEMENT INFO");
1019 LOG_INFO("movement", "guid {}", guid.ToString());
1020 LOG_INFO("movement", "flags {}", flags);
1021 LOG_INFO("movement", "flags2 {}", flags2);
1022 LOG_INFO("movement", "time {} current time {}", flags2, uint64(::GameTime::GetGameTime().count()));
1023 LOG_INFO("movement", "position: `{}`", pos.ToString());
1024
1026 {
1027 LOG_INFO("movement", "TRANSPORT:");
1028 LOG_INFO("movement", "guid: {}", transport.guid.ToString());
1029 LOG_INFO("movement", "position: `{}`", transport.pos.ToString());
1030 LOG_INFO("movement", "seat: {}", transport.seat);
1031 LOG_INFO("movement", "time: {}", transport.time);
1032
1034 {
1035 LOG_INFO("movement", "time2: {}", transport.time2);
1036 }
1037 }
1038
1040 LOG_INFO("movement", "pitch: {}", pitch);
1041
1042 LOG_INFO("movement", "fallTime: {}", fallTime);
1044 LOG_INFO("movement", "j_zspeed: {} j_sinAngle: {} j_cosAngle: {} j_xyspeed: {}", jump.zspeed, jump.sinAngle, jump.cosAngle, jump.xyspeed);
1045
1047 LOG_INFO("movement", "splineElevation: {}", splineElevation);
1048}
std::uint64_t uint64
Definition: Define.h:107
#define LOG_INFO(filterType__,...)
Definition: Log.h:167
@ MOVEMENTFLAG_ONTRANSPORT
Definition: Unit.h:561
@ MOVEMENTFLAG_FLYING
Definition: Unit.h:577
@ MOVEMENTFLAG_FALLING
Definition: Unit.h:564
@ MOVEMENTFLAG_SWIMMING
Definition: Unit.h:573
@ MOVEMENTFLAG_SPLINE_ELEVATION
Definition: Unit.h:578
@ MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING
Definition: Unit.h:613
@ MOVEMENTFLAG2_INTERPOLATED_MOVEMENT
Definition: Unit.h:618
Seconds GetGameTime()
Definition: GameTime.cpp:38
ObjectGuid guid
Definition: Object.h:266
uint32 fallTime
Definition: Object.h:295
float splineElevation
Definition: Object.h:309
float pitch
Definition: Object.h:292
uint32 time2
Definition: Object.h:288
ObjectGuid guid
Definition: Object.h:284
uint32 time
Definition: Object.h:287
int8 seat
Definition: Object.h:286
Position pos
Definition: Object.h:285
float cosAngle
Definition: Object.h:305
float xyspeed
Definition: Object.h:305
float zspeed
Definition: Object.h:305
float sinAngle
Definition: Object.h:305
std::string ToString() const
Definition: ObjectGuid.cpp:47
std::string ToString() const
Definition: Position.cpp:51

References MovementInfo::JumpInfo::cosAngle, fallTime, flags, flags2, GameTime::GetGameTime(), guid, MovementInfo::TransportInfo::guid, jump, LOG_INFO, MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING, MOVEMENTFLAG2_INTERPOLATED_MOVEMENT, MOVEMENTFLAG_FALLING, MOVEMENTFLAG_FLYING, MOVEMENTFLAG_ONTRANSPORT, MOVEMENTFLAG_SPLINE_ELEVATION, MOVEMENTFLAG_SWIMMING, pitch, pos, MovementInfo::TransportInfo::pos, MovementInfo::TransportInfo::seat, MovementInfo::JumpInfo::sinAngle, splineElevation, MovementInfo::TransportInfo::time, MovementInfo::TransportInfo::time2, ObjectGuid::ToString(), Position::ToString(), transport, MovementInfo::JumpInfo::xyspeed, and MovementInfo::JumpInfo::zspeed.

◆ RemoveMovementFlag()

◆ SetFallTime()

void MovementInfo::SetFallTime ( uint32  newFallTime)
inline
328{ fallTime = newFallTime; }

References fallTime.

Referenced by MotionMaster::MoveFall().

◆ SetMovementFlags()

void MovementInfo::SetMovementFlags ( uint32  flag)
inline
319{ flags = flag; }

References flags.

Referenced by Movement::MoveSplineInit::Launch().

Member Data Documentation

◆ fallTime

◆ flags

◆ flags2

◆ guid

◆ jump

◆ pitch

◆ pos

◆ splineElevation

float MovementInfo::splineElevation {0.0f}

◆ time

◆ transport

struct MovementInfo::TransportInfo MovementInfo::transport