Skip to content

Commit

Permalink
Hodir: Fix evade and FlashFreeze stacking
Browse files Browse the repository at this point in the history
  • Loading branch information
insunaa committed Oct 6, 2024
1 parent e1c6dd3 commit e138372
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ struct boss_hodirAI : public BossAI
}
}

void KilledUnit(Unit* victim) override
{
BossAI::KilledUnit(victim);
if (!m_instance->GetPlayerInMap(true, false))
EnterEvadeMode();
}

void JustPreventedDeath(Unit* attacker) override
{
// Inform the faction helpers that the fight is over
Expand Down Expand Up @@ -415,14 +422,13 @@ struct FlashFreeze : public AuraScript, public SpellScript
Unit* target = aura->GetTarget();
if (!target)
return;
if (aura->GetAuraTicks() == 1 && !target->HasAura(SPELL_AURA_SAFE_AREA))
{
if (target->IsCreature() && (target->HasAura(SPELL_FLASH_FREEZE_AURA) || target->HasAura(SPELL_FLASH_FREEZE_AURA_NPC)))
return;
else
target->CastSpell(nullptr, SPELL_FLASH_FREEZE_SUMMON, TRIGGERED_INSTANT_CAST |
TRIGGERED_IGNORE_CURRENT_CASTED_SPELL | TRIGGERED_IGNORE_CASTER_AURA_STATE | TRIGGERED_IGNORE_GCD, nullptr, aura);
}
if (aura->GetAuraTicks() != 1 || target->HasAura(SPELL_AURA_SAFE_AREA) || target->HasAura(SPELL_FLASH_FREEZE_AURA))
return;
if (target->IsCreature() && target->HasAura(SPELL_FLASH_FREEZE_AURA_NPC))
return;
else
target->CastSpell(nullptr, SPELL_FLASH_FREEZE_SUMMON, TRIGGERED_INSTANT_CAST |
TRIGGERED_IGNORE_CURRENT_CASTED_SPELL | TRIGGERED_IGNORE_CASTER_AURA_STATE | TRIGGERED_IGNORE_GCD, nullptr, aura);
}
};

Expand Down

0 comments on commit e138372

Please sign in to comment.