mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 00:23:48 +00:00
fix(Scripts/RuinsOfAhnQiraj): Sand Vortexes should move (#12655)
Co-authored-by: Gultask <gultask@users.noreply.github.com>
This commit is contained in:
@@ -77,12 +77,9 @@ Position CrystalCoordinates[NUM_CRYSTALS] =
|
||||
{ -9406.73f, 1863.13f, 85.5558f, 0.0f }
|
||||
};
|
||||
|
||||
float roomRadius = 165.0f;
|
||||
uint8 const NUM_TORNADOS = 2;
|
||||
uint8 const NUM_WEAKNESS = 5;
|
||||
uint32 const spellWeakness[NUM_WEAKNESS] =
|
||||
{ SPELL_FIRE_WEAKNESS, SPELL_FROST_WEAKNESS, SPELL_NATURE_WEAKNESS, SPELL_ARCANE_WEAKNESS, SPELL_SHADOW_WEAKNESS };
|
||||
Position const RoomCenter = { -9343.041992f, 1923.278198f, 85.555984f, 0.0 };
|
||||
|
||||
struct boss_ossirian : public BossAI
|
||||
{
|
||||
@@ -142,14 +139,7 @@ struct boss_ossirian : public BossAI
|
||||
|
||||
WorldPackets::Misc::Weather weather(WEATHER_STATE_HEAVY_SANDSTORM, 1.0f);
|
||||
map->SendToPlayers(weather.Write());
|
||||
for (uint8 i = 0; i < NUM_TORNADOS; ++i)
|
||||
{
|
||||
Position Point = me->GetRandomPoint(RoomCenter, roomRadius);
|
||||
if (Creature* Tornado = me->GetMap()->SummonCreature(NPC_SAND_VORTEX, Point))
|
||||
{
|
||||
Tornado->CastSpell(Tornado, SPELL_SAND_STORM, true);
|
||||
}
|
||||
}
|
||||
|
||||
SpawnNextCrystal();
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,10 @@ public:
|
||||
case NPC_OSSIRIAN:
|
||||
_ossirianGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_SAND_VORTEX:
|
||||
_sandVortexes.push_back(creature->GetGUID());
|
||||
creature->SetVisible(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,6 +193,31 @@ public:
|
||||
_paralyzedGUID = data;
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) override
|
||||
{
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DATA_OSSIRIAN:
|
||||
{
|
||||
for (ObjectGuid const& guid : _sandVortexes)
|
||||
{
|
||||
if (Creature* sandVortex = instance->GetCreature(guid))
|
||||
{
|
||||
sandVortex->SetVisible(state == IN_PROGRESS);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
@@ -304,6 +333,7 @@ public:
|
||||
ObjectGuid _buruGUID;
|
||||
ObjectGuid _ossirianGUID;
|
||||
ObjectGuid _paralyzedGUID;
|
||||
GuidVector _sandVortexes;
|
||||
uint32 _rajaxWaveCounter;
|
||||
TaskScheduler _scheduler;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user