Skip to content

Commit

Permalink
fix(Scripts/TheEye): ensure Ember of Al'ar always spawn in the right …
Browse files Browse the repository at this point in the history
…spot (#18511)

init
  • Loading branch information
elthehablo committed Mar 9, 2024
1 parent 81d7813 commit db7475f
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct boss_alar : public BossAI
if (_noQuillTimes++ > 0)
{
me->SetOrientation(alarPoints[_platform].GetOrientation());
SpawnPhoenixes(1, me, false);
SpawnPhoenixes(1, me);
}
me->GetMotionMaster()->MovePoint(POINT_PLATFORM, alarPoints[_platform], false, true);
_platform = (_platform+1)%4;
Expand Down Expand Up @@ -247,21 +247,14 @@ struct boss_alar : public BossAI
ScheduleMainSpellAttack(0s);
}

void SpawnPhoenixes(uint8 count, Unit* targetToSpawnAt, bool onPosition)
void SpawnPhoenixes(uint8 count, Unit* targetToSpawnAt)
{
if (targetToSpawnAt)
{
Position spawnPosition = DeterminePhoenixPosition(targetToSpawnAt->GetPosition());
for (uint8 i = 0; i < count; ++i)
{
if (onPosition)
{
Position spawnPosition = DeterminePhoenixPosition(targetToSpawnAt->GetPosition());
me->SummonCreature(NPC_EMBER_OF_ALAR, spawnPosition, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
}
else
{
me->SummonCreature(NPC_EMBER_OF_ALAR, *targetToSpawnAt, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
}
me->SummonCreature(NPC_EMBER_OF_ALAR, spawnPosition, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
}
}
}
Expand All @@ -273,7 +266,7 @@ struct boss_alar : public BossAI
{
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 10.0f, true))
{
SpawnPhoenixes(2, target, true);
SpawnPhoenixes(2, target);
}
}).Schedule(6s, [this](TaskContext)
{
Expand Down

0 comments on commit db7475f

Please sign in to comment.