diff options
| -rw-r--r-- | sql/updates/world/master/2023_04_08_04_world.sql | 18 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 25 |
2 files changed, 39 insertions, 4 deletions
diff --git a/sql/updates/world/master/2023_04_08_04_world.sql b/sql/updates/world/master/2023_04_08_04_world.sql new file mode 100644 index 00000000000..0b626194387 --- /dev/null +++ b/sql/updates/world/master/2023_04_08_04_world.sql @@ -0,0 +1,18 @@ +DELETE FROM `spell_proc` WHERE `SpellId` IN (226990,227098,227327,206478,228141,228400,228445,230080,230140,230236,230257,231862); +INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES +(226990,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x403,0x0,0x0,0,0,0,0), -- Item - Proc Agility +(227098,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x3,0x2,0x403,0x0,0x0,0,0,0,0), -- Inspiration +(227327,0x00,107,0x00100000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x4,0x1,0x0,0x0,0x0,0,0,0,0), -- Gluttony +(206478,0x00,107,0x00100000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x4,0x1,0x0,0x0,0x0,0,0,0,0), -- Demonic Appetite +(228141,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x403,0x0,0x0,0,0,0,0), -- Marfisi's Giant Censer +(228400,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x2,0x2,0x403,0x0,0x0,0,0,0,0), -- Mark of the Ancient Priestess +(228445,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x403,0x0,0x0,0,0,0,0), -- March of the Legion +(230080,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x403,0x0,0x0,0,0,0,0), -- Intangible Presence +(230140,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x2,0x2,0x403,0x0,0x0,0,0,0,0), -- Loose Mana +(230236,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x403,0x0,0x0,0,0,0,0), -- Volatile Energy +(230257,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x1,0x2,0x403,0x0,0x0,0,0,0,0), -- Flame Wreath +(231862,0x00,0,0x00000000,0x00000000,0x00000000,0x00000000,0x0,0x0,0x4,0x2,0x1000,0x0,0x0,0,0,0,0); -- Bleak Eruption + +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_item_set_march_of_the_legion'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(228445,'spell_item_set_march_of_the_legion'); diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 3e42cfce83c..21f5c58fb62 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -4489,7 +4489,7 @@ enum AmalgamsSeventhSpine SPELL_FRAGILE_ECHO_ENERGIZE = 215270, }; -// 215266 +// 215266 - Fragile Echoes class spell_item_amalgams_seventh_spine : public AuraScript { PrepareAuraScript(spell_item_amalgams_seventh_spine); @@ -4558,7 +4558,7 @@ class spell_item_amalgams_seventh_spine : public AuraScript } }; -// 215267 +// 215267 - Fragile Echo class spell_item_amalgams_seventh_spine_mana_restore : public AuraScript { PrepareAuraScript(spell_item_amalgams_seventh_spine_mana_restore); @@ -4587,6 +4587,22 @@ class spell_item_amalgams_seventh_spine_mana_restore : public AuraScript } }; +// 228445 - March of the Legion +class spell_item_set_march_of_the_legion : public AuraScript +{ + PrepareAuraScript(spell_item_set_march_of_the_legion); + + bool IsDemon(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo) + { + return eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->GetCreatureType() == CREATURE_TYPE_DEMON; + } + + void Register() override + { + DoCheckEffectProc += AuraCheckEffectProcFn(spell_item_set_march_of_the_legion::IsDemon, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } +}; + // 277253 - Heart of Azeroth class spell_item_heart_of_azeroth : public AuraScript { @@ -4602,7 +4618,7 @@ class spell_item_heart_of_azeroth : public AuraScript SetState(false); } - void SetState(bool equipped) + void SetState(bool equipped) const { if (Player* target = GetTarget()->ToPlayer()) { @@ -4614,7 +4630,7 @@ class spell_item_heart_of_azeroth : public AuraScript } } - void Register() + void Register() override { OnEffectApply += AuraEffectApplyFn(spell_item_heart_of_azeroth::SetEquippedFlag, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); OnEffectRemove += AuraEffectRemoveFn(spell_item_heart_of_azeroth::ClearEquippedFlag, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); @@ -4763,6 +4779,7 @@ void AddSC_item_spell_scripts() RegisterSpellScript(spell_item_amalgams_seventh_spine); RegisterSpellScript(spell_item_amalgams_seventh_spine_mana_restore); + RegisterSpellScript(spell_item_set_march_of_the_legion); RegisterSpellScript(spell_item_heart_of_azeroth); } |
