mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 19:05:42 +00:00
fix(Scripts/TheEye): ensure Ember of Al'ar always spawn in the right spot (#18511)
init
This commit is contained in:
@@ -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;
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user