@@ -180,34 +180,37 @@ struct boss_alar : public BossAI
|
|||||||
|
|
||||||
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override
|
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damagetype*/, SpellSchoolMask /*damageSchoolMask*/) override
|
||||||
{
|
{
|
||||||
if (damage >= me->GetHealth() && _platform < POINT_MIDDLE && !_hasPretendedToDie)
|
if (damage >= me->GetHealth() && _platform < POINT_MIDDLE)
|
||||||
{
|
{
|
||||||
_hasPretendedToDie = true;
|
|
||||||
damage = 0;
|
damage = 0;
|
||||||
DoCastSelf(SPELL_EMBER_BLAST, true);
|
if (!_hasPretendedToDie)
|
||||||
PretendToDie(me);
|
|
||||||
_transitionScheduler.Schedule(1s, [this](TaskContext)
|
|
||||||
{
|
{
|
||||||
me->SetVisible(false);
|
_hasPretendedToDie = true;
|
||||||
}).Schedule(8s, [this](TaskContext)
|
DoCastSelf(SPELL_EMBER_BLAST, true);
|
||||||
{
|
PretendToDie(me);
|
||||||
me->SetPosition(alarPoints[POINT_MIDDLE]);
|
_transitionScheduler.Schedule(1s, [this](TaskContext)
|
||||||
}).Schedule(12s, [this](TaskContext)
|
{
|
||||||
{
|
me->SetVisible(false);
|
||||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
}).Schedule(8s, [this](TaskContext)
|
||||||
me->SetVisible(true);
|
{
|
||||||
DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true);
|
me->SetPosition(alarPoints[POINT_MIDDLE]);
|
||||||
DoCastSelf(SPELL_REBIRTH_PHASE2);
|
}).Schedule(12s, [this](TaskContext)
|
||||||
}).Schedule(16001ms, [this](TaskContext)
|
{
|
||||||
{
|
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
me->SetHealth(me->GetMaxHealth());
|
me->SetVisible(true);
|
||||||
me->SetReactState(REACT_AGGRESSIVE);
|
DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true);
|
||||||
_noMelee = false;
|
DoCastSelf(SPELL_REBIRTH_PHASE2);
|
||||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
}).Schedule(16001ms, [this](TaskContext)
|
||||||
_platform = POINT_MIDDLE;
|
{
|
||||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
me->SetHealth(me->GetMaxHealth());
|
||||||
ScheduleAbilities();
|
me->SetReactState(REACT_AGGRESSIVE);
|
||||||
});
|
_noMelee = false;
|
||||||
|
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||||
|
_platform = POINT_MIDDLE;
|
||||||
|
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||||
|
ScheduleAbilities();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user