From 66d4fd88f57c4b62e277f9c181bd137d306c7f1f Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Sat, 5 Jun 2021 23:24:14 +0200 Subject: [PATCH] fix(Core/Spells): disable fishing if not in LOS within boober destination. (#6138) - Closes #5485 - Closes https://github.com/chromiecraft/chromiecraft/issues/471 --- src/server/game/Spells/Spell.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index c4ccb765f..47e5aecfb 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1356,6 +1356,14 @@ void Spell::SelectImplicitCasterDestTargets(SpellEffIndex effIndex, SpellImplici return; } + if (!m_caster->IsWithinLOS(x, y, z)) + { + SendCastResult(SPELL_FAILED_LINE_OF_SIGHT); + SendChannelUpdate(0); + finish(false); + return; + } + dest = SpellDestination(x, y, liquidLevel, m_caster->GetOrientation()); break; }