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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user