aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGildor <gildor55@gmail.com>2019-07-25 14:44:56 +0200
committerGiacomo Pozzoni <giacomopoz@gmail.com>2019-07-25 14:44:56 +0200
commit75a5192c31390deca490dada3bdb0e89dcafdf8d (patch)
treea6a74f91cbe58173d368b5b777dfbd2b243b0af7 /src
parent6d2cd7f6873202877b3cf3685eb14f6690b6c6fb (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_priest.cpp26
1 files changed, 26 insertions, 0 deletions
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);
}