TrinityCore
Loading...
Searching...
No Matches
SpellCastTargets Class Reference

#include <SpellDefines.h>

Public Member Functions

 SpellCastTargets ()
 
 SpellCastTargets (Unit *caster, WorldPackets::Spells::SpellCastRequest const &spellCastRequest)
 
 ~SpellCastTargets ()
 
void Read (ByteBuffer &data, Unit *caster)
 
void Write (WorldPackets::Spells::SpellTargetData &data)
 
uint32 GetTargetMask () const
 
void SetTargetMask (uint32 newMask)
 
void SetTargetFlag (SpellCastTargetFlags flag)
 
ObjectGuid GetUnitTargetGUID () const
 
Unit * GetUnitTarget () const
 
void SetUnitTarget (Unit *target)
 
ObjectGuid GetGOTargetGUID () const
 
GameObject * GetGOTarget () const
 
void SetGOTarget (GameObject *target)
 
ObjectGuid GetCorpseTargetGUID () const
 
Corpse * GetCorpseTarget () const
 
WorldObject * GetObjectTarget () const
 
ObjectGuid GetObjectTargetGUID () const
 
void RemoveObjectTarget ()
 
ObjectGuid GetItemTargetGUID () const
 
Item * GetItemTarget () const
 
uint32 GetItemTargetEntry () const
 
void SetItemTarget (Item *item)
 
void SetTradeItemTarget (Player *caster)
 
void UpdateTradeSlotItem ()
 
SpellDestination const * GetSrc () const
 
Position const * GetSrcPos () const
 
void SetSrc (float x, float y, float z)
 
void SetSrc (Position const &pos)
 
void SetSrc (WorldObject const &wObj)
 
void ModSrc (Position const &pos)
 
void RemoveSrc ()
 
SpellDestination const * GetDst () const
 
WorldLocation const * GetDstPos () const
 
void SetDst (float x, float y, float z, float orientation, uint32 mapId=MAPID_INVALID)
 
void SetDst (Position const &pos)
 
void SetDst (WorldObject const &wObj)
 
void SetDst (SpellDestination const &spellDest)
 
void SetDst (SpellCastTargets const &spellTargets)
 
void ModDst (Position const &pos)
 
void ModDst (SpellDestination const &spellDest)
 
void RemoveDst ()
 
bool HasSrc () const
 
bool HasDst () const
 
bool HasTraj () const
 
float GetPitch () const
 
void SetPitch (float pitch)
 
float GetSpeed () const
 
void SetSpeed (float speed)
 
float GetDist2d () const
 
float GetSpeedXY () const
 
float GetSpeedZ () const
 
void Update (WorldObject *caster)
 
std::string const & GetTargetString () const
 

Private Attributes

uint32 m_targetMask
 
WorldObject * m_objectTarget
 
Item * m_itemTarget
 
ObjectGuid m_objectTargetGUID
 
ObjectGuid m_itemTargetGUID
 
uint32 m_itemTargetEntry
 
SpellDestination m_src
 
SpellDestination m_dst
 
float m_pitch
 
float m_speed
 
std::string m_strTarget
 

Detailed Description

Definition at line 226 of file SpellDefines.h.

Constructor & Destructor Documentation

◆ SpellCastTargets() [1/2]

SpellCastTargets::SpellCastTargets ( )

Definition at line 118 of file Spell.cpp.

References m_itemTarget, m_itemTargetEntry, m_objectTarget, and m_targetMask.

◆ SpellCastTargets() [2/2]

◆ ~SpellCastTargets()

SpellCastTargets::~SpellCastTargets ( )

Definition at line 169 of file Spell.cpp.

Member Function Documentation

◆ GetCorpseTarget()

Corpse * SpellCastTargets::GetCorpseTarget ( ) const

Definition at line 325 of file Spell.cpp.

References m_objectTarget, and Object::ToCorpse().

Referenced by Spell::GetMinMaxRange(), and Spell::SelectEffectTypeImplicitTargets().

◆ GetCorpseTargetGUID()

ObjectGuid SpellCastTargets::GetCorpseTargetGUID ( ) const

Definition at line 317 of file Spell.cpp.

References ObjectGuid::Empty, ObjectGuid::IsCorpse(), and m_objectTargetGUID.

Referenced by Spell::CheckEffectTarget().

◆ GetDist2d()

float SpellCastTargets::GetDist2d ( ) const
inline

◆ GetDst()

SpellDestination const * SpellCastTargets::GetDst ( ) const

Definition at line 418 of file Spell.cpp.

References m_dst.

Referenced by Spell::SelectImplicitDestDestTargets(), and Spell::SelectSpellTargets().

◆ GetDstPos()

◆ GetGOTarget()

◆ GetGOTargetGUID()

ObjectGuid SpellCastTargets::GetGOTargetGUID ( ) const

◆ GetItemTarget()

◆ GetItemTargetEntry()

uint32 SpellCastTargets::GetItemTargetEntry ( ) const
inline

Definition at line 258 of file SpellDefines.h.

Referenced by Spell::CheckItems(), and Spell::TakeReagents().

◆ GetItemTargetGUID()

ObjectGuid SpellCastTargets::GetItemTargetGUID ( ) const
inline

Definition at line 256 of file SpellDefines.h.

Referenced by Spell::CheckCast(), and Spell::CheckItems().

◆ GetObjectTarget()

◆ GetObjectTargetGUID()

ObjectGuid SpellCastTargets::GetObjectTargetGUID ( ) const

Definition at line 338 of file Spell.cpp.

References m_objectTargetGUID.

Referenced by Spell::_cast(), Spell::EffectJumpDest(), and Spell::SendChannelStart().

◆ GetPitch()

float SpellCastTargets::GetPitch ( ) const
inline

Definition at line 286 of file SpellDefines.h.

Referenced by Spell::SelectImplicitTrajTargets(), and Spell::SendSpellGo().

◆ GetSpeed()

float SpellCastTargets::GetSpeed ( ) const
inline

Definition at line 288 of file SpellDefines.h.

◆ GetSpeedXY()

float SpellCastTargets::GetSpeedXY ( ) const
inline

◆ GetSpeedZ()

float SpellCastTargets::GetSpeedZ ( ) const
inline

◆ GetSrc()

SpellDestination const * SpellCastTargets::GetSrc ( ) const

Definition at line 379 of file Spell.cpp.

References m_src.

◆ GetSrcPos()

Position const * SpellCastTargets::GetSrcPos ( ) const

◆ GetTargetMask()

uint32 SpellCastTargets::GetTargetMask ( ) const
inline

◆ GetTargetString()

std::string const & SpellCastTargets::GetTargetString ( ) const
inline

Definition at line 296 of file SpellDefines.h.

◆ GetUnitTarget()

◆ GetUnitTargetGUID()

ObjectGuid SpellCastTargets::GetUnitTargetGUID ( ) const

◆ HasDst()

◆ HasSrc()

bool SpellCastTargets::HasSrc ( ) const

◆ HasTraj()

◆ ModDst() [1/2]

◆ ModDst() [2/2]

void SpellCastTargets::ModDst ( SpellDestination const &  spellDest)

Definition at line 464 of file Spell.cpp.

References ASSERT, m_dst, m_targetMask, and TARGET_FLAG_DEST_LOCATION.

◆ ModSrc()

void SpellCastTargets::ModSrc ( Position const &  pos)

◆ Read()

◆ RemoveDst()

void SpellCastTargets::RemoveDst ( )

Definition at line 470 of file Spell.cpp.

References m_targetMask, and TARGET_FLAG_DEST_LOCATION.

Referenced by Spell::InitExplicitTargets().

◆ RemoveObjectTarget()

void SpellCastTargets::RemoveObjectTarget ( )

◆ RemoveSrc()

void SpellCastTargets::RemoveSrc ( )

Definition at line 413 of file Spell.cpp.

References m_targetMask, and TARGET_FLAG_SOURCE_LOCATION.

Referenced by Spell::InitExplicitTargets().

◆ SetDst() [1/5]

◆ SetDst() [2/5]

void SpellCastTargets::SetDst ( Position const &  pos)

Definition at line 434 of file Spell.cpp.

References m_dst, m_targetMask, and TARGET_FLAG_DEST_LOCATION.

◆ SetDst() [3/5]

void SpellCastTargets::SetDst ( SpellCastTargets const &  spellTargets)

Definition at line 452 of file Spell.cpp.

References m_dst, m_targetMask, and TARGET_FLAG_DEST_LOCATION.

◆ SetDst() [4/5]

void SpellCastTargets::SetDst ( SpellDestination const &  spellDest)

Definition at line 446 of file Spell.cpp.

References m_dst, m_targetMask, and TARGET_FLAG_DEST_LOCATION.

◆ SetDst() [5/5]

void SpellCastTargets::SetDst ( WorldObject const &  wObj)

Definition at line 440 of file Spell.cpp.

References m_dst, m_targetMask, and TARGET_FLAG_DEST_LOCATION.

◆ SetGOTarget()

void SpellCastTargets::SetGOTarget ( GameObject *  target)

◆ SetItemTarget()

◆ SetPitch()

void SpellCastTargets::SetPitch ( float  pitch)
inline

◆ SetSpeed()

void SpellCastTargets::SetSpeed ( float  speed)
inline

◆ SetSrc() [1/3]

void SpellCastTargets::SetSrc ( float  x,
float  y,
float  z 
)

◆ SetSrc() [2/3]

void SpellCastTargets::SetSrc ( Position const &  pos)

Definition at line 395 of file Spell.cpp.

References m_src, m_targetMask, and TARGET_FLAG_SOURCE_LOCATION.

◆ SetSrc() [3/3]

void SpellCastTargets::SetSrc ( WorldObject const &  wObj)

Definition at line 401 of file Spell.cpp.

References m_src, m_targetMask, and TARGET_FLAG_SOURCE_LOCATION.

◆ SetTargetFlag()

void SpellCastTargets::SetTargetFlag ( SpellCastTargetFlags  flag)
inline

Definition at line 239 of file SpellDefines.h.

Referenced by Spell::SelectSpellTargets().

◆ SetTargetMask()

void SpellCastTargets::SetTargetMask ( uint32  newMask)
inline

Definition at line 237 of file SpellDefines.h.

◆ SetTradeItemTarget()

void SpellCastTargets::SetTradeItemTarget ( Player *  caster)

◆ SetUnitTarget()

◆ Update()

◆ UpdateTradeSlotItem()

void SpellCastTargets::UpdateTradeSlotItem ( )

◆ Write()

Member Data Documentation

◆ m_dst

SpellDestination SpellCastTargets::m_dst
private

◆ m_itemTarget

Item* SpellCastTargets::m_itemTarget
private

Definition at line 303 of file SpellDefines.h.

Referenced by SetItemTarget(), SpellCastTargets(), Update(), UpdateTradeSlotItem(), and Write().

◆ m_itemTargetEntry

uint32 SpellCastTargets::m_itemTargetEntry
private

◆ m_itemTargetGUID

ObjectGuid SpellCastTargets::m_itemTargetGUID
private

Definition at line 307 of file SpellDefines.h.

Referenced by Read(), SetItemTarget(), SetTradeItemTarget(), Update(), and UpdateTradeSlotItem().

◆ m_objectTarget

WorldObject* SpellCastTargets::m_objectTarget
private

◆ m_objectTargetGUID

◆ m_pitch

float SpellCastTargets::m_pitch
private

Definition at line 313 of file SpellDefines.h.

◆ m_speed

float SpellCastTargets::m_speed
private

Definition at line 313 of file SpellDefines.h.

◆ m_src

SpellDestination SpellCastTargets::m_src
private

◆ m_strTarget

std::string SpellCastTargets::m_strTarget
private

Definition at line 314 of file SpellDefines.h.

Referenced by Read(), SpellCastTargets(), and Write().

◆ m_targetMask


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