woops on my part. ninjaweps and spellhelper multi checks.
This commit is contained in:
parent
b56f20b39f
commit
07e45156e5
5 changed files with 15 additions and 12 deletions
|
|
@ -94,8 +94,8 @@ namespace Server.Items
|
|||
|
||||
if ( IsChildOf( from ) )
|
||||
{
|
||||
list.Add(new NinjaWeapon.LoadEntry(this));
|
||||
list.Add(new NinjaWeapon.UnloadEntry(this));
|
||||
list.Add(new NinjaWeapon.LoadEntry(this, 6224));
|
||||
list.Add(new NinjaWeapon.UnloadEntry(this, 6225));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,8 +107,8 @@ namespace Server.Items
|
|||
|
||||
if ( IsChildOf( from ) )
|
||||
{
|
||||
list.Add( new NinjaWeapon.LoadEntry( this ) );
|
||||
list.Add( new NinjaWeapon.UnloadEntry( this ) );
|
||||
list.Add(new NinjaWeapon.LoadEntry(this, 6222));
|
||||
list.Add(new NinjaWeapon.UnloadEntry(this, 6222));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -346,8 +346,8 @@ namespace Server.Items
|
|||
{
|
||||
private INinjaWeapon weapon;
|
||||
|
||||
public LoadEntry(INinjaWeapon wep)
|
||||
: base(6222, 0)
|
||||
public LoadEntry(INinjaWeapon wep, int entry)
|
||||
: base(entry, 0)
|
||||
{
|
||||
weapon = wep;
|
||||
}
|
||||
|
|
@ -365,10 +365,10 @@ namespace Server.Items
|
|||
{
|
||||
private INinjaWeapon weapon;
|
||||
|
||||
public UnloadEntry(INinjaWeapon belt)
|
||||
: base(6223, 0)
|
||||
public UnloadEntry(INinjaWeapon wep, int entry)
|
||||
: base(entry, 0)
|
||||
{
|
||||
weapon = belt;
|
||||
weapon = wep;
|
||||
|
||||
Enabled = (weapon.UsesRemaining > 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,10 +75,12 @@ namespace Server.Spells
|
|||
{
|
||||
return CheckMulti( p, map, true, 0);
|
||||
}
|
||||
|
||||
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 )
|
||||
|
|
@ -90,11 +92,11 @@ namespace Server.Spells
|
|||
{
|
||||
BaseMulti multi = sector.Multis[i];
|
||||
|
||||
if( houses && multi is BaseHouse )
|
||||
if( multi is BaseHouse )
|
||||
{
|
||||
BaseHouse bh = (BaseHouse)multi;
|
||||
|
||||
if(bh.IsInside( p, 16 ) || (housingrange > 0 && bh.InRange(p, housingrange)))
|
||||
if( ( houses && bh.IsInside( p, 16 ) ) || ( housingrange > 0 && bh.InRange( p, housingrange ) ) )
|
||||
return true;
|
||||
}
|
||||
else if( multi.Contains( p ))
|
||||
|
|
@ -102,6 +104,7 @@ namespace Server.Spells
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace Server.Spells.Ninjitsu
|
|||
{
|
||||
Caster.SendLocalizedMessage( 502831 ); // Cannot teleport to that spot.
|
||||
}
|
||||
else if (SpellHelper.CheckMulti( Caster.Location, Caster.Map, true, 5 ))
|
||||
else if ( SpellHelper.CheckMulti( new Point3D( p ), map, true, 5 ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 502831 ); // Cannot teleport to that spot.
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue