Scripts/Spells: Added proc requirements to a few auras that have SPELL_ATTR3_CAN_PROC_FROM_PROCS attribute

This commit is contained in:
Shauren
2023-05-02 17:19:51 +02:00
parent a7f917c13d
commit 9740219850
3 changed files with 48 additions and 0 deletions
@@ -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');
@@ -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);
}
+17
View File
@@ -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);
}