Core/Spells: Fix priest talent "Improved Power Word: Shield"

This commit is contained in:
Vincent-Michael
2013-07-24 02:32:52 +02:00
parent 18a3ccd3d1
commit b2fb740b54
2 changed files with 44 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
DELETE FROM `spell_script_names` WHERE `spell_id`=-14748;
INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
(-14748,'spell_pri_improved_power_word_shield');
DELETE FROM `spell_ranks` WHERE `first_spell_id`=14748;
INSERT INTO `spell_ranks` (`first_spell_id`, `spell_id`, `rank`) VALUES
(14748, 14748, 1),
(14748, 14768, 2);

View File

@@ -272,6 +272,41 @@ class spell_pri_glyph_of_prayer_of_healing : public SpellScriptLoader
}
};
class spell_pri_improved_power_word_shield : public SpellScriptLoader
{
public:
spell_pri_improved_power_word_shield() : SpellScriptLoader("spell_pri_improved_power_word_shield") { }
class spell_pri_improved_power_word_shield_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pri_improved_power_word_shield_AuraScript);
void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod)
{
if (!spellMod)
{
spellMod = new SpellModifier(GetAura());
spellMod->op = SpellModOp(aurEff->GetMiscValue());
spellMod->type = SPELLMOD_PCT;
spellMod->spellId = GetId();
spellMod->mask = GetSpellInfo()->Effects[aurEff->GetEffIndex()].SpellClassMask;
}
spellMod->value = aurEff->GetAmount();
}
void Register() OVERRIDE
{
DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_pri_improved_power_word_shield_AuraScript::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY);
}
};
AuraScript* GetAuraScript() const OVERRIDE
{
return new spell_pri_improved_power_word_shield_AuraScript();
}
};
// 37594 - Greater Heal Refund
class spell_pri_item_greater_heal_refund : public SpellScriptLoader
{
@@ -1088,6 +1123,7 @@ void AddSC_priest_spell_scripts()
new spell_pri_dispel_magic();
new spell_pri_divine_aegis();
new spell_pri_glyph_of_prayer_of_healing();
new spell_pri_improved_power_word_shield();
new spell_pri_item_greater_heal_refund();
new spell_pri_guardian_spirit();
new spell_pri_leap_of_faith_effect_trigger();