fix(Scripts/BlackTemple): Fix najentus enrage not reseting (#19074)

This commit is contained in:
Andrew
2024-06-16 05:32:04 -03:00
committed by GitHub
parent 03031d3616
commit 4e385304c0
@@ -43,13 +43,20 @@ enum Spells
enum Events enum Events
{ {
EVENT_TALK_CHECK = 1 EVENT_TALK_CHECK = 1,
EVENT_ENRAGE = 2
}; };
struct boss_najentus : public BossAI struct boss_najentus : public BossAI
{ {
boss_najentus(Creature* creature) : BossAI(creature, DATA_HIGH_WARLORD_NAJENTUS), _canTalk(true) { } boss_najentus(Creature* creature) : BossAI(creature, DATA_HIGH_WARLORD_NAJENTUS), _canTalk(true) { }
void Reset() override
{
_Reset();
me->m_Events.CancelEventGroup(EVENT_ENRAGE);
}
void JustEngagedWith(Unit* who) override void JustEngagedWith(Unit* who) override
{ {
_canTalk = true; _canTalk = true;
@@ -60,7 +67,7 @@ struct boss_najentus : public BossAI
me->m_Events.AddEventAtOffset([this] { me->m_Events.AddEventAtOffset([this] {
Talk(SAY_ENRAGE); Talk(SAY_ENRAGE);
DoCastSelf(SPELL_BERSERK, true); DoCastSelf(SPELL_BERSERK, true);
}, 8min); }, 8min, EVENT_ENRAGE);
ScheduleTimedEvent(25s, 100s, [&] ScheduleTimedEvent(25s, 100s, [&]
{ {