TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 SetExtraMovementFlags (uint16 flag)
 
void AddExtraMovementFlag (uint16 flag)
 
void RemoveExtraMovementFlag (uint16 flag)
 
bool HasExtraMovementFlag (uint16 flag) const
 
uint32 GetFallTime () const
 
void SetFallTime (uint32 fallTime)
 
void ResetTransport ()
 
void ResetJump ()
 
void OutDebug ()
 

Public Attributes

ObjectGuid guid
 
uint32 flags
 
uint16 flags2
 
Position pos
 
uint32 time
 
struct MovementInfo::TransportInfo transport
 
float pitch
 
struct MovementInfo::JumpInfo jump
 
float splineElevation
 

Constructor & Destructor Documentation

MovementInfo::MovementInfo ( )
inline
318  :
319  flags(0), flags2(0), time(0), pitch(0.0f), splineElevation(0.0f)
320  {
321  pos.Relocate(0.0f, 0.0f, 0.0f, 0.0f);
322  transport.Reset();
323  jump.Reset();
324  }
struct MovementInfo::JumpInfo jump
Position pos
Definition: Object.h:273
struct MovementInfo::TransportInfo transport
uint32 time
Definition: Object.h:274
void Relocate(float x, float y)
Definition: Position.h:67
uint32 flags
Definition: Object.h:271
float pitch
Definition: Object.h:298
uint16 flags2
Definition: Object.h:272
float splineElevation
Definition: Object.h:316
void Reset()
Definition: Object.h:279
void Reset()
Definition: Object.h:303

+ Here is the call graph for this function:

Member Function Documentation

void MovementInfo::AddExtraMovementFlag ( uint16  flag)
inline
334 { flags2 |= flag; }
uint16 flags2
Definition: Object.h:272
void MovementInfo::AddMovementFlag ( uint32  flag)
inline
328 { flags |= flag; }
uint32 flags
Definition: Object.h:271
uint16 MovementInfo::GetExtraMovementFlags ( ) const
inline
332 { return flags2; }
uint16 flags2
Definition: Object.h:272
uint32 MovementInfo::GetFallTime ( ) const
inline
338 { return jump.fallTime; }
uint32 fallTime
Definition: Object.h:309
struct MovementInfo::JumpInfo jump
uint32 MovementInfo::GetMovementFlags ( ) const
inline
326 { return flags; }
uint32 flags
Definition: Object.h:271

+ Here is the caller graph for this function:

bool MovementInfo::HasExtraMovementFlag ( uint16  flag) const
inline
336 { return (flags2 & flag) != 0; }
uint16 flags2
Definition: Object.h:272
bool MovementInfo::HasMovementFlag ( uint32  flag) const
inline
330 { return (flags & flag) != 0; }
uint32 flags
Definition: Object.h:271

+ Here is the caller graph for this function:

void MovementInfo::OutDebug ( )
1411 {
1412  TC_LOG_DEBUG("misc", "MOVEMENT INFO");
1413  TC_LOG_DEBUG("misc", "%s", guid.ToString().c_str());
1414  TC_LOG_DEBUG("misc", "flags %s (%u)", Movement::MovementFlags_ToString(flags).c_str(), flags);
1415  TC_LOG_DEBUG("misc", "flags2 %s (%u)", Movement::MovementFlagsExtra_ToString(flags2).c_str(), flags2);
1416  TC_LOG_DEBUG("misc", "time %u current time %u", time, getMSTime());
1417  TC_LOG_DEBUG("misc", "position: `%s`", pos.ToString().c_str());
1418  if (!transport.guid.IsEmpty())
1419  {
1420  TC_LOG_DEBUG("misc", "TRANSPORT:");
1421  TC_LOG_DEBUG("misc", "%s", transport.guid.ToString().c_str());
1422  TC_LOG_DEBUG("misc", "position: `%s`", transport.pos.ToString().c_str());
1423  TC_LOG_DEBUG("misc", "seat: %i", transport.seat);
1424  TC_LOG_DEBUG("misc", "time: %u", transport.time);
1426  TC_LOG_DEBUG("misc", "prevTime: %u", transport.prevTime);
1427  if (transport.vehicleId)
1428  TC_LOG_DEBUG("misc", "vehicleId: %u", transport.vehicleId);
1429  }
1430 
1432  TC_LOG_DEBUG("misc", "pitch: %f", pitch);
1433 
1435  {
1436  TC_LOG_DEBUG("misc", "fallTime: %u j_zspeed: %f", jump.fallTime, jump.zspeed);
1438  TC_LOG_DEBUG("misc", "j_sinAngle: %f j_cosAngle: %f j_xyspeed: %f", jump.sinAngle, jump.cosAngle, jump.xyspeed);
1439  }
1440 
1442  TC_LOG_DEBUG("misc", "splineElevation: %f", splineElevation);
1443 }
TC_GAME_API std::string MovementFlags_ToString(uint32 flags)
Definition: MovementUtil.cpp:195
uint32 fallTime
Definition: Object.h:309
Definition: Unit.h:787
float cosAngle
Definition: Object.h:311
uint32 getMSTime()
Definition: Timer.h:24
struct MovementInfo::JumpInfo jump
Definition: Unit.h:800
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
Position pos
Definition: Object.h:273
Definition: Unit.h:801
uint32 prevTime
Definition: Object.h:293
struct MovementInfo::TransportInfo transport
uint32 time
Definition: Object.h:274
float zspeed
Definition: Object.h:311
TC_GAME_API std::string MovementFlagsExtra_ToString(uint32 flags)
Definition: MovementUtil.cpp:202
std::string ToString() const
Definition: Position.cpp:160
uint32 vehicleId
Definition: Object.h:294
Definition: Unit.h:796
int8 seat
Definition: Object.h:291
uint32 flags
Definition: Object.h:271
float pitch
Definition: Object.h:298
uint16 flags2
Definition: Object.h:272
float splineElevation
Definition: Object.h:316
float sinAngle
Definition: Object.h:311
ObjectGuid guid
Definition: Object.h:270
Position pos
Definition: Object.h:290
ObjectGuid guid
Definition: Object.h:289
uint32 time
Definition: Object.h:292
std::string ToString() const
Definition: ObjectGuid.cpp:99
bool IsEmpty() const
Definition: ObjectGuid.h:242
float xyspeed
Definition: Object.h:311

+ Here is the call graph for this function:

void MovementInfo::RemoveExtraMovementFlag ( uint16  flag)
inline
335 { flags2 &= ~flag; }
uint16 flags2
Definition: Object.h:272
void MovementInfo::RemoveMovementFlag ( uint32  flag)
inline
329 { flags &= ~flag; }
uint32 flags
Definition: Object.h:271

+ Here is the caller graph for this function:

void MovementInfo::ResetJump ( )
inline
347  {
348  jump.Reset();
349  }
struct MovementInfo::JumpInfo jump
void Reset()
Definition: Object.h:303

+ Here is the call graph for this function:

void MovementInfo::ResetTransport ( )
inline
342  {
343  transport.Reset();
344  }
struct MovementInfo::TransportInfo transport
void Reset()
Definition: Object.h:279

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void MovementInfo::SetExtraMovementFlags ( uint16  flag)
inline
333 { flags2 = flag; }
uint16 flags2
Definition: Object.h:272
void MovementInfo::SetFallTime ( uint32  fallTime)
inline
339 { jump.fallTime = fallTime; }
uint32 fallTime
Definition: Object.h:309
struct MovementInfo::JumpInfo jump

+ Here is the caller graph for this function:

void MovementInfo::SetMovementFlags ( uint32  flag)
inline
327 { flags = flag; }
uint32 flags
Definition: Object.h:271

+ Here is the caller graph for this function:

Member Data Documentation

uint32 MovementInfo::flags
uint16 MovementInfo::flags2
ObjectGuid MovementInfo::guid
struct MovementInfo::JumpInfo MovementInfo::jump
float MovementInfo::pitch
Position MovementInfo::pos
float MovementInfo::splineElevation
uint32 MovementInfo::time
struct MovementInfo::TransportInfo MovementInfo::transport

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