aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorXTZGZoReX <none@none>2010-03-18 14:57:39 +0100
committerXTZGZoReX <none@none>2010-03-18 14:57:39 +0100
commit793a22669273eceffef2c39b17623f8254588b48 (patch)
treee1dba9592072a871998c165c50e89fa830d7e47c /src
parent1a6f216e91fa557ab8392f9d65008f2dafa061b0 (diff)
* Remove typeid check and fix cast target for Improved Fear. Patch by jesper.vortex.
* Closes #946. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellAuras.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index d4b84e9191f..412ec17d60c 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1100,21 +1100,18 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
// Improved Fear
else if (GetSpellProto()->SpellFamilyFlags[1] & 0x00000400)
{
- if (caster->GetTypeId() == TYPEID_UNIT)
+ if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_WARLOCK, 98, 0))
{
- if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_WARLOCK, 98, 0))
+ uint32 spellId = 0;
+ switch (aurEff->GetId())
{
- uint32 spellId = 0;
- switch (aurEff->GetId())
- {
- case 53759: spellId = 60947; break;
- case 53754: spellId = 60946; break;
- default:
- sLog.outError("Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
- }
- if (spellId)
- caster->CastSpell(caster, spellId, true);
+ case 53759: spellId = 60947; break;
+ case 53754: spellId = 60946; break;
+ default:
+ sLog.outError("Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
}
+ if (spellId)
+ caster->CastSpell(target, spellId, true);
}
}
switch(GetId())