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)
|
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.SetGroup(GROUP_BEAM_PHASE);
|
||||||
task.Repeat(3s);
|
task.Repeat(3s);
|
||||||
@@ -284,21 +288,18 @@ struct boss_eye_of_cthun : public BossAI
|
|||||||
|
|
||||||
scheduler.Schedule(1s, [this](TaskContext /*task*/)
|
scheduler.Schedule(1s, [this](TaskContext /*task*/)
|
||||||
{
|
{
|
||||||
//Select random target for dark beam to start on
|
//Select last target that had a beam cast on it
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 0.0f, true))
|
//Face our target
|
||||||
{
|
|
||||||
//Face our target
|
|
||||||
DarkGlareAngle = me->GetAngle(target);
|
|
||||||
DarkGlareTick = 0;
|
|
||||||
ClockWise = RAND(true, false);
|
|
||||||
|
|
||||||
//Add red coloration to C'thun
|
DarkGlareTick = 0;
|
||||||
DoCast(me, SPELL_RED_COLORATION, true);
|
ClockWise = RAND(true, false);
|
||||||
|
|
||||||
me->StopMoving();
|
//Add red coloration to C'thun
|
||||||
me->SetFacingToObject(target);
|
DoCast(me, SPELL_RED_COLORATION, true);
|
||||||
me->SetOrientation(DarkGlareAngle);
|
|
||||||
}
|
me->StopMoving();
|
||||||
|
me->SetOrientation(DarkGlareAngle);
|
||||||
|
me->SetFacingTo(DarkGlareAngle);
|
||||||
|
|
||||||
scheduler.Schedule(3s, [this](TaskContext tasker)
|
scheduler.Schedule(3s, [this](TaskContext tasker)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user