Destination of shadow jump should not be within 5 tiles of a house.

This commit is contained in:
xavier 2010-12-11 17:20:56 +00:00
parent b39241220e
commit 2f189e4785
2 changed files with 12 additions and 10 deletions

View file

@ -73,10 +73,13 @@ namespace Server.Spells
public static bool CheckMulti( Point3D p, Map map )
{
return CheckMulti( p, map, true );
return CheckMulti( p, map, true, 0);
}
public static bool CheckMulti( Point3D p, Map map, bool houses )
public static bool CheckMulti(Point3D p, Map map, bool houses)
{
return CheckMulti(p, map, houses, 0);
}
public static bool CheckMulti( Point3D p, Map map, bool houses, int housingrange )
{
if( map == null || map == Map.Internal )
return false;
@ -87,17 +90,18 @@ namespace Server.Spells
{
BaseMulti multi = sector.Multis[i];
if( multi is BaseHouse )
if( houses && multi is BaseHouse )
{
if( houses && ((BaseHouse)multi).IsInside( p, 16 ) )
BaseHouse bh = (BaseHouse)multi;
if(bh.IsInside( p, 16 ) || (housingrange > 0 && bh.InRange(p, housingrange)))
return true;
}
else if( multi.Contains( p ) )
else if( multi.Contains( p ))
{
return true;
}
}
return false;
}