diff options
author | Shauren <shauren.trinity@gmail.com> | 2023-05-02 17:19:51 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2023-05-02 17:19:51 +0200 |
commit | 9740219850d14852a018a023c7db57b8752f8f5c (patch) | |
tree | 5d3b8b27c8f20f55af9e8bd029d95a8148f466bb | |
parent | a7f917c13dd83fc9ddc2f9a2c4bf01dfae7b40a7 (diff) |
Scripts/Spells: Added proc requirements to a few auras that have SPELL_ATTR3_CAN_PROC_FROM_PROCS attribute
-rw-r--r-- | sql/updates/world/master/2023_05_02_01_world.sql | 9 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_azerite.cpp | 22 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 17 |
3 files changed, 48 insertions, 0 deletions
diff --git a/sql/updates/world/master/2023_05_02_01_world.sql b/sql/updates/world/master/2023_05_02_01_world.sql new file mode 100644 index 00000000000..065bae1b5ac --- /dev/null +++ b/sql/updates/world/master/2023_05_02_01_world.sql @@ -0,0 +1,9 @@ +DELETE FROM `spell_proc` WHERE `SpellId` IN (302385,304086); +INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES +(302385,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x4,0x2,0x0,0x0,0x0,0,0,0,0), -- Resurrect Health +(304086,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x7,0x2,0x0,0x0,0x0,0,0,0,0); -- Conflict (Azerite Essence) + +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_item_conflict_wearer_on_stun_proc','spell_item_zanjir_scaleguard_greatcloak'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(302385,'spell_item_zanjir_scaleguard_greatcloak'), +(304086,'spell_item_conflict_wearer_on_stun_proc'); diff --git a/src/server/scripts/Spells/spell_azerite.cpp b/src/server/scripts/Spells/spell_azerite.cpp index add0174d0b5..ffcbe6f1678 100644 --- a/src/server/scripts/Spells/spell_azerite.cpp +++ b/src/server/scripts/Spells/spell_azerite.cpp @@ -513,6 +513,27 @@ class spell_item_hour_of_reaping : public AuraScript } }; +// 304086 - Azerite Fortification +class spell_item_conflict_wearer_on_stun_proc : public AuraScript +{ + PrepareAuraScript(spell_item_conflict_wearer_on_stun_proc); + + bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) + { + Spell const* procSpell = eventInfo.GetProcSpell(); + if (!procSpell) + return false; + + return procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_STUN) + || procSpell->GetSpellInfo()->HasAura(SPELL_AURA_MOD_STUN_DISABLE_GRAVITY); + } + + void Register() override + { + DoCheckEffectProc += AuraCheckEffectProcFn(spell_item_conflict_wearer_on_stun_proc::CheckProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } +}; + // 277253 - Heart of Azeroth class spell_item_heart_of_azeroth : public AuraScript { @@ -566,6 +587,7 @@ void AddSC_azerite_item_spell_scripts() RegisterSpellScript(spell_item_echoing_blades); RegisterSpellScript(spell_item_echoing_blades_damage); RegisterSpellScript(spell_item_hour_of_reaping); + RegisterSpellScript(spell_item_conflict_wearer_on_stun_proc); RegisterSpellScript(spell_item_heart_of_azeroth); } diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 1dca1784067..53c445a3b28 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -4748,6 +4748,22 @@ class spell_item_grips_of_forsaken_sanity : public AuraScript } }; +// 302385 - Resurrect Health +class spell_item_zanjir_scaleguard_greatcloak : public AuraScript +{ + PrepareAuraScript(spell_item_zanjir_scaleguard_greatcloak); + + bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) + { + return eventInfo.GetSpellInfo() && eventInfo.GetSpellInfo()->HasEffect(SPELL_EFFECT_RESURRECT); + } + + void Register() override + { + DoCheckEffectProc += AuraCheckEffectProcFn(spell_item_zanjir_scaleguard_greatcloak::CheckProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } +}; + void AddSC_item_spell_scripts() { // 23074 Arcanite Dragonling @@ -4897,4 +4913,5 @@ void AddSC_item_spell_scripts() RegisterSpellScript(spell_item_seeping_scourgewing); RegisterSpellScript(spell_item_seeping_scourgewing_aoe_check); RegisterSpellScript(spell_item_grips_of_forsaken_sanity); + RegisterSpellScript(spell_item_zanjir_scaleguard_greatcloak); } |