fix(Scripts/RuinsOfAhnQiraj): Buru full speed and gathering speed (#12796)

* fix(Core/RuinsOfAhnQiraj): Buru full speed and gathering speed

* cancel event before scheduling it again
This commit is contained in:
Angelo Venturini
2022-08-19 20:22:46 -03:00
committed by GitHub
parent e2326d2a47
commit fc1657c910

View File

@@ -45,9 +45,8 @@ enum Events
{
EVENT_DISMEMBER = 1,
EVENT_GATHERING_SPEED = 2,
EVENT_FULL_SPEED = 3,
EVENT_CREEPING_PLAGUE = 4,
EVENT_RESPAWN_EGG = 5,
EVENT_CREEPING_PLAGUE = 3,
EVENT_RESPAWN_EGG = 4,
};
enum Phases
@@ -81,13 +80,13 @@ struct boss_buru : public BossAI
void EnterCombat(Unit* who) override
{
BossAI::EnterCombat(who);
me->AddThreat(who, 1000000.f);
Talk(EMOTE_TARGET, who);
DoCastSelf(SPELL_THORNS);
ManipulateEggs(true);
me->RemoveAurasDueToSpell(SPELL_FULL_SPEED);
events.ScheduleEvent(EVENT_DISMEMBER, 5s);
events.ScheduleEvent(EVENT_GATHERING_SPEED, 9s);
events.ScheduleEvent(EVENT_FULL_SPEED, 60s);
events.ScheduleEvent(EVENT_GATHERING_SPEED, 2s);
_phase = PHASE_EGG;
}
@@ -114,10 +113,9 @@ struct boss_buru : public BossAI
if (_phase != PHASE_EGG)
return;
me->RemoveAurasDueToSpell(SPELL_FULL_SPEED);
me->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED);
events.ScheduleEvent(EVENT_GATHERING_SPEED, 9s);
events.ScheduleEvent(EVENT_FULL_SPEED, 60s);
events.CancelEvent(EVENT_GATHERING_SPEED);
events.ScheduleEvent(EVENT_GATHERING_SPEED, 2s);
if (Unit* victim = SelectTarget(SelectTargetMethod::Random, 0, 0.f, true))
{
DoResetThreat();
@@ -145,6 +143,7 @@ struct boss_buru : public BossAI
DoCastSelf(SPELL_FULL_SPEED, true);
ManipulateEggs(false);
me->RemoveAurasDueToSpell(SPELL_THORNS);
me->RemoveAurasDueToSpell(SPELL_GATHERING_SPEED);
events.Reset();
_phase = PHASE_TRANSFORM;
DoResetThreat();
@@ -172,9 +171,6 @@ struct boss_buru : public BossAI
DoCastSelf(SPELL_GATHERING_SPEED);
events.ScheduleEvent(EVENT_GATHERING_SPEED, 9s);
break;
case EVENT_FULL_SPEED:
DoCastSelf(SPELL_FULL_SPEED);
break;
case EVENT_CREEPING_PLAGUE:
DoCastAOE(SPELL_CREEPING_PLAGUE);
events.ScheduleEvent(EVENT_CREEPING_PLAGUE, 6s);