From 330ed952dfd254cd6ee8a75b000d08fc6b6323a4 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Sat, 23 Dec 2023 12:12:07 -0300 Subject: [PATCH] =?UTF-8?q?fix(Scripts/SerpentshrineCavern):=20Despawn=20L?= =?UTF-8?q?urker's=20pool=20and=20fix=20visua=E2=80=A6=20(#18037)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/SerpentshrineCavern): Despawn Lurker's pool and fix visual issue on death --- .../SerpentShrine/boss_lurker_below.cpp | 21 +++++++++++++++++++ .../SerpentShrine/instance_serpent_shrine.cpp | 8 ++++++- .../SerpentShrine/serpent_shrine.h | 5 ++++- 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp index 62b3e035d..4b27f312b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -79,9 +79,26 @@ struct boss_the_lurker_below : public BossAI void EnterEvadeMode(EvadeReason why) override { BossAI::EnterEvadeMode(why); + if (GameObject* pool = instance->GetGameObject(DATA_STRANGE_POOL)) + { + pool->Respawn(); + } me->DespawnOrUnsummon(2000); } + void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*type*/, SpellSchoolMask /*school*/) override + { + if (damage >= me->GetHealth()) + { + // Liquid state around his area is working awkwardly and doesn't consider him to be swimming + // Therefore he falls to the bottom of the lake when he dies, because he is "flying" in his pool + // Removing this prevents him from dropping to the bottom of the lake + // There is also a visual issue currently causing him to drop to the bottom of the lake but his body not update clientside + // So it looks as if he was floating but he has in fact dropped to the bottom of the lake, and thus becomes unlootable + me->SetDisableGravity(false); + } + } + void DoAction(int32 action) override { if (action == ACTION_START_EVENT) @@ -228,6 +245,10 @@ public: player->CastSpell(player, SPELL_LURKER_SPAWN_TRIGGER, true); if (Creature* lurker = go->SummonCreature(NPC_THE_LURKER_BELOW, 38.4567f, -417.324f, -18.916666f, 2.94960f, TEMPSUMMON_MANUAL_DESPAWN)) lurker->AI()->DoAction(ACTION_START_EVENT); + + go->DespawnOrUnsummon(); + go->SetRespawnDelay(7 * DAY); + go->SaveRespawnTime(); return true; } diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp index e0f85f0c7..2216201be 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/instance_serpent_shrine.cpp @@ -40,6 +40,12 @@ ObjectData const creatureData[] = { 0, 0 } }; +ObjectData const gameObjectData[] = +{ + { GO_STRANGE_POOL, DATA_STRANGE_POOL }, + { 0, 0 } +}; + MinionData const minionData[] = { { NPC_FATHOM_GUARD_SHARKKIS, DATA_FATHOM_LORD_KARATHRESS }, @@ -69,7 +75,7 @@ public: SetHeaders(DataHeader); SetBossNumber(MAX_ENCOUNTERS); LoadDoorData(doorData); - LoadObjectData(creatureData, nullptr); + LoadObjectData(creatureData, gameObjectData); LoadMinionData(minionData); LoadBossBoundaries(boundaries); diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h index ec3a318d4..e9cb570c6 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/serpent_shrine.h @@ -45,6 +45,7 @@ enum DataTypes DATA_ALIVE_KEEPERS = 22, DATA_BRIDGE_ACTIVATED = 23, DATA_ACTIVATE_SHIELD = 24, + DATA_STRANGE_POOL = 25 }; enum SSNPCs @@ -77,7 +78,9 @@ enum SSNPCs GO_SHIELD_GENERATOR1 = 185051, GO_SHIELD_GENERATOR2 = 185052, GO_SHIELD_GENERATOR3 = 185053, - GO_SHIELD_GENERATOR4 = 185054 + GO_SHIELD_GENERATOR4 = 185054, + + GO_STRANGE_POOL = 184956 }; enum SSSpells