From e1aa26f92d0e54c98b781e82f5050634d53df286 Mon Sep 17 00:00:00 2001 From: Dan <83884799+elthehablo@users.noreply.github.com> Date: Sat, 11 Nov 2023 23:20:26 +0100 Subject: [PATCH] fix(Scripts/SSC): make sure adds properly respawn and DoAction only fires on Tidalvess alive (#17680) initial commit --- .../only-trigger-on-alive.sql | 4 ++++ .../boss_fathomlord_karathress.cpp | 20 ++++++------------- 2 files changed, 10 insertions(+), 14 deletions(-) create mode 100644 data/sql/updates/pending_db_world/only-trigger-on-alive.sql diff --git a/data/sql/updates/pending_db_world/only-trigger-on-alive.sql b/data/sql/updates/pending_db_world/only-trigger-on-alive.sql new file mode 100644 index 000000000..f1573b182 --- /dev/null +++ b/data/sql/updates/pending_db_world/only-trigger-on-alive.sql @@ -0,0 +1,4 @@ +-- +UPDATE `smart_scripts` SET `target_param4` = 0 WHERE `id` = 1 AND `entryorguid` = 22091 AND `source_type` = 0; +UPDATE `smart_scripts` SET `target_param4` = 0 WHERE `id` = 0 AND `entryorguid` = 22486 AND `source_type` = 0; +UPDATE `smart_scripts` SET `target_param4` = 0 WHERE `id` = 0 AND `entryorguid` = 22487 AND `source_type` = 0; diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index c07efaede..cd96bb672 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -120,20 +120,6 @@ struct boss_fathomlord_karathress : public BossAI } } - void SummonedCreatureDies(Creature* summon, Unit*) override - { - if (summon->GetEntry() == NPC_FATHOM_GUARD_TIDALVESS) - Talk(SAY_GAIN_ABILITY1); - if (summon->GetEntry() == NPC_FATHOM_GUARD_SHARKKIS) - Talk(SAY_GAIN_ABILITY2); - if (summon->GetEntry() == NPC_FATHOM_GUARD_CARIBDIS) - Talk(SAY_GAIN_ABILITY3); - scheduler.Schedule(1s, [this, summon](TaskContext) - { - summons.Despawn(summon); - }); - } - void KilledUnit(Unit* /*victim*/) override { if (!_recentlySpoken) @@ -269,6 +255,8 @@ struct boss_fathomguard_sharkkis : public ScriptedAI if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) { me->CastSpell(karathress, SPELL_POWER_OF_SHARKKIS, true); + karathress->AI()->Talk(SAY_GAIN_ABILITY2); + me->DespawnOrUnsummon(1000); } } @@ -444,6 +432,8 @@ struct boss_fathomguard_tidalvess : public ScriptedAI if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) { me->CastSpell(karathress, SPELL_POWER_OF_TIDALVESS, true); + karathress->AI()->Talk(SAY_GAIN_ABILITY1); + me->DespawnOrUnsummon(1000); } } @@ -526,6 +516,8 @@ struct boss_fathomguard_caribdis : public ScriptedAI if (Creature* karathress = _instance->GetCreature(DATA_FATHOM_LORD_KARATHRESS)) { me->CastSpell(karathress, SPELL_POWER_OF_CARIBDIS, true); + karathress->AI()->Talk(SAY_GAIN_ABILITY3); + me->DespawnOrUnsummon(1000); } }