From 5254a1e1647525c9a5bf64660633b61ea455cd78 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Mon, 15 Jun 2015 22:38:42 +0200 Subject: [PATCH] Core/Spells: Fix Charge pathing Fix charge allowing to run to unreachable places Close #13847 (cherry picked from commit 91c399cad239b20dac68629587e7c8b4ec612be3) --- src/server/game/Spells/Spell.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index cb0f34c162..05e2f5d33f 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -5134,12 +5134,12 @@ SpellCastResult Spell::CheckCast(bool strict) bool result = m_preGeneratedPath.CalculatePath(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ() + target->GetObjectSize(), false, true); if (m_preGeneratedPath.GetPathType() & PATHFIND_SHORT) return SPELL_FAILED_OUT_OF_RANGE; - else if (!result || m_preGeneratedPath.GetPathType() & PATHFIND_NOPATH) + else if (!result || m_preGeneratedPath.GetPathType() & (PATHFIND_NOPATH | PATHFIND_INCOMPLETE)) { result = m_preGeneratedPath.CalculatePath(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ() + target->GetObjectSize(), false, false); if (m_preGeneratedPath.GetPathType() & PATHFIND_SHORT) return SPELL_FAILED_OUT_OF_RANGE; - else if (!result || m_preGeneratedPath.GetPathType() & PATHFIND_NOPATH) + else if (!result || m_preGeneratedPath.GetPathType() & (PATHFIND_NOPATH | PATHFIND_INCOMPLETE)) return SPELL_FAILED_NOPATH; }