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:
parent
85e967183f
commit
d709080029
1 changed files with 12 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue