Core/Spells: Allow a priest's Mana Burn to break fear.

Patch by dr.tenma.
Fixes issue #3985

--HG--
branch : trunk
This commit is contained in:
silinoron
2010-09-18 19:26:34 -07:00
parent 48b29e6019
commit 383af00e2b
2 changed files with 37 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=-8129 AND `ScriptName`='spell_pri_mana_burn';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(-8129,'spell_pri_mana_burn');

View File

@@ -31,6 +31,39 @@ enum PriestSpells
PRIEST_SPELL_PENANCE_R1_HEAL = 47757,
};
class spell_pri_mana_burn : public SpellScriptLoader
{
public:
spell_pri_mana_burn() : SpellScriptLoader("spell_pri_mana_burn") { }
class spell_pri_mana_burn_SpellScript : public SpellScript
{
bool Validate(SpellEntry const * spellEntry)
{
return true;
}
void HandleAfterHit()
{
Unit * unitTarget = GetHitUnit();
if (!unitTarget)
return;
unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH));
}
void Register()
{
AfterHit += SpellHitFn(spell_pri_mana_burn_SpellScript::HandleAfterHit);
}
};
SpellScript * GetSpellScript() const
{
return new spell_pri_mana_burn_SpellScript;
}
};
class spell_pri_pain_and_suffering_proc : public SpellScriptLoader
{
public:
@@ -114,6 +147,7 @@ class spell_pri_penance : public SpellScriptLoader
void AddSC_priest_spell_scripts()
{
new spell_pri_mana_burn;
new spell_pri_pain_and_suffering_proc;
new spell_pri_penance;
}