aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellEffects.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-10-18 16:25:58 -0500
committermegamage <none@none>2008-10-18 16:25:58 -0500
commitda17b0fd41af2484248ec185fc48a65f9f7d18eb (patch)
tree0bbfb9648781ed0c61da0042c04e82eca0fa8f7a /src/game/SpellEffects.cpp
parentfe453877d115291a161fd80e1e0cbec970192eeb (diff)
[svn] Update some Black Temple boss scripts.
Implement some Black Temple boss spells. Update maiden of virtue and void reaver scripts. Patch provided by Blaymoira. --HG-- branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
-rw-r--r--src/game/SpellEffects.cpp58
1 files changed, 23 insertions, 35 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 75e01781923..f7d9861dd03 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -4665,15 +4665,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
break;
}
- // Dreaming Glory
- case 28698:
- {
- if(!unitTarget)
- return;
- unitTarget->CastSpell(unitTarget, 28694, true);
- break;
- }
-
// Netherbloom
case 28702:
{
@@ -4748,22 +4739,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
}
break;
}
- case 41126: // Flame Crash
- {
- if(!unitTarget)
- return;
-
- unitTarget->CastSpell(unitTarget, 41131, true);
- break;
- }
- case 44876: // Force Cast - Portal Effect: Sunwell Isle
- {
- if(!unitTarget)
- return;
-
- unitTarget->CastSpell(unitTarget, 44870, true);
- break;
- }
// Goblin Weather Machine
case 46203:
@@ -4790,14 +4765,32 @@ void Spell::EffectScriptEffect(uint32 effIndex)
unitTarget->CastSpell(unitTarget, spellId, true);
break;
}
+
+ }
+
+ if(!unitTarget || !unitTarget->isAlive()) // can we remove this check?
+ {
+ sLog.outError("Spell %u in EffectScriptEffect does not have unitTarget", m_spellInfo->Id);
+ return;
+ }
+
+ switch(m_spellInfo->Id)
+ {
+ // Dreaming Glory
+ case 28698: unitTarget->CastSpell(unitTarget, 28694, true); break;
+ // Needle Spine
+ case 39835: unitTarget->CastSpell(unitTarget, 39968, true); break;
+ // Draw Soul
+ case 40904: unitTarget->CastSpell(m_caster, 40903, true); break;
+ // Flame Crash
+ case 41126: unitTarget->CastSpell(unitTarget, 41131, true); break;
+ // Force Cast - Portal Effect: Sunwell Isle
+ case 44876: unitTarget->CastSpell(unitTarget, 44870, true); break;
//5,000 Gold
case 46642:
{
- if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
- return;
-
- ((Player*)unitTarget)->ModifyMoney(50000000);
-
+ if(unitTarget->GetTypeId() == TYPEID_PLAYER)
+ ((Player*)unitTarget)->ModifyMoney(50000000);
break;
}
}
@@ -4809,8 +4802,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
// Judgement
case 0x800000:
{
- if(!unitTarget || !unitTarget->isAlive())
- return;
uint32 spellId2 = 0;
// all seals have aura dummy
@@ -4861,9 +4852,6 @@ void Spell::EffectScriptEffect(uint32 effIndex)
}
// normal DB scripted effect
- if(!unitTarget)
- return;
-
sLog.outDebug("Spell ScriptStart spellid %u in EffectScriptEffect ", m_spellInfo->Id);
sWorld.ScriptsStart(sSpellScripts, m_spellInfo->Id, m_caster, unitTarget);
}