fix(Core/TempleOfAhnQiraj): Bug Trio (#12599)

This commit is contained in:
Angelo Venturini
2022-08-05 14:43:35 -03:00
committed by GitHub
parent bd7ee56abe
commit f0c881f09f

View File

@@ -137,9 +137,9 @@ public:
me->SetReactState(REACT_PASSIVE);
}
void MovementInform(uint32 type, uint32 /*id*/) override
void MovementInform(uint32 type, uint32 id) override
{
if (type != POINT_MOTION_TYPE)
if (type != POINT_MOTION_TYPE || id != POINT_CONSUME)
return;
me->GetMotionMaster()->MoveIdle();
@@ -153,6 +153,7 @@ public:
me->SetReactState(REACT_AGGRESSIVE);
if (Unit* target = me->GetVictim())
{
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveChase(target);
AttackStart(target);
}
@@ -195,7 +196,7 @@ public:
void DamageTaken(Unit* who, uint32& damage, DamageEffectType, SpellSchoolMask) override
{
if (me->HealthBelowPctDamaged(1, damage) && instance->GetData(DATA_BUG_TRIO_DEATH) < 2 && who->GetGUID() != me->GetGUID())
if (me->HealthBelowPctDamaged(1, damage) && instance->GetData(DATA_BUG_TRIO_DEATH) < 2 && who->GetGUID() != me->GetGUID() && !dying)
{
damage = 0;
if (isEating)
@@ -205,6 +206,7 @@ public:
me->SetStandState(UNIT_STAND_STATE_DEAD);
me->SetReactState(REACT_PASSIVE);
me->SetControlled(true, UNIT_STATE_ROOT);
dying = true;
DoFinalSpell();
@@ -236,7 +238,7 @@ public:
_scheduler.Schedule(4s, [this](TaskContext /*context*/)
{
if (!me->IsInEvadeMode())
if (!me->IsInEvadeMode() && instance->GetData(DATA_BUG_TRIO_DEATH) < 2)
{
DoCastSelf(SPELL_BLOODY_DEATH, true);
Talk(EMOTE_DEVOURED);