fix(Scripts/SerpentshrineCavern): Fix Lurker spawn coords and spout s… (#18014)

fix(Scripts/SerpentshrineCavern): Fix Lurker spawn coords and spout shouldnt hit players on water at all
This commit is contained in:
Andrew
2023-12-14 16:42:20 -03:00
committed by GitHub
parent 06525cdc1e
commit 9df2c485fc

View File

@@ -147,7 +147,7 @@ struct boss_the_lurker_below : public BossAI
{ {
//phase2 //phase2
scheduler.CancelAll(); scheduler.CancelAll();
DoCastSelf(SPELL_SUBMERGE_VISUAL, true); DoCastSelf(SPELL_SUBMERGE_VISUAL);
DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true); DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS, true);
me->SetStandState(UNIT_STAND_STATE_SUBMERGED); me->SetStandState(UNIT_STAND_STATE_SUBMERGED);
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
@@ -226,7 +226,7 @@ public:
if (roll_chance_i(instance->GetBossState(DATA_THE_LURKER_BELOW) != DONE ? 25 : 0) && !instance->IsEncounterInProgress()) if (roll_chance_i(instance->GetBossState(DATA_THE_LURKER_BELOW) != DONE ? 25 : 0) && !instance->IsEncounterInProgress())
{ {
player->CastSpell(player, SPELL_LURKER_SPAWN_TRIGGER, true); 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); lurker->AI()->DoAction(ACTION_START_EVENT);
return true; return true;
} }
@@ -284,22 +284,9 @@ class spell_lurker_below_spout_cone : public SpellScript
void FilterTargets(std::list<WorldObject*>& targets) void FilterTargets(std::list<WorldObject*>& targets)
{ {
Unit* caster = GetCaster(); targets.remove_if([this](WorldObject const* target) -> bool
targets.remove_if([caster](WorldObject const* target) -> bool
{ {
if (!caster->HasInLine(target, 5.0f) || !target->IsPlayer()) return !GetCaster()->HasInLine(target, 5.0f) || !target->IsPlayer() || target->ToUnit()->IsInWater();
{
return true;
}
LiquidData const& liquidData = target->GetLiquidData();
if (liquidData.Status == LIQUID_MAP_UNDER_WATER)
{
return true;
}
return false;
}); });
} }