Skip to content

Commit

Permalink
fix(Scripts/SerpentshrineCavern): Fix Lurker spawn coords and spout s… (
Browse files Browse the repository at this point in the history
azerothcore#18014)

fix(Scripts/SerpentshrineCavern): Fix Lurker spawn coords and spout shouldnt hit players on water at all
  • Loading branch information
Nyeriah authored Dec 14, 2023
1 parent 06525cd commit 9df2c48
Showing 1 changed file with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -284,22 +284,9 @@ class spell_lurker_below_spout_cone : public SpellScript

void FilterTargets(std::list<WorldObject*>& 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();
});
}

Expand Down

0 comments on commit 9df2c48

Please sign in to comment.