fix(Scripts/Ulduar): Freya repeats Allies of Nature summon order (#26598)
This commit is contained in:
@@ -212,6 +212,13 @@ enum Misc
|
|||||||
WAYPOINT_BLUE = 18,
|
WAYPOINT_BLUE = 18,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum AlliesGroup
|
||||||
|
{
|
||||||
|
GROUP_TRIO = 0,
|
||||||
|
GROUP_CONSERVATOR = 1,
|
||||||
|
GROUP_LASHERS = 2,
|
||||||
|
};
|
||||||
|
|
||||||
struct boss_freya : public BossAI
|
struct boss_freya : public BossAI
|
||||||
{
|
{
|
||||||
boss_freya(Creature* pCreature) : BossAI(pCreature, BOSS_FREYA)
|
boss_freya(Creature* pCreature) : BossAI(pCreature, BOSS_FREYA)
|
||||||
@@ -220,9 +227,9 @@ struct boss_freya : public BossAI
|
|||||||
instance->SetBossState(BOSS_FREYA, DONE);
|
instance->SetBossState(BOSS_FREYA, DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 _waveNumber;
|
|
||||||
uint8 _trioKilled;
|
uint8 _trioKilled;
|
||||||
uint8 _spawnedAmount;
|
uint8 _spawnedAmount;
|
||||||
|
uint8 _setPermutation;
|
||||||
uint8 _lumberjacked;
|
uint8 _lumberjacked;
|
||||||
bool _respawningTrio;
|
bool _respawningTrio;
|
||||||
bool _backToNature;
|
bool _backToNature;
|
||||||
@@ -248,7 +255,7 @@ struct boss_freya : public BossAI
|
|||||||
_lumberjacked = 0;
|
_lumberjacked = 0;
|
||||||
_spawnedAmount = 0;
|
_spawnedAmount = 0;
|
||||||
_trioKilled = 0;
|
_trioKilled = 0;
|
||||||
_waveNumber = urand(1, 3);
|
_setPermutation = urand(0, 5);
|
||||||
_respawningTrio = false;
|
_respawningTrio = false;
|
||||||
_backToNature = true;
|
_backToNature = true;
|
||||||
_deforestation = 0;
|
_deforestation = 0;
|
||||||
@@ -329,26 +336,30 @@ struct boss_freya : public BossAI
|
|||||||
|
|
||||||
void SpawnWave()
|
void SpawnWave()
|
||||||
{
|
{
|
||||||
_waveNumber = _waveNumber == 1 ? 3 : _waveNumber - 1;
|
|
||||||
Talk(EMOTE_ALLIES_OF_NATURE);
|
Talk(EMOTE_ALLIES_OF_NATURE);
|
||||||
|
|
||||||
// Wave of three
|
static constexpr uint8 permTable[6][3] = {
|
||||||
if (_waveNumber == 1)
|
{GROUP_TRIO, GROUP_CONSERVATOR, GROUP_LASHERS},
|
||||||
|
{GROUP_TRIO, GROUP_LASHERS, GROUP_CONSERVATOR},
|
||||||
|
{GROUP_CONSERVATOR, GROUP_TRIO, GROUP_LASHERS},
|
||||||
|
{GROUP_CONSERVATOR, GROUP_LASHERS, GROUP_TRIO},
|
||||||
|
{GROUP_LASHERS, GROUP_TRIO, GROUP_CONSERVATOR},
|
||||||
|
{GROUP_LASHERS, GROUP_CONSERVATOR, GROUP_TRIO}
|
||||||
|
};
|
||||||
|
|
||||||
|
switch (permTable[_setPermutation][_spawnedAmount % 3])
|
||||||
{
|
{
|
||||||
|
case GROUP_TRIO:
|
||||||
Talk(SAY_SUMMON_TRIO);
|
Talk(SAY_SUMMON_TRIO);
|
||||||
me->SummonCreature(NPC_ANCIENT_WATER_SPIRIT, me->GetPositionX() + urand(5, 15), me->GetPositionY() + urand(5, 15), me->GetMapHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
me->SummonCreature(NPC_ANCIENT_WATER_SPIRIT, me->GetPositionX() + urand(5, 15), me->GetPositionY() + urand(5, 15), me->GetMapHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||||
me->SummonCreature(NPC_STORM_LASHER, me->GetPositionX() + urand(5, 15), me->GetPositionY() + urand(5, 15), me->GetMapHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
me->SummonCreature(NPC_STORM_LASHER, me->GetPositionX() + urand(5, 15), me->GetPositionY() + urand(5, 15), me->GetMapHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||||
me->SummonCreature(NPC_SNAPLASHER, me->GetPositionX() + urand(5, 15), me->GetPositionY() + urand(5, 15), me->GetMapHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
me->SummonCreature(NPC_SNAPLASHER, me->GetPositionX() + urand(5, 15), me->GetPositionY() + urand(5, 15), me->GetMapHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()));
|
||||||
}
|
break;
|
||||||
// Ancient Conservator
|
case GROUP_CONSERVATOR: // Ancient Conservator
|
||||||
else if (_waveNumber == 2)
|
|
||||||
{
|
|
||||||
Talk(SAY_SUMMON_CONSERVATOR);
|
Talk(SAY_SUMMON_CONSERVATOR);
|
||||||
me->SummonCreature(NPC_ANCIENT_CONSERVATOR, me->GetPositionX() + urand(5, 15), me->GetPositionY() + urand(5, 15), me->GetMapHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()), 0, TEMPSUMMON_CORPSE_DESPAWN);
|
me->SummonCreature(NPC_ANCIENT_CONSERVATOR, me->GetPositionX() + urand(5, 15), me->GetPositionY() + urand(5, 15), me->GetMapHeight(me->GetPositionX(), me->GetPositionY(), me->GetPositionZ()), 0, TEMPSUMMON_CORPSE_DESPAWN);
|
||||||
}
|
break;
|
||||||
// Detonating Lashers
|
case GROUP_LASHERS: // Detonating Lashers
|
||||||
else if (_waveNumber == 3)
|
|
||||||
{
|
|
||||||
Talk(SAY_SUMMON_LASHERS);
|
Talk(SAY_SUMMON_LASHERS);
|
||||||
// Spread the lashers evenly in a ring around Freya instead of
|
// Spread the lashers evenly in a ring around Freya instead of
|
||||||
// clustering them in one spot, matching retail.
|
// clustering them in one spot, matching retail.
|
||||||
@@ -360,6 +371,7 @@ struct boss_freya : public BossAI
|
|||||||
float y = me->GetPositionY() + dist * std::sin(angle);
|
float y = me->GetPositionY() + dist * std::sin(angle);
|
||||||
me->SummonCreature(NPC_DETONATING_LASHER, x, y, me->GetMapHeight(x, y, me->GetPositionZ()), 0, TEMPSUMMON_CORPSE_DESPAWN);
|
me->SummonCreature(NPC_DETONATING_LASHER, x, y, me->GetMapHeight(x, y, me->GetPositionZ()), 0, TEMPSUMMON_CORPSE_DESPAWN);
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user