From a08fe16d6967798b3dcb92ef03399b34c29e2597 Mon Sep 17 00:00:00 2001 From: QAston Date: Sat, 3 Mar 2012 00:19:00 +0100 Subject: Core/Spells: Allow spell effects to have multiple destinations. Spells like: 49814, 10869 and similar are now properly selecting destination targets. --- src/server/game/Spells/SpellScript.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 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 03fea614c0d..81f8bbd78c5 100755 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -323,7 +323,7 @@ SpellInfo const* SpellScript::GetSpellInfo() WorldLocation const* SpellScript::GetTargetDest() { if (m_spell->m_targets.HasDst()) - return m_spell->m_targets.GetDst(); + return m_spell->m_targets.GetDstPos(); return NULL; } @@ -403,6 +403,16 @@ GameObject* SpellScript::GetHitGObj() return m_spell->gameObjTarget; } +WorldLocation const* SpellScript::GetHitDest() +{ + if (!IsInEffectHook()) + { + sLog->outError("TSCR: Script: `%s` Spell: `%u`: function SpellScript::GetHitGObj was called, but function has no effect in current hook!", m_scriptName->c_str(), m_scriptSpellId); + return NULL; + } + return m_spell->destTarget; +} + int32 SpellScript::GetHitDamage() { if (!IsInTargetHook()) @@ -468,11 +478,6 @@ void SpellScript::PreventHitAura() m_spell->m_spellAura->Remove(); } -void SpellScript::GetSummonPosition(uint32 i, Position &pos, float radius = 0.0f, uint32 count = 0) -{ - m_spell->GetSummonPosition(i, pos, radius, count); -} - void SpellScript::PreventHitEffect(SpellEffIndex effIndex) { if (!IsInHitPhase() && !IsInEffectHook()) -- cgit v1.2.3