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
329 {
330 pos.Relocate(0.0f, 0.0f, 0.0f, 0.0f);
332 jump.Reset();
333 }
void Reset()
Definition Object.h:317
void Reset()
Definition Object.h:292
struct MovementInfo::JumpInfo jump
struct MovementInfo::TransportInfo transport
Position pos
Definition Object.h:286
void Relocate(float x, float y)
Definition Position.h:77

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

Member Function Documentation

◆ AddExtraMovementFlag()

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

References flags2.

◆ AddMovementFlag()

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

References flags.

◆ GetExtraMovementFlags()

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

References flags2.

◆ GetMovementFlags()

uint32 MovementInfo::GetMovementFlags ( ) const
inline

◆ HasExtraMovementFlag()

bool MovementInfo::HasExtraMovementFlag ( uint16  flag) const
inline
343{ 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:106
#define LOG_INFO(filterType__,...)
Definition Log.h:165
@ MOVEMENTFLAG_ONTRANSPORT
Definition UnitDefines.h:374
@ MOVEMENTFLAG_FLYING
Definition UnitDefines.h:390
@ MOVEMENTFLAG_FALLING
Definition UnitDefines.h:377
@ MOVEMENTFLAG_SWIMMING
Definition UnitDefines.h:386
@ MOVEMENTFLAG_SPLINE_ELEVATION
Definition UnitDefines.h:391
@ MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING
Definition UnitDefines.h:426
@ MOVEMENTFLAG2_INTERPOLATED_MOVEMENT
Definition UnitDefines.h:431
std::string ToString() const
Definition ObjectGuid.cpp:47
Seconds GetGameTime()
Definition GameTime.cpp:38
float cosAngle
Definition Object.h:322
float xyspeed
Definition Object.h:322
float zspeed
Definition Object.h:322
float sinAngle
Definition Object.h:322
uint32 time2
Definition Object.h:305
ObjectGuid guid
Definition Object.h:301
uint32 time
Definition Object.h:304
int8 seat
Definition Object.h:303
Position pos
Definition Object.h:302
ObjectGuid guid
Definition Object.h:283
uint32 fallTime
Definition Object.h:312
float splineElevation
Definition Object.h:326
float pitch
Definition Object.h:309
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
345{ fallTime = newFallTime; }

References fallTime.

Referenced by MotionMaster::MoveFall().

◆ SetMovementFlags()

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

References flags.

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

Member Data Documentation

◆ fallTime

◆ flags

◆ flags2

◆ guid

◆ jump

◆ pitch

float MovementInfo::pitch {0.0f}

◆ pos

◆ splineElevation

float MovementInfo::splineElevation {0.0f}

◆ time

◆ transport


The documentation for this struct was generated from the following files: