Skip to content

Commit

Permalink
fix(Karazhan/Nightbane): no longer killable during flight (azerothcor…
Browse files Browse the repository at this point in the history
…e#18890)

add unkillable during flight phase

_flying: takeoff/landing, moving to location
Phase 2: in the air and casting air spells
  • Loading branch information
sogladev authored May 12, 2024
1 parent 85e9671 commit d709080
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/server/scripts/EasternKingdoms/Karazhan/boss_nightbane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d709080

Please sign in to comment.