aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellScript.cpp
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2012-03-03 00:19:00 +0100
committerQAston <qaston@gmail.com>2012-03-03 00:19:48 +0100
commita08fe16d6967798b3dcb92ef03399b34c29e2597 (patch)
tree3b86880c1893e5f17655ab2dba6644b44e43f368 /src/server/game/Spells/SpellScript.cpp
parentb0985b4d5f98186a28b82fb9d92380de1fadafd1 (diff)
Core/Spells: Allow spell effects to have multiple destinations. Spells like: 49814, 10869 and similar are now properly selecting destination targets.
Diffstat (limited to 'src/server/game/Spells/SpellScript.cpp')
-rwxr-xr-xsrc/server/game/Spells/SpellScript.cpp17
1 files changed, 11 insertions, 6 deletions
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())