mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
fix(Scripts/TempleOfAhnQiraj): make C'thun Dark Glare face location of last eyebeam before cast, instead of random target (#16785)
* initial * fix oopsie * whitespace
This commit is contained in:
@@ -242,7 +242,11 @@ struct boss_eye_of_cthun : public BossAI
|
||||
{
|
||||
scheduler.Schedule(5s, [this](TaskContext task)
|
||||
{
|
||||
DoCastRandomTarget(SPELL_GREEN_BEAM);
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
DoCast(target, SPELL_GREEN_BEAM);
|
||||
DarkGlareAngle = me->GetAngle(target); //keep as the location dark glare will be at
|
||||
}
|
||||
|
||||
task.SetGroup(GROUP_BEAM_PHASE);
|
||||
task.Repeat(3s);
|
||||
@@ -284,21 +288,18 @@ struct boss_eye_of_cthun : public BossAI
|
||||
|
||||
scheduler.Schedule(1s, [this](TaskContext /*task*/)
|
||||
{
|
||||
//Select random target for dark beam to start on
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
||||
{
|
||||
//Face our target
|
||||
DarkGlareAngle = me->GetAngle(target);
|
||||
DarkGlareTick = 0;
|
||||
ClockWise = RAND(true, false);
|
||||
//Select last target that had a beam cast on it
|
||||
//Face our target
|
||||
|
||||
//Add red coloration to C'thun
|
||||
DoCast(me, SPELL_RED_COLORATION, true);
|
||||
DarkGlareTick = 0;
|
||||
ClockWise = RAND(true, false);
|
||||
|
||||
me->StopMoving();
|
||||
me->SetFacingToObject(target);
|
||||
me->SetOrientation(DarkGlareAngle);
|
||||
}
|
||||
//Add red coloration to C'thun
|
||||
DoCast(me, SPELL_RED_COLORATION, true);
|
||||
|
||||
me->StopMoving();
|
||||
me->SetOrientation(DarkGlareAngle);
|
||||
me->SetFacingTo(DarkGlareAngle);
|
||||
|
||||
scheduler.Schedule(3s, [this](TaskContext tasker)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user