mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Scripts/SSC): make sure Vashj faces the random people when doing Forked Lightning (#18232)
initial
This commit is contained in:
@@ -86,6 +86,7 @@ struct boss_lady_vashj : public BossAI
|
|||||||
_count = 0;
|
_count = 0;
|
||||||
_recentlySpoken = false;
|
_recentlySpoken = false;
|
||||||
_batTimer = 20s;
|
_batTimer = 20s;
|
||||||
|
_playerAngle = 0.0f;
|
||||||
BossAI::Reset();
|
BossAI::Reset();
|
||||||
|
|
||||||
ScheduleHealthCheckEvent(70, [&]{
|
ScheduleHealthCheckEvent(70, [&]{
|
||||||
@@ -180,7 +181,12 @@ struct boss_lady_vashj : public BossAI
|
|||||||
scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
scheduler.Schedule(2400ms, [this](TaskContext context)
|
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);
|
context.Repeat(2400ms, 12450ms);
|
||||||
}).Schedule(0s, [this](TaskContext context)
|
}).Schedule(0s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
@@ -258,6 +264,7 @@ struct boss_lady_vashj : public BossAI
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
float _playerAngle;
|
||||||
bool _recentlySpoken;
|
bool _recentlySpoken;
|
||||||
bool _intro;
|
bool _intro;
|
||||||
int32 _count;
|
int32 _count;
|
||||||
|
|||||||
Reference in New Issue
Block a user