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
335 {
336 pos.Relocate(0.0f, 0.0f, 0.0f, 0.0f);
338 jump.Reset();
339 }
void Reset()
Definition Object.h:323
void Reset()
Definition Object.h:298
struct MovementInfo::JumpInfo jump
struct MovementInfo::TransportInfo transport
Position pos
Definition Object.h:292
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
348{ flags2 |= flag; }
uint16 flags2
Definition Object.h:291

References flags2.

◆ AddMovementFlag()

void MovementInfo::AddMovementFlag ( uint32  flag)
inline

◆ GetExtraMovementFlags()

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

References flags2.

◆ GetMovementFlags()

◆ HasExtraMovementFlag()

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

References flags2.

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

◆ HasMovementFlag()

◆ OutDebug()

void MovementInfo::OutDebug ( )
999{
1000 LOG_INFO("movement", "MOVEMENT INFO");
1001 LOG_INFO("movement", "guid {}", guid.ToString());
1002 LOG_INFO("movement", "flags {}", flags);
1003 LOG_INFO("movement", "flags2 {}", flags2);
1004 LOG_INFO("movement", "time {} current time {}", flags2, uint64(::GameTime::GetGameTime().count()));
1005 LOG_INFO("movement", "position: `{}`", pos.ToString());
1006
1008 {
1009 LOG_INFO("movement", "TRANSPORT:");
1010 LOG_INFO("movement", "guid: {}", transport.guid.ToString());
1011 LOG_INFO("movement", "position: `{}`", transport.pos.ToString());
1012 LOG_INFO("movement", "seat: {}", transport.seat);
1013 LOG_INFO("movement", "time: {}", transport.time);
1014
1016 {
1017 LOG_INFO("movement", "time2: {}", transport.time2);
1018 }
1019 }
1020
1022 LOG_INFO("movement", "pitch: {}", pitch);
1023
1024 LOG_INFO("movement", "fallTime: {}", fallTime);
1026 LOG_INFO("movement", "j_zspeed: {} j_sinAngle: {} j_cosAngle: {} j_xyspeed: {}", jump.zspeed, jump.sinAngle, jump.cosAngle, jump.xyspeed);
1027
1029 LOG_INFO("movement", "splineElevation: {}", splineElevation);
1030}
std::uint64_t uint64
Definition Define.h:106
#define LOG_INFO(filterType__,...)
Definition Log.h:166
@ MOVEMENTFLAG_ONTRANSPORT
Definition UnitDefines.h:378
@ MOVEMENTFLAG_FLYING
Definition UnitDefines.h:394
@ MOVEMENTFLAG_FALLING
Definition UnitDefines.h:381
@ MOVEMENTFLAG_SWIMMING
Definition UnitDefines.h:390
@ MOVEMENTFLAG_SPLINE_ELEVATION
Definition UnitDefines.h:395
@ MOVEMENTFLAG2_ALWAYS_ALLOW_PITCHING
Definition UnitDefines.h:432
@ MOVEMENTFLAG2_INTERPOLATED_MOVEMENT
Definition UnitDefines.h:437
std::string ToString() const
Definition ObjectGuid.cpp:47
Seconds GetGameTime()
Definition GameTime.cpp:38
float cosAngle
Definition Object.h:328
float xyspeed
Definition Object.h:328
float zspeed
Definition Object.h:328
float sinAngle
Definition Object.h:328
uint32 time2
Definition Object.h:311
ObjectGuid guid
Definition Object.h:307
uint32 time
Definition Object.h:310
int8 seat
Definition Object.h:309
Position pos
Definition Object.h:308
ObjectGuid guid
Definition Object.h:289
uint32 fallTime
Definition Object.h:318
float splineElevation
Definition Object.h:332
float pitch
Definition Object.h:315
std::string ToString() const
Definition Position.cpp:59

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

References fallTime.

Referenced by MotionMaster::MoveFall().

◆ SetMovementFlags()

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

struct MovementInfo::TransportInfo MovementInfo::transport

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