aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2015-06-15 22:38:42 +0200
committerjackpoz <giacomopoz@gmail.com>2015-06-17 19:39:37 +0200
commit91c399cad239b20dac68629587e7c8b4ec612be3 (patch)
treebf8d1b4745ce641055244dbb6eb85cec37a414a8
parent0b9cd22a6b5a0cca6e3c07dd5ae077ddbdfc3992 (diff)
Core/Spells: Fix Charge pathing
Fix charge allowing to run to unreachable places Close #13847
-rw-r--r--src/server/game/Spells/Spell.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 94bb90487bc..ff7c6a86ae8 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -5060,12 +5060,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;
}