mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-07-11 03:13:10 +00:00
fix(Scripts/Spells): Deep Freeze Immunity State proc (#26168)
Co-authored-by: Ovahlord <dreadkiller@gmx.de>
This commit is contained in:
@@ -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');
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user