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:
@@ -109,6 +109,18 @@ struct boss_nightbane : public BossAI
|
|||||||
me->GetMotionMaster()->MoveTakeoff(POINT_DESPAWN, -11013.246f, -1770.5212f, 166.50139f);
|
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
|
void JustEngagedWith(Unit* who) override
|
||||||
{
|
{
|
||||||
BossAI::JustEngagedWith(who);
|
BossAI::JustEngagedWith(who);
|
||||||
|
|||||||
Reference in New Issue
Block a user