This commit is contained in:
parent
34d969712e
commit
d444b9ba5c
70 changed files with 569 additions and 495 deletions
|
|
@ -172,12 +172,12 @@ namespace Server.Items
|
|||
if ( map == null )
|
||||
return false;
|
||||
|
||||
Tile[] tiles = map.Tiles.GetStaticTiles( x, y, true );
|
||||
StaticTile[] tiles = map.Tiles.GetStaticTiles( x, y, true );
|
||||
|
||||
for ( int i = 0; i < tiles.Length; ++i )
|
||||
{
|
||||
Tile t = tiles[i];
|
||||
ItemData id = TileData.ItemTable[t.ID & 0x3FFF];
|
||||
StaticTile t = tiles[i];
|
||||
ItemData id = TileData.ItemTable[t.ID & TileData.MaxItemValue];
|
||||
|
||||
if ( (id.Flags & TileFlag.Wall) != 0 && (z + 16) > t.Z && (t.Z + t.Height) > z )
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ namespace Server.Items
|
|||
{
|
||||
Item item = items[i];
|
||||
|
||||
if ( item.ItemID < 0x4000 && item.AtWorldPoint( x, y ) && !(item is BaseDoor) )
|
||||
if ( !(item is BaseMulti) && item.AtWorldPoint( x, y ) && !(item is BaseDoor) )
|
||||
{
|
||||
ItemData id = item.ItemData;
|
||||
bool surface = id.Surface;
|
||||
|
|
|
|||
|
|
@ -94,10 +94,10 @@ namespace Server.Items
|
|||
Point3D loc = new Point3D( p );
|
||||
|
||||
if ( p is StaticTarget )
|
||||
loc.Z -= TileData.ItemTable[((StaticTarget)p).ItemID & 0x3FFF].CalcHeight; /* NOTE: OSI does not properly normalize Z positioning here.
|
||||
* A side affect is that you can only place on floors (due to the CanFit call).
|
||||
* That functionality may be desired. And so, it's included in this script.
|
||||
*/
|
||||
loc.Z -= TileData.ItemTable[((StaticTarget)p).ItemID].CalcHeight; /* NOTE: OSI does not properly normalize Z positioning here.
|
||||
* A side affect is that you can only place on floors (due to the CanFit call).
|
||||
* That functionality may be desired. And so, it's included in this script.
|
||||
*/
|
||||
|
||||
if ( ValidatePlacement( from, loc ) )
|
||||
EndPlace( from, (HolidayTreeType) state, loc );
|
||||
|
|
|
|||
|
|
@ -75,9 +75,9 @@ namespace Server.Items
|
|||
int itemID;
|
||||
|
||||
if ( targeted is Item )
|
||||
itemID = ((Item)targeted).ItemID & 0x3FFF;
|
||||
itemID = ((Item)targeted).ItemID;
|
||||
else if ( targeted is StaticTarget )
|
||||
itemID = ((StaticTarget)targeted).ItemID & 0x3FFF;
|
||||
itemID = ((StaticTarget)targeted).ItemID;
|
||||
else
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ namespace Server.Items
|
|||
else
|
||||
to = new Entity( Serial.Zero, new Point3D( p ), Map );
|
||||
|
||||
Effects.SendMovingEffect( from, to, ItemID & 0x3FFF, 7, 0, false, false, Hue, 0 );
|
||||
Effects.SendMovingEffect( from, to, ItemID, 7, 0, false, false, Hue, 0 );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( FirebombReposition_OnTick ), new object[]{ p, Map } );
|
||||
Internalize();
|
||||
|
|
|
|||
|
|
@ -243,14 +243,14 @@ namespace Server.Items
|
|||
if ( map == null )
|
||||
return int.MinValue;
|
||||
|
||||
Tile[] tiles = map.Tiles.GetStaticTiles( item.X, item.Y, true );
|
||||
StaticTile[] tiles = map.Tiles.GetStaticTiles( item.X, item.Y, true );
|
||||
|
||||
int z = int.MinValue;
|
||||
|
||||
for ( int i = 0; i < tiles.Length; ++i )
|
||||
{
|
||||
Tile tile = tiles[i];
|
||||
ItemData id = TileData.ItemTable[tile.ID & 0x3FFF];
|
||||
StaticTile tile = tiles[i];
|
||||
ItemData id = TileData.ItemTable[tile.ID & TileData.MaxItemValue];
|
||||
|
||||
int top = tile.Z; // Confirmed : no height checks here
|
||||
|
||||
|
|
|
|||
|
|
@ -5,11 +5,10 @@ namespace Server.Items
|
|||
{
|
||||
public class Static : Item
|
||||
{
|
||||
public Static() //Dupe-tastic!
|
||||
: base( 0x80 )
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
public Static() : base( 0x80 )
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Static( int itemID ) : base( itemID )
|
||||
|
|
@ -58,7 +57,7 @@ namespace Server.Items
|
|||
public override int LabelNumber{ get{ return m_LabelNumber; } }
|
||||
|
||||
[Constructable]
|
||||
public LocalizedStatic( int itemID ) : this( itemID, 1020000 + itemID )
|
||||
public LocalizedStatic( int itemID ) : this( itemID, itemID < 0x4000 ? 1020000 + itemID : 1078872 + itemID )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,7 @@ namespace Server.Items
|
|||
if ( obj is Item )
|
||||
itemID = ((Item)obj).ItemID;
|
||||
else if ( obj is StaticTarget )
|
||||
itemID = ((StaticTarget)obj).ItemID & 0x3FFF;
|
||||
itemID = ((StaticTarget)obj).ItemID;
|
||||
|
||||
return ( itemID == 4017 || (itemID >= 6522 && itemID <= 6569) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ namespace Server.Items
|
|||
int tx = p.X - 2 + Utility.Random( 5 );
|
||||
int ty = p.Y - 2 + Utility.Random( 5 );
|
||||
|
||||
Tile t = map.Tiles.GetLandTile( tx, ty );
|
||||
LandTile t = map.Tiles.GetLandTile( tx, ty );
|
||||
|
||||
if ( t.Z == p.Z && ( (t.ID >= 0xA8 && t.ID <= 0xAB) || (t.ID >= 0x136 && t.ID <= 0x137) ) && !Spells.SpellHelper.CheckMulti( new Point3D( tx, ty, p.Z ), map ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ namespace Server.Items
|
|||
to = (Mobile)p;
|
||||
}
|
||||
|
||||
Effects.SendMovingEffect( from, to, m_Potion.ItemID & 0x3FFF, 7, 0, false, false, m_Potion.Hue, 0 );
|
||||
Effects.SendMovingEffect( from, to, m_Potion.ItemID, 7, 0, false, false, m_Potion.Hue, 0 );
|
||||
|
||||
if( m_Potion.Amount > 1 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ namespace Server.Items
|
|||
return;
|
||||
|
||||
Point3D p3d = new Point3D( p );
|
||||
ItemData id = TileData.ItemTable[ m_ItemID & 0x3FFF ];
|
||||
ItemData id = TileData.ItemTable[ m_ItemID & TileData.MaxItemValue ];
|
||||
|
||||
if ( map.CanFit( p3d, id.Height ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ namespace Server.Items
|
|||
return;
|
||||
|
||||
Point3D p3d = new Point3D( p );
|
||||
ItemData id = TileData.ItemTable[ m_ItemID & 0x3FFF ];
|
||||
ItemData id = TileData.ItemTable[ m_ItemID & TileData.MaxItemValue ];
|
||||
|
||||
if ( map.CanFit( p3d, id.Height ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ namespace Server.Items
|
|||
return;
|
||||
|
||||
Point3D p3d = new Point3D( p );
|
||||
ItemData id = TileData.ItemTable[ m_ItemID & 0x3FFF ];
|
||||
ItemData id = TileData.ItemTable[ m_ItemID & TileData.MaxItemValue ];
|
||||
|
||||
if ( map.CanFit( p3d, id.Height ) )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue