fix(Karazhan/Nightbane): no longer killable during flight (#18890)

add unkillable during flight phase

_flying: takeoff/landing, moving to location
Phase 2: in the air and casting air spells
This commit is contained in:
Jelle Meeus
2024-05-12 21:06:42 +02:00
committed by GitHub
parent 85e967183f
commit d709080029

View File

@@ -109,6 +109,18 @@ struct boss_nightbane : public BossAI
me->GetMotionMaster()->MoveTakeoff(POINT_DESPAWN, -11013.246f, -1770.5212f, 166.50139f);
}
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType damageEffectType, SpellSchoolMask spellSchoolMask) override
{
if (_flying || Phase == 2)
{
if (damage >= me->GetHealth())
{
damage = me->GetHealth() - 1;
}
}
BossAI::DamageTaken(attacker, damage, damageEffectType, spellSchoolMask);
}
void JustEngagedWith(Unit* who) override
{
BossAI::JustEngagedWith(who);