From 60e70ac81f055f25f5fdd5e20e4cf0a4daebf8a5 Mon Sep 17 00:00:00 2001 From: Eddy Vega <61223313+Si1ker@users.noreply.github.com> Date: Mon, 25 Jul 2022 17:32:53 -0600 Subject: [PATCH] fix(Scripts/RuinsOfAhnQiraj): Improve Ossirian (#12138) --- .../rev_1655863908221203900.sql | 6 ++ .../RuinsOfAhnQiraj/boss_ossirian.cpp | 79 +++++++++---------- 2 files changed, 44 insertions(+), 41 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1655863908221203900.sql diff --git a/data/sql/updates/pending_db_world/rev_1655863908221203900.sql b/data/sql/updates/pending_db_world/rev_1655863908221203900.sql new file mode 100644 index 000000000..ec73606c1 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1655863908221203900.sql @@ -0,0 +1,6 @@ + +-- Ossirian immune to Taunt +UPDATE `creature_template` SET `flags_extra`=`flags_extra`|256 WHERE `entry`=15339; + +-- Sand Vortex UNIT_FLAG_NOT_SELECTABLE +UPDATE `creature_template` SET `unit_flags`=`unit_flags`|33554432 WHERE `entry`=15428; diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp index af994f8b8..ceae706d1 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_ossirian.cpp @@ -25,41 +25,36 @@ enum Texts { - SAY_SUPREME = 0, - SAY_INTRO = 1, - SAY_AGGRO = 2, - SAY_SLAY = 3, - SAY_DEATH = 4 + SAY_SUPREME = 0, + SAY_INTRO = 1, + SAY_AGGRO = 2, + SAY_SLAY = 3, + SAY_DEATH = 4 }; enum Spells { - SPELL_SILENCE = 25195, - SPELL_CYCLONE = 25189, - SPELL_STOMP = 25188, - SPELL_SUPREME = 25176, - SPELL_SUMMON = 20477, - SPELL_SAND_STORM = 25160, - SPELL_SUMMON_CRYSTAL = 25192 + SPELL_CURSE_OF_TONGUES = 25195, + SPELL_ENVELOPING_WINDS = 25189, + SPELL_WAR_STOMP = 25188, + SPELL_STRENGHT_OF_OSSIRIAN = 25176, + SPELL_SAND_STORM = 25160, + SPELL_SUMMON_CRYSTAL = 25192 }; enum Actions { - ACTION_TRIGGER_WEAKNESS = 1 + ACTION_TRIGGER_WEAKNESS = 1 }; enum Events { - EVENT_SILENCE = 1, - EVENT_CYCLONE = 2, - EVENT_STOMP = 3 + EVENT_SILENCE = 1, + EVENT_CYCLONE = 2, + EVENT_STOMP = 3 }; -uint8 const NUM_CRYSTALS = 9; - -// You spin me right round, baby -// right round like a record, baby -// right round round round +uint8 const NUM_CRYSTALS = 9; Position CrystalCoordinates[NUM_CRYSTALS] = { { -9394.230469f, 1951.808594f, 85.97733f, 0.0f }, @@ -73,9 +68,9 @@ Position CrystalCoordinates[NUM_CRYSTALS] = { -9406.73f, 1863.13f, 85.5558f, 0.0f } }; -float RoomRadius = 165.0f; -uint8 const NUM_TORNADOS = 5; /// @todo This number is completly random! -uint8 const NUM_WEAKNESS = 5; +float RoomRadius = 165.0f; +uint8 const NUM_TORNADOS = 2; +uint8 const NUM_WEAKNESS = 5; uint32 const SpellWeakness[NUM_WEAKNESS] = { 25177, 25178, 25180, 25181, 25183 }; Position const RoomCenter = { -9343.041992f, 1923.278198f, 85.555984f, 0.0 }; @@ -110,7 +105,7 @@ public: { if (spell->Id == SpellWeakness[i]) { - me->RemoveAurasDueToSpell(SPELL_SUPREME); + me->RemoveAurasDueToSpell(SPELL_STRENGHT_OF_OSSIRIAN); ((TempSummon*)caster)->UnSummon(); SpawnNextCrystal(); } @@ -120,9 +115,15 @@ public: void DoAction(int32 action) override { if (action == ACTION_TRIGGER_WEAKNESS) + { if (Creature* Trigger = me->GetMap()->GetCreature(TriggerGUID)) + { if (!Trigger->HasUnitState(UNIT_STATE_CASTING)) + { Trigger->CastSpell(Trigger, SpellWeakness[urand(0, 4)], false); + } + } + } } void EnterCombat(Unit* /*who*/) override @@ -132,8 +133,7 @@ public: events.ScheduleEvent(EVENT_SILENCE, 30000); events.ScheduleEvent(EVENT_CYCLONE, 20000); events.ScheduleEvent(EVENT_STOMP, 30000); - - DoCast(me, SPELL_SUPREME); + DoCastSelf(SPELL_STRENGHT_OF_OSSIRIAN); Talk(SAY_AGGRO); Map* map = me->GetMap(); @@ -142,14 +142,14 @@ public: 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(); } @@ -174,7 +174,9 @@ public: void Cleanup() { if (GameObject* Crystal = me->GetMap()->GetGameObject(CrystalGUID)) + { Crystal->Use(me); + } } void SpawnNextCrystal() @@ -215,15 +217,11 @@ public: return; events.Update(diff); - - // No kiting! - if (me->GetDistance(me->GetVictim()) > 60.00f && me->GetDistance(me->GetVictim()) < 120.00f) - DoCastVictim(SPELL_SUMMON); - bool ApplySupreme = true; - - if (me->HasAura(SPELL_SUPREME)) + if (me->HasAura(SPELL_STRENGHT_OF_OSSIRIAN)) + { ApplySupreme = false; + } else { for (uint8 i = 0; i < NUM_WEAKNESS; ++i) @@ -238,7 +236,7 @@ public: if (ApplySupreme) { - DoCast(me, SPELL_SUPREME); + DoCastSelf(SPELL_STRENGHT_OF_OSSIRIAN); Talk(SAY_SUPREME); } @@ -247,22 +245,21 @@ public: switch (eventId) { case EVENT_SILENCE: - DoCast(me, SPELL_SILENCE); + DoCastAOE(SPELL_CURSE_OF_TONGUES); events.ScheduleEvent(EVENT_SILENCE, urand(20000, 30000)); break; case EVENT_CYCLONE: - DoCastVictim(SPELL_CYCLONE); + DoCastVictim(SPELL_ENVELOPING_WINDS); events.ScheduleEvent(EVENT_CYCLONE, 20000); break; case EVENT_STOMP: - DoCast(me, SPELL_STOMP); + DoCastAOE(SPELL_WAR_STOMP); events.ScheduleEvent(EVENT_STOMP, 30000); break; default: break; } } - DoMeleeAttackIfReady(); } };