Skip to content

Commit

Permalink
fix(Scripts/SSC): make sure Vashj faces the random people when doing …
Browse files Browse the repository at this point in the history
…Forked Lightning (azerothcore#18232)

initial
  • Loading branch information
elthehablo authored Jan 30, 2024
1 parent f1c4622 commit ba01bec
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ struct boss_lady_vashj : public BossAI
_count = 0;
_recentlySpoken = false;
_batTimer = 20s;
_playerAngle = 0.0f;
BossAI::Reset();

ScheduleHealthCheckEvent(70, [&]{
Expand Down Expand Up @@ -180,7 +181,12 @@ struct boss_lady_vashj : public BossAI
scheduler.CancelAll();
scheduler.Schedule(2400ms, [this](TaskContext context)
{
DoCastRandomTarget(SPELL_FORKED_LIGHTNING);
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
{
_playerAngle = me->GetAngle(target);
me->SetOrientation(_playerAngle);
DoCast(target, SPELL_FORKED_LIGHTNING);
}
context.Repeat(2400ms, 12450ms);
}).Schedule(0s, [this](TaskContext context)
{
Expand Down Expand Up @@ -258,6 +264,7 @@ struct boss_lady_vashj : public BossAI
}

private:
float _playerAngle;
bool _recentlySpoken;
bool _intro;
int32 _count;
Expand Down

0 comments on commit ba01bec

Please sign in to comment.