mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Spells: Fix Charge pathing
Fix charge allowing to run to unreachable places Close #13847
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user