From 3137a82c7cedb71f4a8ef06cb2d6e5741af65c9b Mon Sep 17 00:00:00 2001 From: QAston Date: Thu, 23 Jun 2011 13:28:52 +0200 Subject: Core/Spells: Cleanup in Spell.h: - Codestyle (fix function naming) and cleanup changes in SpellCastTargets class, also access variables of this class by getters/setters - Move IsQuestTameSpell function to SpellMgr.h - Move UnitList typedef to Unit.h Additionally - add missing copyright notice to SpellAuraEffects.h --- src/server/game/Spells/SpellScript.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/server/game/Spells/SpellScript.cpp') diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 59be9c71963..0fe75da3da1 100755 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -266,26 +266,31 @@ SpellEntry const* SpellScript::GetSpellInfo() return m_spell->GetSpellInfo(); } -WorldLocation* SpellScript::GetTargetDest() +WorldLocation const* SpellScript::GetTargetDest() { if (m_spell->m_targets.HasDst()) - return &m_spell->m_targets.m_dstPos; + return m_spell->m_targets.GetDst(); return NULL; } +void SpellScript::SetTargetDest(WorldLocation& loc) +{ + m_spell->m_targets.SetDst(loc); +} + Unit* SpellScript::GetTargetUnit() { - return m_spell->m_targets.getUnitTarget(); + return m_spell->m_targets.GetUnitTarget(); } GameObject* SpellScript::GetTargetGObj() { - return m_spell->m_targets.getGOTarget(); + return m_spell->m_targets.GetGOTarget(); } Item* SpellScript::GetTargetItem() { - return m_spell->m_targets.getItemTarget(); + return m_spell->m_targets.GetItemTarget(); } Unit* SpellScript::GetHitUnit() -- cgit v1.2.3