Core/Mmaps: Charge ignoring z position of target (#17516)

* Core/Mmaps: Charge ignoring z position of target

By cemak closes #15011
This commit is contained in:
Aokromes authored and Aokromes committed 2016-07-20 18:43:45 +02:00
1 parent b56a40436b
commit 67bb661def
3 files changed
+10

No files matched your search

+4
View File
@@ -5267,7 +5267,11 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_OUT_OF_RANGE;
else if (!result || m_preGeneratedPath.GetPathType() & (PATHFIND_NOPATH | PATHFIND_INCOMPLETE))
return SPELL_FAILED_NOPATH;
else if (m_preGeneratedPath.IsInvalidDestinationZ(target)) // Check position z, if not in a straight line
return SPELL_FAILED_NOPATH;
}
else if (m_preGeneratedPath.IsInvalidDestinationZ(target)) // Check position z, if in a straight line
return SPELL_FAILED_NOPATH;
m_preGeneratedPath.ReducePathLenghtByDist(objSize); // move back
}