Destination of shadow jump should not be within 5 tiles of a house.
This commit is contained in:
parent
b39241220e
commit
2f189e4785
2 changed files with 12 additions and 10 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,9 +77,8 @@ namespace Server.Spells.Ninjitsu
|
|||
{
|
||||
Caster.SendLocalizedMessage( 502831 ); // Cannot teleport to that spot.
|
||||
}
|
||||
else if ( SpellHelper.CheckMulti( new Point3D( p ), map ) )
|
||||
else if (SpellHelper.CheckMulti( Caster.Location, Caster.Map, true, 5 ))
|
||||
{
|
||||
// TODO: Cannot shadowjump within 5 tiles from any house.
|
||||
Caster.SendLocalizedMessage( 502831 ); // Cannot teleport to that spot.
|
||||
}
|
||||
else if ( CheckSequence() )
|
||||
|
|
@ -103,7 +102,6 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
public class InternalTarget : Target
|
||||
{
|
||||
private Shadowjump m_Owner;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue