mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 15:40:45 +01:00
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
This commit is contained in:
14
sql/updates/world/3.3.5/2019_07_25_00_world_335.sql
Normal file
14
sql/updates/world/3.3.5/2019_07_25_00_world_335.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
--
|
||||
SET @GROUP_ID := 1123; -- Change with the proper ID if this is in use
|
||||
DELETE FROM `spell_group` WHERE `id`=@GROUP_ID AND `spell_id` IN (10060,12042);
|
||||
INSERT INTO `spell_group` (`id`,`spell_id`) VALUES
|
||||
(@GROUP_ID,10060), -- Priest - Power Infusion
|
||||
(@GROUP_ID,12042); -- Mage - Arcane Power
|
||||
|
||||
DELETE FROM `spell_group_stack_rules` WHERE `group_id`=@GROUP_ID;
|
||||
INSERT INTO `spell_group_stack_rules` (`group_id`,`stack_rule`) VALUES
|
||||
(@GROUP_ID,1);
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=10060 AND `ScriptName`='spell_pri_power_infusion';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(10060,'spell_pri_power_infusion');
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user