Core/MMAPs: Adjust walkable climb and fix a lot of mmap raycast issues

Port From (https://github.com/TrinityCore/TrinityCore/commit/89afeed41b4f040e4852b35183f30291588662d7)
This commit is contained in:
hondacrx
2022-02-22 14:24:29 -05:00
parent 0600993129
commit c27475ae46
5 changed files with 99 additions and 119 deletions
+2 -8
View File
@@ -199,17 +199,11 @@ namespace Scripts.Spells.Warrior
PathGenerator generatedPath = new(GetCaster());
generatedPath.SetPathLengthLimit(range);
bool result = generatedPath.CalculatePath(dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), false, true);
bool result = generatedPath.CalculatePath(dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), false);
if (generatedPath.GetPathType().HasAnyFlag(PathType.Short))
return SpellCastResult.OutOfRange;
else if (!result || generatedPath.GetPathType().HasAnyFlag(PathType.NoPath))
{
result = generatedPath.CalculatePath(dest.GetPositionX(), dest.GetPositionY(), dest.GetPositionZ(), false, false);
if (generatedPath.GetPathType().HasAnyFlag(PathType.Short))
return SpellCastResult.OutOfRange;
else if (!result || generatedPath.GetPathType().HasAnyFlag(PathType.NoPath))
return SpellCastResult.NoPath;
}
return SpellCastResult.NoPath;
}
else if (dest.GetPositionZ() > GetCaster().GetPositionZ() + 4.0f)
return SpellCastResult.NoPath;