mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Scripts/TempleOfAhnQiraj): Fix Cthun 3-beam focus mechanic resett… (#13479)
fix(Scripts/TempleOfAhnQiraj): Fix Cthun 3-beam focus mechanic resetting after Dark Glare
This commit is contained in:
@@ -190,7 +190,7 @@ struct boss_eye_of_cthun : public BossAI
|
|||||||
|
|
||||||
void EnterCombat(Unit* who) override
|
void EnterCombat(Unit* who) override
|
||||||
{
|
{
|
||||||
ScheduleTasks();
|
ScheduleTasks(true);
|
||||||
BossAI::EnterCombat(who);
|
BossAI::EnterCombat(who);
|
||||||
_beamTarget = who->GetGUID();
|
_beamTarget = who->GetGUID();
|
||||||
}
|
}
|
||||||
@@ -231,12 +231,12 @@ struct boss_eye_of_cthun : public BossAI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScheduleTasks()
|
void ScheduleTasks(bool onEngage = false)
|
||||||
{
|
{
|
||||||
_scheduler.
|
_scheduler.
|
||||||
Schedule(3s, [this](TaskContext task)
|
Schedule(3s, [this, onEngage](TaskContext task)
|
||||||
{
|
{
|
||||||
if (task.GetRepeatCounter() < 3)
|
if (task.GetRepeatCounter() < 3 && onEngage)
|
||||||
{
|
{
|
||||||
if (Unit* target = ObjectAccessor::GetUnit(*me, _beamTarget))
|
if (Unit* target = ObjectAccessor::GetUnit(*me, _beamTarget))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user