TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SpellDestination Struct Reference

#include <Spell.h>

Public Member Functions

 SpellDestination ()
 
 SpellDestination (float x, float y, float z, float orientation=0.0f, uint32 mapId=MAPID_INVALID)
 
 SpellDestination (Position const &pos)
 
 SpellDestination (WorldObject const &wObj)
 
void Relocate (Position const &pos)
 
void RelocateOffset (Position const &offset)
 

Public Attributes

WorldLocation _position
 
ObjectGuid _transportGUID
 
Position _transportOffset
 

Constructor & Destructor Documentation

SpellDestination::SpellDestination ( )
65 {
66  _position.Relocate(0, 0, 0, 0);
68  _transportOffset.Relocate(0, 0, 0, 0);
69 }
Position _transportOffset
Definition: Spell.h:130
WorldLocation _position
Definition: Spell.h:128
void Relocate(float x, float y)
Definition: Position.h:67
ObjectGuid _transportGUID
Definition: Spell.h:129
void Clear()
Definition: ObjectGuid.h:215

+ Here is the call graph for this function:

SpellDestination::SpellDestination ( float  x,
float  y,
float  z,
float  orientation = 0.0f,
uint32  mapId = MAPID_INVALID 
)
72 {
73  _position.Relocate(x, y, z, orientation);
75  _position.m_mapId = mapId;
76  _transportOffset.Relocate(0, 0, 0, 0);
77 }
Position _transportOffset
Definition: Spell.h:130
WorldLocation _position
Definition: Spell.h:128
uint32 m_mapId
Definition: Position.h:256
void Relocate(float x, float y)
Definition: Position.h:67
ObjectGuid _transportGUID
Definition: Spell.h:129
G3D::int16 z
Definition: Vector3int16.h:46
G3D::int16 y
Definition: Vector2int16.h:38
void Clear()
Definition: ObjectGuid.h:215
G3D::int16 x
Definition: Vector2int16.h:37

+ Here is the call graph for this function:

SpellDestination::SpellDestination ( Position const pos)
80 {
81  _position.Relocate(pos);
83  _transportOffset.Relocate(0, 0, 0, 0);
84 }
Position _transportOffset
Definition: Spell.h:130
WorldLocation _position
Definition: Spell.h:128
void Relocate(float x, float y)
Definition: Position.h:67
ObjectGuid _transportGUID
Definition: Spell.h:129
void Clear()
Definition: ObjectGuid.h:215

+ Here is the call graph for this function:

SpellDestination::SpellDestination ( WorldObject const wObj)
87 {
88  _transportGUID = wObj.GetTransGUID();
89  _transportOffset.Relocate(wObj.GetTransOffsetX(), wObj.GetTransOffsetY(), wObj.GetTransOffsetZ(), wObj.GetTransOffsetO());
90  _position.Relocate(wObj);
91 }
Position _transportOffset
Definition: Spell.h:130
WorldLocation _position
Definition: Spell.h:128
void Relocate(float x, float y)
Definition: Position.h:67
ObjectGuid _transportGUID
Definition: Spell.h:129

+ Here is the call graph for this function:

Member Function Documentation

void SpellDestination::Relocate ( Position const pos)
94 {
95  if (!_transportGUID.IsEmpty())
96  {
97  Position offset;
98  _position.GetPositionOffsetTo(pos, offset);
100  }
101  _position.Relocate(pos);
102 }
Position _transportOffset
Definition: Spell.h:130
void RelocateOffset(Position const &offset)
Definition: Position.cpp:32
WorldLocation _position
Definition: Spell.h:128
void Relocate(float x, float y)
Definition: Position.h:67
ObjectGuid _transportGUID
Definition: Spell.h:129
void GetPositionOffsetTo(Position const &endPos, Position &retOffset) const
Definition: Position.cpp:45
Definition: Position.h:27
bool IsEmpty() const
Definition: ObjectGuid.h:242

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void SpellDestination::RelocateOffset ( Position const offset)
105 {
106  if (!_transportGUID.IsEmpty())
108 
109  _position.RelocateOffset(offset);
110 }
Position _transportOffset
Definition: Spell.h:130
void RelocateOffset(Position const &offset)
Definition: Position.cpp:32
WorldLocation _position
Definition: Spell.h:128
ObjectGuid _transportGUID
Definition: Spell.h:129
bool IsEmpty() const
Definition: ObjectGuid.h:242

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

WorldLocation SpellDestination::_position
ObjectGuid SpellDestination::_transportGUID
Position SpellDestination::_transportOffset

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