From 75a5192c31390deca490dada3bdb0e89dcafdf8d Mon Sep 17 00:00:00 2001 From: Gildor Date: Thu, 25 Jul 2019 14:44:56 +0200 Subject: Spells/Priest: Fix Power Infusion, shouldn't stack with Arcane Power (Mage) (#23619) * Spells/Priest: Fix Power Infusion, shouldn't stack with Arcane Power (Mage) * delete unnecessary comments * make @Aokromes happy ;) * update group_id * Rename 9999_99_99_99_world_335.sql to 2019_07_25_00_world_335.sql --- src/server/scripts/Spells/spell_priest.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src') diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 1d871b7615d..32fc158a888 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -93,6 +93,11 @@ enum PriestMisc PRIEST_LIGHTWELL_NPC_6 = 31883 }; +enum MiscSpells +{ + SPELL_MAGE_ARCANE_POWER = 12042 +}; + class PowerCheck { public: @@ -1544,6 +1549,26 @@ class spell_pri_t10_heal_2p_bonus : public SpellScriptLoader } }; +// 10060 - Power Infusion +class spell_pri_power_infusion : public SpellScript +{ + PrepareSpellScript(spell_pri_power_infusion); + + SpellCastResult CheckCast() + { + if (Unit* target = GetExplTargetUnit()) + if (target->HasAura(SPELL_MAGE_ARCANE_POWER)) + return SPELL_FAILED_AURA_BOUNCED; + + return SPELL_CAST_OK; + } + + void Register() override + { + OnCheckCast += SpellCheckCastFn(spell_pri_power_infusion::CheckCast); + } +}; + void AddSC_priest_spell_scripts() { new spell_pri_aq_3p_bonus(); @@ -1576,4 +1601,5 @@ void AddSC_priest_spell_scripts() new spell_pri_t3_4p_bonus(); new spell_pri_t5_heal_2p_bonus(); new spell_pri_t10_heal_2p_bonus(); + RegisterSpellScript(spell_pri_power_infusion); } -- cgit v1.2.3