fix(Scripts/Spells): Deep Freeze Immunity State proc (#26168)

Co-authored-by: Ovahlord <dreadkiller@gmx.de>
This commit is contained in:
sogladev
2026-06-14 23:06:34 +02:00
committed by GitHub
parent df82d1be97
commit 04f35f7923
2 changed files with 24 additions and 0 deletions
@@ -0,0 +1,4 @@
--
-- Fix Deep Freeze: only proc trigger spell 71757 on permanently stun-immune creatures
DELETE FROM `spell_script_names` WHERE `spell_id`=71761;
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (71761, 'spell_mage_deep_freeze_immunity_state');
+20
View File
@@ -1588,6 +1588,25 @@ class spell_mage_missile_barrage_proc : public AuraScript
}
};
// 71761 - Deep Freeze Immunity State
class spell_mage_deep_freeze_immunity_state : public AuraScript
{
PrepareAuraScript(spell_mage_deep_freeze_immunity_state);
bool CheckEffectProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
{
if (!eventInfo.GetProcTarget() || !eventInfo.GetProcTarget()->IsCreature())
return false;
return eventInfo.GetProcTarget()->ToCreature()->HasMechanicTemplateImmunity(1ULL << MECHANIC_STUN);
}
void Register() override
{
DoCheckEffectProc += AuraCheckEffectProcFn(spell_mage_deep_freeze_immunity_state::CheckEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
void AddSC_mage_spell_scripts()
{
RegisterSpellScript(spell_mage_arcane_blast);
@@ -1632,4 +1651,5 @@ void AddSC_mage_spell_scripts()
RegisterSpellScript(spell_mage_summon_water_elemental);
RegisterSpellScript(spell_mage_fingers_of_frost);
RegisterSpellScript(spell_mage_magic_absorption);
RegisterSpellScript(spell_mage_deep_freeze_immunity_state);
}