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 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 371 of file SpellDefines.h.

Constructor & Destructor Documentation

◆ SpellCastTargets() [1/2]

SpellCastTargets::SpellCastTargets ( )

Definition at line 98 of file Spell.cpp.

◆ SpellCastTargets() [2/2]

◆ ~SpellCastTargets()

SpellCastTargets::~SpellCastTargets ( )

Definition at line 142 of file Spell.cpp.

Member Function Documentation

◆ GetCorpseTarget()

Corpse * SpellCastTargets::GetCorpseTarget ( ) const

Definition at line 238 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 230 of file Spell.cpp.

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

Referenced by Spell::CheckEffectTarget().

◆ GetDist2d()

float SpellCastTargets::GetDist2d ( ) const
inline

◆ GetDst()

◆ GetDstPos()

◆ GetGOTarget()

◆ GetGOTargetGUID()

ObjectGuid SpellCastTargets::GetGOTargetGUID ( ) const

◆ GetItemTarget()

◆ GetItemTargetEntry()

uint32 SpellCastTargets::GetItemTargetEntry ( ) const
inline

Definition at line 402 of file SpellDefines.h.

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

◆ GetItemTargetGUID()

ObjectGuid SpellCastTargets::GetItemTargetGUID ( ) const
inline

Definition at line 400 of file SpellDefines.h.

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

◆ GetObjectTarget()

◆ GetObjectTargetGUID()

ObjectGuid SpellCastTargets::GetObjectTargetGUID ( ) const

Definition at line 251 of file Spell.cpp.

References m_objectTargetGUID.

Referenced by Spell::_cast(), and spell_mage_hot_streak::CheckProc().

◆ GetPitch()

float SpellCastTargets::GetPitch ( ) const
inline

Definition at line 430 of file SpellDefines.h.

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

◆ GetSpeed()

float SpellCastTargets::GetSpeed ( ) const
inline

Definition at line 432 of file SpellDefines.h.

◆ GetSpeedXY()

float SpellCastTargets::GetSpeedXY ( ) const
inline

◆ GetSpeedZ()

float SpellCastTargets::GetSpeedZ ( ) const
inline

Definition at line 437 of file SpellDefines.h.

◆ GetSrc()

SpellDestination const * SpellCastTargets::GetSrc ( ) const

Definition at line 292 of file Spell.cpp.

References m_src.

◆ GetSrcPos()

Position const * SpellCastTargets::GetSrcPos ( ) const

◆ GetTargetMask()

uint32 SpellCastTargets::GetTargetMask ( ) const
inline

Definition at line 380 of file SpellDefines.h.

Referenced by Spell::_cast(), Spell::CheckCast(), HasDst(), HasSrc(), and Spell::prepare().

◆ GetTargetString()

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

Definition at line 440 of file SpellDefines.h.

◆ GetUnitTarget()

◆ GetUnitTargetGUID()

◆ HasDst()

◆ HasSrc()

bool SpellCastTargets::HasSrc ( ) const

◆ HasTraj()

◆ ModDst() [1/2]

◆ ModDst() [2/2]

void SpellCastTargets::ModDst ( SpellDestination const &  spellDest)

Definition at line 377 of file Spell.cpp.

References ASSERT, m_dst, m_targetMask, and TARGET_FLAG_DEST_LOCATION.

◆ ModSrc()

void SpellCastTargets::ModSrc ( Position const &  pos)

◆ RemoveDst()

void SpellCastTargets::RemoveDst ( )

Definition at line 383 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 326 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 347 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 365 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 359 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 353 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 308 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 314 of file Spell.cpp.

References m_src, m_targetMask, and TARGET_FLAG_SOURCE_LOCATION.

◆ SetTargetFlag()

void SpellCastTargets::SetTargetFlag ( SpellCastTargetFlags  flag)
inline

Definition at line 383 of file SpellDefines.h.

Referenced by Spell::SelectSpellTargets().

◆ SetTargetMask()

void SpellCastTargets::SetTargetMask ( uint32  newMask)
inline

Definition at line 381 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 447 of file SpellDefines.h.

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

◆ m_itemTargetEntry

uint32 SpellCastTargets::m_itemTargetEntry
private

Definition at line 452 of file SpellDefines.h.

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

◆ m_itemTargetGUID

ObjectGuid SpellCastTargets::m_itemTargetGUID
private

Definition at line 451 of file SpellDefines.h.

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

◆ m_objectTarget

WorldObject* SpellCastTargets::m_objectTarget
private

◆ m_objectTargetGUID

ObjectGuid SpellCastTargets::m_objectTargetGUID
private

◆ m_pitch

float SpellCastTargets::m_pitch
private

Definition at line 457 of file SpellDefines.h.

◆ m_speed

float SpellCastTargets::m_speed
private

Definition at line 457 of file SpellDefines.h.

◆ m_src

SpellDestination SpellCastTargets::m_src
private

◆ m_strTarget

std::string SpellCastTargets::m_strTarget
private

Definition at line 458 of file SpellDefines.h.

Referenced by Write().

◆ m_targetMask


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