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)
|
if (_noQuillTimes++ > 0)
|
||||||
{
|
{
|
||||||
me->SetOrientation(alarPoints[_platform].GetOrientation());
|
me->SetOrientation(alarPoints[_platform].GetOrientation());
|
||||||
SpawnPhoenixes(1, me, false);
|
SpawnPhoenixes(1, me);
|
||||||
}
|
}
|
||||||
me->GetMotionMaster()->MovePoint(POINT_PLATFORM, alarPoints[_platform], false, true);
|
me->GetMotionMaster()->MovePoint(POINT_PLATFORM, alarPoints[_platform], false, true);
|
||||||
_platform = (_platform+1)%4;
|
_platform = (_platform+1)%4;
|
||||||
@@ -247,21 +247,14 @@ struct boss_alar : public BossAI
|
|||||||
ScheduleMainSpellAttack(0s);
|
ScheduleMainSpellAttack(0s);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpawnPhoenixes(uint8 count, Unit* targetToSpawnAt, bool onPosition)
|
void SpawnPhoenixes(uint8 count, Unit* targetToSpawnAt)
|
||||||
{
|
{
|
||||||
if (targetToSpawnAt)
|
if (targetToSpawnAt)
|
||||||
{
|
{
|
||||||
|
Position spawnPosition = DeterminePhoenixPosition(targetToSpawnAt->GetPosition());
|
||||||
for (uint8 i = 0; i < count; ++i)
|
for (uint8 i = 0; i < count; ++i)
|
||||||
{
|
{
|
||||||
if (onPosition)
|
me->SummonCreature(NPC_EMBER_OF_ALAR, spawnPosition, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
|
||||||
{
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -273,7 +266,7 @@ struct boss_alar : public BossAI
|
|||||||
{
|
{
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 10.0f, true))
|
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 10.0f, true))
|
||||||
{
|
{
|
||||||
SpawnPhoenixes(2, target, true);
|
SpawnPhoenixes(2, target);
|
||||||
}
|
}
|
||||||
}).Schedule(6s, [this](TaskContext)
|
}).Schedule(6s, [this](TaskContext)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user