aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-13 18:34:46 -0600
committermegamage <none@none>2009-03-13 18:34:46 -0600
commit664fb612b4f87539a43632e31901e3b93f7aa3a0 (patch)
treece398bf403b982af14cf089fb353c6ca0a89a930 /src/game/SpellEffects.cpp
parent090829bdf8b514862263f6fde101b2273130ae10 (diff)
[7454] Support scripting for dummy spell effects. Author: Lightguard
Note: scripting calls specially added in end of function for allow calling only if internal implementaion absent for dummy effect. Note: TScript part is not updated. --HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 5de46a3483e..a52f289194c 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1247,7 +1247,7 @@ void Spell::EffectDummy(uint32 i)
return;
unitTarget->CastSpell(unitTarget, 58419, true);
- break;
+ return;
}
case 58420: // Portal to Stormwind
{
@@ -1255,7 +1255,7 @@ void Spell::EffectDummy(uint32 i)
return;
unitTarget->CastSpell(unitTarget, 58421, true);
- break;
+ return;
}
}
@@ -1914,6 +1914,15 @@ void Spell::EffectDummy(uint32 i)
m_caster->AddPetAura(petSpell);
return;
}
+
+ // Script based implementation. Must be used only for not good for implementation in core spell effects
+ // So called only for not proccessed cases
+ if(gameObjTarget)
+ Script->EffectDummyGameObj(m_caster, m_spellInfo->Id, i, gameObjTarget);
+ else if(unitTarget && unitTarget->GetTypeId()==TYPEID_UNIT)
+ Script->EffectDummyCreature(m_caster, m_spellInfo->Id, i, (Creature*)unitTarget);
+ else if(itemTarget)
+ Script->EffectDummyItem(m_caster, m_spellInfo->Id, i, itemTarget);
}
void Spell::EffectTriggerSpellWithValue(uint32 i)