From 9df2c485fca14aa787ee6e536664b7a30f4304b5 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Thu, 14 Dec 2023 16:42:20 -0300 Subject: [PATCH] =?UTF-8?q?fix(Scripts/SerpentshrineCavern):=20Fix=20Lurke?= =?UTF-8?q?r=20spawn=20coords=20and=20spout=20s=E2=80=A6=20(#18014)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(Scripts/SerpentshrineCavern): Fix Lurker spawn coords and spout shouldnt hit players on water at all --- .../SerpentShrine/boss_lurker_below.cpp | 21 ++++--------------- 1 file changed, 4 insertions(+), 17 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 26433f97f402b6..62b3e035de98fd 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp @@ -147,7 +147,7 @@ struct boss_the_lurker_below : public BossAI { //phase2 scheduler.CancelAll(); - DoCastSelf(SPELL_SUBMERGE_VISUAL, true); + DoCastSelf(SPELL_SUBMERGE_VISUAL); DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true); me->SetStandState(UNIT_STAND_STATE_SUBMERGED); me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); @@ -226,7 +226,7 @@ class go_strange_pool : public GameObjectScript if (roll_chance_i(instance->GetBossState(DATA_THE_LURKER_BELOW) != DONE ? 25 : 0) && !instance->IsEncounterInProgress()) { player->CastSpell(player, SPELL_LURKER_SPAWN_TRIGGER, true); - if (Creature* lurker = go->SummonCreature(NPC_THE_LURKER_BELOW, 40.4058f, -417.108f, -21.5911f, 3.03312f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 604800000)) + 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); return true; } @@ -284,22 +284,9 @@ class spell_lurker_below_spout_cone : public SpellScript void FilterTargets(std::list& targets) { - Unit* caster = GetCaster(); - targets.remove_if([caster](WorldObject const* target) -> bool + targets.remove_if([this](WorldObject const* target) -> bool { - if (!caster->HasInLine(target, 5.0f) || !target->IsPlayer()) - { - return true; - } - - LiquidData const& liquidData = target->GetLiquidData(); - - if (liquidData.Status == LIQUID_MAP_UNDER_WATER) - { - return true; - } - - return false; + return !GetCaster()->HasInLine(target, 5.0f) || !target->IsPlayer() || target->ToUnit()->IsInWater(); }); }