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
324 {
325 pos.Relocate(0.0f, 0.0f, 0.0f, 0.0f);
327 jump.Reset();
328 }
struct MovementInfo::JumpInfo jump
struct MovementInfo::TransportInfo transport
Position pos
Definition: Object.h:281
void Reset()
Definition: Object.h:287
void Reset()
Definition: Object.h:312
void Relocate(float x, float y)
Definition: Position.h:72

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

Member Function Documentation

◆ AddExtraMovementFlag()

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

References flags2.

◆ AddMovementFlag()

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

References flags.

◆ GetExtraMovementFlags()

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

References flags2.

◆ GetMovementFlags()

uint32 MovementInfo::GetMovementFlags ( ) const
inline

◆ HasExtraMovementFlag()

bool MovementInfo::HasExtraMovementFlag ( uint16  flag) const
inline
338{ 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}
#define LOG_INFO(filterType__,...)
Definition: Log.h:165
std::uint64_t uint64
Definition: Define.h:106
@ MOVEMENTFLAG_ONTRANSPORT
Definition: UnitDefines.h:353
@ MOVEMENTFLAG_FLYING
Definition: UnitDefines.h:369
@ MOVEMENTFLAG_FALLING
Definition: UnitDefines.h:356
@ MOVEMENTFLAG_SWIMMING
Definition: UnitDefines.h:365
@ MOVEMENTFLAG_SPLINE_ELEVATION
Definition: UnitDefines.h:370
@ MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING
Definition: UnitDefines.h:405
@ MOVEMENTFLAG2_INTERPOLATED_MOVEMENT
Definition: UnitDefines.h:410
Seconds GetGameTime()
Definition: GameTime.cpp:38
ObjectGuid guid
Definition: Object.h:278
uint32 fallTime
Definition: Object.h:307
float splineElevation
Definition: Object.h:321
float pitch
Definition: Object.h:304
uint32 time2
Definition: Object.h:300
ObjectGuid guid
Definition: Object.h:296
uint32 time
Definition: Object.h:299
int8 seat
Definition: Object.h:298
Position pos
Definition: Object.h:297
float cosAngle
Definition: Object.h:317
float xyspeed
Definition: Object.h:317
float zspeed
Definition: Object.h:317
float sinAngle
Definition: Object.h:317
std::string ToString() const
Definition: ObjectGuid.cpp:47
std::string ToString() const
Definition: Position.cpp:52

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
340{ fallTime = newFallTime; }

References fallTime.

Referenced by MotionMaster::MoveFall().

◆ SetMovementFlags()

void MovementInfo::SetMovementFlags ( uint32  flag)
inline
331{ 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