This commit is contained in:
parent
34d969712e
commit
d444b9ba5c
70 changed files with 569 additions and 495 deletions
|
|
@ -1052,12 +1052,12 @@ namespace Server.Multis
|
|||
if ( this is HouseFoundation && y < (mcl.Height-1) && p.Z >= this.Z )
|
||||
return true;
|
||||
|
||||
Tile[] tiles = mcl.Tiles[x][y];
|
||||
StaticTile[] tiles = mcl.Tiles[x][y];
|
||||
|
||||
for ( int j = 0; j < tiles.Length; ++j )
|
||||
{
|
||||
Tile tile = tiles[j];
|
||||
int id = tile.ID & 0x3FFF;
|
||||
StaticTile tile = tiles[j];
|
||||
int id = tile.ID & TileData.MaxItemValue;
|
||||
ItemData data = TileData.ItemTable[id];
|
||||
|
||||
// Slanted roofs do not count; they overhang blocking south and east sides of the multi
|
||||
|
|
@ -1095,7 +1095,7 @@ namespace Server.Multis
|
|||
|
||||
private static List<BaseHouse> m_AllHouses = new List<BaseHouse>();
|
||||
|
||||
public BaseHouse( int multiID, Mobile owner, int MaxLockDown, int MaxSecure ) : base( multiID | 0x4000 )
|
||||
public BaseHouse( int multiID, Mobile owner, int MaxLockDown, int MaxSecure ) : base( multiID )
|
||||
{
|
||||
m_AllHouses.Add( this );
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ namespace Server.Multis
|
|||
|
||||
public static List<BaseBoat> Boats{ get{ return m_Instances; } }
|
||||
|
||||
public BaseBoat() : base( 0x4000 )
|
||||
public BaseBoat() : base( 0x0 )
|
||||
{
|
||||
m_DecayTime = DateTime.Now + BoatDecayDelay;
|
||||
|
||||
|
|
@ -1184,8 +1184,8 @@ namespace Server.Multis
|
|||
if ( newComponents.Tiles[x][y].Length == 0 || Contains( tx, ty ) )
|
||||
continue;
|
||||
|
||||
Tile landTile = map.Tiles.GetLandTile( tx, ty );
|
||||
Tile[] tiles = map.Tiles.GetStaticTiles( tx, ty, true );
|
||||
LandTile landTile = map.Tiles.GetLandTile( tx, ty );
|
||||
StaticTile[] tiles = map.Tiles.GetStaticTiles( tx, ty, true );
|
||||
|
||||
bool hasWater = false;
|
||||
|
||||
|
|
@ -1203,8 +1203,8 @@ namespace Server.Multis
|
|||
|
||||
for ( int i = 0; i < tiles.Length; ++i )
|
||||
{
|
||||
Tile tile = tiles[i];
|
||||
bool isWater = ( tile.ID >= 0x5796 && tile.ID <= 0x57B2 );
|
||||
StaticTile tile = tiles[i];
|
||||
bool isWater = ( tile.ID >= 0x1796 && tile.ID <= 0x17B2 );
|
||||
|
||||
if ( tile.Z == p.Z && isWater )
|
||||
hasWater = true;
|
||||
|
|
@ -1221,7 +1221,7 @@ namespace Server.Multis
|
|||
|
||||
foreach ( Item item in eable )
|
||||
{
|
||||
if ( item.ItemID >= 0x4000 || item.Z < p.Z || !item.Visible )
|
||||
if ( item is BaseMulti || item.Z < p.Z || !item.Visible )
|
||||
continue;
|
||||
|
||||
int x = item.X - p.X + newComponents.Min.X;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace Server.Multis
|
|||
if ( !Core.AOS )
|
||||
LootType = LootType.Newbied;
|
||||
|
||||
m_MultiID = id & 0x3FFF;
|
||||
m_MultiID = id;
|
||||
m_Offset = offset;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Multis
|
|||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
m_MultiID = id & 0x3FFF;
|
||||
m_MultiID = id;
|
||||
m_Offset = offset;
|
||||
|
||||
m_ShipName = boat.ShipName;
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ namespace Server.Multis
|
|||
{
|
||||
public class LargeBoat : BaseBoat
|
||||
{
|
||||
public override int NorthID{ get{ return 0x4010; } }
|
||||
public override int EastID{ get{ return 0x4011; } }
|
||||
public override int SouthID{ get{ return 0x4012; } }
|
||||
public override int WestID{ get{ return 0x4013; } }
|
||||
public override int NorthID{ get{ return 0x10; } }
|
||||
public override int EastID{ get{ return 0x11; } }
|
||||
public override int SouthID{ get{ return 0x12; } }
|
||||
public override int WestID{ get{ return 0x13; } }
|
||||
|
||||
public override int HoldDistance{ get{ return 5; } }
|
||||
public override int TillerManDistance{ get{ return -5; } }
|
||||
|
|
@ -51,7 +51,7 @@ namespace Server.Multis
|
|||
public override BaseBoat Boat{ get{ return new LargeBoat(); } }
|
||||
|
||||
[Constructable]
|
||||
public LargeBoatDeed() : base( 0x4010, new Point3D( 0, -1, 0 ) )
|
||||
public LargeBoatDeed() : base( 0x10, new Point3D( 0, -1, 0 ) )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ namespace Server.Multis
|
|||
{
|
||||
public override BaseBoat Boat{ get{ return new LargeBoat(); } }
|
||||
|
||||
public LargeDockedBoat( BaseBoat boat ) : base( 0x4010, new Point3D( 0, -1, 0 ), boat )
|
||||
public LargeDockedBoat( BaseBoat boat ) : base( 0x10, new Point3D( 0, -1, 0 ), boat )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ namespace Server.Multis
|
|||
{
|
||||
public class LargeDragonBoat : BaseBoat
|
||||
{
|
||||
public override int NorthID{ get{ return 0x4014; } }
|
||||
public override int EastID{ get{ return 0x4015; } }
|
||||
public override int SouthID{ get{ return 0x4016; } }
|
||||
public override int WestID{ get{ return 0x4017; } }
|
||||
public override int NorthID{ get{ return 0x14; } }
|
||||
public override int EastID{ get{ return 0x15; } }
|
||||
public override int SouthID{ get{ return 0x16; } }
|
||||
public override int WestID{ get{ return 0x17; } }
|
||||
|
||||
public override int HoldDistance{ get{ return 5; } }
|
||||
public override int TillerManDistance{ get{ return -5; } }
|
||||
|
|
@ -51,7 +51,7 @@ namespace Server.Multis
|
|||
public override BaseBoat Boat{ get{ return new LargeDragonBoat(); } }
|
||||
|
||||
[Constructable]
|
||||
public LargeDragonBoatDeed() : base( 0x4014, new Point3D( 0, -1, 0 ) )
|
||||
public LargeDragonBoatDeed() : base( 0x14, new Point3D( 0, -1, 0 ) )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ namespace Server.Multis
|
|||
{
|
||||
public override BaseBoat Boat{ get{ return new LargeDragonBoat(); } }
|
||||
|
||||
public LargeDockedDragonBoat( BaseBoat boat ) : base( 0x4014, new Point3D( 0, -1, 0 ), boat )
|
||||
public LargeDockedDragonBoat( BaseBoat boat ) : base( 0x14, new Point3D( 0, -1, 0 ), boat )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ namespace Server.Multis
|
|||
{
|
||||
public class MediumBoat : BaseBoat
|
||||
{
|
||||
public override int NorthID{ get{ return 0x4008; } }
|
||||
public override int EastID{ get{ return 0x4009; } }
|
||||
public override int SouthID{ get{ return 0x400A; } }
|
||||
public override int WestID{ get{ return 0x400B; } }
|
||||
public override int NorthID{ get{ return 0x8; } }
|
||||
public override int EastID{ get{ return 0x9; } }
|
||||
public override int SouthID{ get{ return 0xA; } }
|
||||
public override int WestID{ get{ return 0xB; } }
|
||||
|
||||
public override int HoldDistance{ get{ return 4; } }
|
||||
public override int TillerManDistance{ get{ return -5; } }
|
||||
|
|
@ -51,7 +51,7 @@ namespace Server.Multis
|
|||
public override BaseBoat Boat{ get{ return new MediumBoat(); } }
|
||||
|
||||
[Constructable]
|
||||
public MediumBoatDeed() : base( 0x4008, Point3D.Zero )
|
||||
public MediumBoatDeed() : base( 0x8, Point3D.Zero )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ namespace Server.Multis
|
|||
{
|
||||
public override BaseBoat Boat{ get{ return new MediumBoat(); } }
|
||||
|
||||
public MediumDockedBoat( BaseBoat boat ) : base( 0x4008, Point3D.Zero, boat )
|
||||
public MediumDockedBoat( BaseBoat boat ) : base( 0x8, Point3D.Zero, boat )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ namespace Server.Multis
|
|||
{
|
||||
public class MediumDragonBoat : BaseBoat
|
||||
{
|
||||
public override int NorthID{ get{ return 0x400C; } }
|
||||
public override int EastID{ get{ return 0x400D; } }
|
||||
public override int SouthID{ get{ return 0x400E; } }
|
||||
public override int WestID{ get{ return 0x400F; } }
|
||||
public override int NorthID{ get{ return 0xC; } }
|
||||
public override int EastID{ get{ return 0xD; } }
|
||||
public override int SouthID{ get{ return 0xE; } }
|
||||
public override int WestID{ get{ return 0xF; } }
|
||||
|
||||
public override int HoldDistance{ get{ return 4; } }
|
||||
public override int TillerManDistance{ get{ return -5; } }
|
||||
|
|
@ -51,7 +51,7 @@ namespace Server.Multis
|
|||
public override BaseBoat Boat{ get{ return new MediumDragonBoat(); } }
|
||||
|
||||
[Constructable]
|
||||
public MediumDragonBoatDeed() : base( 0x400C, Point3D.Zero )
|
||||
public MediumDragonBoatDeed() : base( 0xC, Point3D.Zero )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ namespace Server.Multis
|
|||
{
|
||||
public override BaseBoat Boat{ get{ return new MediumDragonBoat(); } }
|
||||
|
||||
public MediumDockedDragonBoat( BaseBoat boat ) : base( 0x400C, Point3D.Zero, boat )
|
||||
public MediumDockedDragonBoat( BaseBoat boat ) : base( 0xC, Point3D.Zero, boat )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ namespace Server.Multis
|
|||
{
|
||||
public class SmallBoat : BaseBoat
|
||||
{
|
||||
public override int NorthID{ get{ return 0x4000; } }
|
||||
public override int EastID{ get{ return 0x4001; } }
|
||||
public override int SouthID{ get{ return 0x4002; } }
|
||||
public override int WestID{ get{ return 0x4003; } }
|
||||
public override int NorthID{ get{ return 0x0; } }
|
||||
public override int EastID{ get{ return 0x1; } }
|
||||
public override int SouthID{ get{ return 0x2; } }
|
||||
public override int WestID{ get{ return 0x3; } }
|
||||
|
||||
public override int HoldDistance{ get{ return 4; } }
|
||||
public override int TillerManDistance{ get{ return -4; } }
|
||||
|
|
@ -51,7 +51,7 @@ namespace Server.Multis
|
|||
public override BaseBoat Boat{ get{ return new SmallBoat(); } }
|
||||
|
||||
[Constructable]
|
||||
public SmallBoatDeed() : base( 0x4000, Point3D.Zero )
|
||||
public SmallBoatDeed() : base( 0x0, Point3D.Zero )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ namespace Server.Multis
|
|||
{
|
||||
public override BaseBoat Boat{ get{ return new SmallBoat(); } }
|
||||
|
||||
public SmallDockedBoat( BaseBoat boat ) : base( 0x4000, Point3D.Zero, boat )
|
||||
public SmallDockedBoat( BaseBoat boat ) : base( 0x0, Point3D.Zero, boat )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ namespace Server.Multis
|
|||
{
|
||||
public class SmallDragonBoat : BaseBoat
|
||||
{
|
||||
public override int NorthID{ get{ return 0x4004; } }
|
||||
public override int EastID{ get{ return 0x4005; } }
|
||||
public override int SouthID{ get{ return 0x4006; } }
|
||||
public override int WestID{ get{ return 0x4007; } }
|
||||
public override int NorthID{ get{ return 0x4; } }
|
||||
public override int EastID{ get{ return 0x5; } }
|
||||
public override int SouthID{ get{ return 0x6; } }
|
||||
public override int WestID{ get{ return 0x7; } }
|
||||
|
||||
public override int HoldDistance{ get{ return 4; } }
|
||||
public override int TillerManDistance{ get{ return -4; } }
|
||||
|
|
@ -51,7 +51,7 @@ namespace Server.Multis
|
|||
public override BaseBoat Boat{ get{ return new SmallDragonBoat(); } }
|
||||
|
||||
[Constructable]
|
||||
public SmallDragonBoatDeed() : base( 0x4004, Point3D.Zero )
|
||||
public SmallDragonBoatDeed() : base( 0x4, Point3D.Zero )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ namespace Server.Multis
|
|||
{
|
||||
public override BaseBoat Boat{ get{ return new SmallDragonBoat(); } }
|
||||
|
||||
public SmallDockedDragonBoat( BaseBoat boat ) : base( 0x4004, Point3D.Zero, boat )
|
||||
public SmallDockedDragonBoat( BaseBoat boat ) : base( 0x4, Point3D.Zero, boat )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -103,13 +103,15 @@ namespace Server.Misc
|
|||
|
||||
object surface = map.GetTopSurface( from.Location );
|
||||
|
||||
if ( surface is Tile )
|
||||
{
|
||||
int id = ((Tile)surface).ID;
|
||||
if ( surface is LandTile ) {
|
||||
int id = ((LandTile)surface).ID;
|
||||
|
||||
return (id >= 168 && id <= 171)
|
||||
|| (id >= 310 && id <= 311)
|
||||
|| (id >= 0x5796 && id <= 0x57B2);
|
||||
|| (id >= 310 && id <= 311);
|
||||
} else if ( surface is StaticTile ) {
|
||||
int id = ((StaticTile)surface).ID;
|
||||
|
||||
return (id >= 0x1796 && id <= 0x17B2);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace Server.Multis
|
|||
}
|
||||
}
|
||||
|
||||
public BaseCamp( int multiID ) : base( multiID | 0x4000 )
|
||||
public BaseCamp( int multiID ) : base( multiID )
|
||||
{
|
||||
m_Items = new List<Item>();
|
||||
m_Mobiles = new List<Mobile>();
|
||||
|
|
@ -40,16 +40,6 @@ namespace Server.Multis
|
|||
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( CheckAddComponents ) );
|
||||
}
|
||||
|
||||
public BaseCamp( int multiID, int mode ) : base( multiID | 0x4000*mode )
|
||||
{
|
||||
m_Items = new List<Item>();
|
||||
m_Mobiles = new List<Mobile>();
|
||||
m_DecayDelay = TimeSpan.FromMinutes(30.0);
|
||||
RefreshDecay(true);
|
||||
|
||||
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( CheckAddComponents ) );
|
||||
}
|
||||
|
||||
public void CheckAddComponents()
|
||||
{
|
||||
if ( Deleted )
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ namespace Server.Multis
|
|||
private Mobile m_Prisoner;
|
||||
|
||||
[Constructable]
|
||||
public BrigandCamp() : base( 0x10ee, 0 ) // dummy garbage at center
|
||||
public BrigandCamp() : base( 0x10EE ) // dummy garbage at center
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Server.Multis
|
|||
private Mobile m_Prisoner;
|
||||
|
||||
[Constructable]
|
||||
public LizardmenCamp() : base( 0x10ee , 0 ) // dummy garbage at center
|
||||
public LizardmenCamp() : base( 0x10EE ) // dummy garbage at center
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Server.Multis
|
|||
private Mobile m_Prisoner;
|
||||
|
||||
[Constructable]
|
||||
public OrcCamp() : base( 0x10ee, 0 ) // dummy garbage at center
|
||||
public OrcCamp() : base( 0x10EE ) // dummy garbage at center
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Server.Multis
|
|||
private Mobile m_Prisoner;
|
||||
|
||||
[Constructable]
|
||||
public RatCamp() : base( 0x10ee, 0 ) // dummy garbage at center
|
||||
public RatCamp() : base( 0x10EE ) // dummy garbage at center
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ namespace Server.Multis.Deeds
|
|||
Weight = 1.0;
|
||||
LootType = LootType.Newbied;
|
||||
|
||||
m_MultiID = id & 0x3FFF;
|
||||
m_MultiID = id;
|
||||
m_Offset = offset;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -553,11 +553,11 @@ namespace Server.Multis
|
|||
|
||||
if( x >= 0 && x < mcl.Width && y >= 0 && y < mcl.Height )
|
||||
{
|
||||
Tile[] tiles = mcl.Tiles[x][y];
|
||||
StaticTile[] tiles = mcl.Tiles[x][y];
|
||||
|
||||
for( int i = 0; i < tiles.Length; ++i )
|
||||
{
|
||||
Tile tile = tiles[i];
|
||||
StaticTile tile = tiles[i];
|
||||
|
||||
if( tile.Z == 7 && tile.Height == 20 )
|
||||
return true;
|
||||
|
|
@ -1061,11 +1061,11 @@ namespace Server.Multis
|
|||
|
||||
public static bool ValidPiece( int itemID, bool roof )
|
||||
{
|
||||
itemID &= 0x3FFF;
|
||||
itemID &= TileData.MaxItemValue;
|
||||
|
||||
if ( !roof && ( TileData.ItemTable[itemID & 0x3FFF].Flags & TileFlag.Roof ) != 0 )
|
||||
if ( !roof && ( TileData.ItemTable[itemID].Flags & TileFlag.Roof ) != 0 )
|
||||
return false;
|
||||
else if ( roof && ( TileData.ItemTable[itemID & 0x3FFF].Flags & TileFlag.Roof ) == 0 )
|
||||
else if ( roof && ( TileData.ItemTable[itemID].Flags & TileFlag.Roof ) == 0 )
|
||||
return false;
|
||||
|
||||
return Verification.IsItemValid( itemID );
|
||||
|
|
@ -1141,11 +1141,11 @@ namespace Server.Multis
|
|||
|
||||
if( IsStairBlock( id ) )
|
||||
{
|
||||
Tile[] tiles = mcl.Tiles[ax][ay];
|
||||
StaticTile[] tiles = mcl.Tiles[ax][ay];
|
||||
|
||||
for( int i = 0; i < tiles.Length; ++i )
|
||||
{
|
||||
Tile tile = tiles[i];
|
||||
StaticTile tile = tiles[i];
|
||||
|
||||
if( tile.Z == (z + 5) )
|
||||
{
|
||||
|
|
@ -1220,12 +1220,12 @@ namespace Server.Multis
|
|||
|
||||
if( ax >= 1 && ax < mcl.Width && ay >= 1 && ay < mcl.Height - 1 )
|
||||
{
|
||||
Tile[] tiles = mcl.Tiles[ax][ay];
|
||||
StaticTile[] tiles = mcl.Tiles[ax][ay];
|
||||
|
||||
bool hasBaseFloor = false;
|
||||
|
||||
for( int j = 0; !hasBaseFloor && j < tiles.Length; ++j )
|
||||
hasBaseFloor = (tiles[j].Z == 7 && (tiles[j].ID & 0x3FFF) != 1);
|
||||
hasBaseFloor = (tiles[j].Z == 7 && tiles[j].ID != 1);
|
||||
|
||||
if( !hasBaseFloor )
|
||||
mcl.Add( 0x31F4, x, y, 7 );
|
||||
|
|
@ -1284,12 +1284,12 @@ namespace Server.Multis
|
|||
// If needed, replace removed component with a dirt tile
|
||||
if( ax >= 1 && ax < mcl.Width && ay >= 1 && ay < mcl.Height - 1 )
|
||||
{
|
||||
Tile[] tiles = mcl.Tiles[ax][ay];
|
||||
StaticTile[] tiles = mcl.Tiles[ax][ay];
|
||||
|
||||
bool hasBaseFloor = false;
|
||||
|
||||
for( int i = 0; !hasBaseFloor && i < tiles.Length; ++i )
|
||||
hasBaseFloor = (tiles[i].Z == 7 && (tiles[i].ID & 0x3FFF) != 1);
|
||||
hasBaseFloor = (tiles[i].Z == 7 && tiles[i].ID != 1);
|
||||
|
||||
if( !hasBaseFloor )
|
||||
{
|
||||
|
|
@ -1641,7 +1641,7 @@ namespace Server.Multis
|
|||
{
|
||||
MultiTileEntry mte = list[i];
|
||||
|
||||
if( mte.m_OffsetX == x && mte.m_OffsetY == y && GetZLevel( mte.m_OffsetZ, context.Foundation ) == context.Level && (TileData.ItemTable[mte.m_ItemID & 0x3FFF].Flags & TileFlag.Roof) != 0 )
|
||||
if( mte.m_OffsetX == x && mte.m_OffsetY == y && GetZLevel( mte.m_OffsetZ, context.Foundation ) == context.Level && (TileData.ItemTable[mte.m_ItemID & TileData.MaxItemValue].Flags & TileFlag.Roof) != 0 )
|
||||
mcl.Remove( mte.m_ItemID, x, y, mte.m_OffsetZ );
|
||||
}
|
||||
|
||||
|
|
@ -1669,7 +1669,7 @@ namespace Server.Multis
|
|||
DesignState design = context.Foundation.DesignState;
|
||||
MultiComponentList mcl = design.Components;
|
||||
|
||||
if( (TileData.ItemTable[itemID & 0x3FFF].Flags & TileFlag.Roof) == 0 )
|
||||
if( (TileData.ItemTable[itemID & TileData.MaxItemValue].Flags & TileFlag.Roof) == 0 )
|
||||
{
|
||||
design.SendDetailedInfoTo( state );
|
||||
return;
|
||||
|
|
@ -1748,7 +1748,7 @@ namespace Server.Multis
|
|||
|
||||
for( int i = 0; i < length; ++i )
|
||||
{
|
||||
m_Fixtures[i].m_ItemID = reader.ReadShort();
|
||||
m_Fixtures[i].m_ItemID = reader.ReadUShort();
|
||||
m_Fixtures[i].m_OffsetX = reader.ReadShort();
|
||||
m_Fixtures[i].m_OffsetY = reader.ReadShort();
|
||||
m_Fixtures[i].m_OffsetZ = reader.ReadShort();
|
||||
|
|
@ -1774,7 +1774,7 @@ namespace Server.Multis
|
|||
{
|
||||
MultiTileEntry ent = m_Fixtures[i];
|
||||
|
||||
writer.Write( (short)ent.m_ItemID );
|
||||
writer.Write( (ushort)ent.m_ItemID );
|
||||
writer.Write( (short)ent.m_OffsetX );
|
||||
writer.Write( (short)ent.m_OffsetY );
|
||||
writer.Write( (short)ent.m_OffsetZ );
|
||||
|
|
@ -2229,7 +2229,7 @@ namespace Server.Multis
|
|||
int x = mte.m_OffsetX - xMin;
|
||||
int y = mte.m_OffsetY - yMin;
|
||||
int z = mte.m_OffsetZ;
|
||||
bool floor = (TileData.ItemTable[mte.m_ItemID & 0x3FFF].Height <= 0);
|
||||
bool floor = (TileData.ItemTable[mte.m_ItemID & TileData.MaxItemValue].Height <= 0);
|
||||
int plane, size;
|
||||
|
||||
switch( z )
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace Server.Multis
|
|||
int tileX = start.X + x;
|
||||
int tileY = start.Y + y;
|
||||
|
||||
Tile[] addTiles = mcl.Tiles[x][y];
|
||||
StaticTile[] addTiles = mcl.Tiles[x][y];
|
||||
|
||||
if ( addTiles.Length == 0 )
|
||||
continue; // There are no tiles here, continue checking somewhere else
|
||||
|
|
@ -117,10 +117,10 @@ namespace Server.Multis
|
|||
return HousePlacementResult.BadRegion;
|
||||
}
|
||||
|
||||
Tile landTile = map.Tiles.GetLandTile( tileX, tileY );
|
||||
int landID = landTile.ID & 0x3FFF;
|
||||
LandTile landTile = map.Tiles.GetLandTile( tileX, tileY );
|
||||
int landID = landTile.ID & TileData.MaxLandValue;
|
||||
|
||||
Tile[] oldTiles = map.Tiles.GetStaticTiles( tileX, tileY, true );
|
||||
StaticTile[] oldTiles = map.Tiles.GetStaticTiles( tileX, tileY, true );
|
||||
|
||||
Sector sector = map.GetSector( tileX, tileY );
|
||||
|
||||
|
|
@ -152,12 +152,12 @@ namespace Server.Multis
|
|||
|
||||
for ( int i = 0; i < addTiles.Length; ++i )
|
||||
{
|
||||
Tile addTile = addTiles[i];
|
||||
StaticTile addTile = addTiles[i];
|
||||
|
||||
if ( addTile.ID == 0x4001 ) // Nodraw
|
||||
if ( addTile.ID == 0x1 ) // Nodraw
|
||||
continue;
|
||||
|
||||
TileFlag addTileFlags = TileData.ItemTable[addTile.ID & 0x3FFF].Flags;
|
||||
TileFlag addTileFlags = TileData.ItemTable[addTile.ID & TileData.MaxItemValue].Flags;
|
||||
|
||||
bool isFoundation = ( addTile.Z == 0 && (addTileFlags & TileFlag.Wall) != 0 );
|
||||
bool hasSurface = false;
|
||||
|
|
@ -174,13 +174,13 @@ namespace Server.Multis
|
|||
if ( addTileTop > landStartZ && landAvgZ > addTileZ )
|
||||
return HousePlacementResult.BadLand; // Broke rule #2
|
||||
|
||||
if ( isFoundation && ((TileData.LandTable[landTile.ID & 0x3FFF].Flags & TileFlag.Impassable) == 0) && landAvgZ == center.Z )
|
||||
if ( isFoundation && ((TileData.LandTable[landTile.ID & TileData.MaxLandValue].Flags & TileFlag.Impassable) == 0) && landAvgZ == center.Z )
|
||||
hasSurface = true;
|
||||
|
||||
for ( int j = 0; j < oldTiles.Length; ++j )
|
||||
{
|
||||
Tile oldTile = oldTiles[j];
|
||||
ItemData id = TileData.ItemTable[oldTile.ID & 0x3FFF];
|
||||
StaticTile oldTile = oldTiles[j];
|
||||
ItemData id = TileData.ItemTable[oldTile.ID & TileData.MaxItemValue];
|
||||
|
||||
if ( (id.Impassable || (id.Surface && (id.Flags & TileFlag.Background) == 0)) && addTileTop > oldTile.Z && (oldTile.Z + id.CalcHeight) > addTileZ )
|
||||
return HousePlacementResult.BadStatic; // Broke rule #2
|
||||
|
|
@ -251,14 +251,14 @@ namespace Server.Multis
|
|||
|
||||
if ( vx >= 0 && vx < mcl.Width && vy >= 0 && vy < mcl.Height )
|
||||
{
|
||||
Tile[] breakTiles = mcl.Tiles[vx][vy];
|
||||
StaticTile[] breakTiles = mcl.Tiles[vx][vy];
|
||||
bool shouldBreak = false;
|
||||
|
||||
for ( int i = 0; !shouldBreak && i < breakTiles.Length; ++i )
|
||||
{
|
||||
Tile breakTile = breakTiles[i];
|
||||
StaticTile breakTile = breakTiles[i];
|
||||
|
||||
if ( breakTile.Height == 0 && breakTile.Z <= 8 && TileData.ItemTable[breakTile.ID & 0x3FFF].Surface )
|
||||
if ( breakTile.Height == 0 && breakTile.Z <= 8 && TileData.ItemTable[breakTile.ID & TileData.MaxItemValue].Surface )
|
||||
shouldBreak = true;
|
||||
}
|
||||
|
||||
|
|
@ -280,8 +280,8 @@ namespace Server.Multis
|
|||
{
|
||||
Point2D borderPoint = borders[i];
|
||||
|
||||
Tile landTile = map.Tiles.GetLandTile( borderPoint.X, borderPoint.Y );
|
||||
int landID = landTile.ID & 0x3FFF;
|
||||
LandTile landTile = map.Tiles.GetLandTile( borderPoint.X, borderPoint.Y );
|
||||
int landID = landTile.ID & TileData.MaxLandValue;
|
||||
|
||||
if ( (TileData.LandTable[landID].Flags & TileFlag.Impassable) != 0 )
|
||||
return HousePlacementResult.BadLand;
|
||||
|
|
@ -292,12 +292,12 @@ namespace Server.Multis
|
|||
return HousePlacementResult.BadLand; // Broke rule #5
|
||||
}
|
||||
|
||||
Tile[] tiles = map.Tiles.GetStaticTiles( borderPoint.X, borderPoint.Y, true );
|
||||
StaticTile[] tiles = map.Tiles.GetStaticTiles( borderPoint.X, borderPoint.Y, true );
|
||||
|
||||
for ( int j = 0; j < tiles.Length; ++j )
|
||||
{
|
||||
Tile tile = tiles[j];
|
||||
ItemData id = TileData.ItemTable[tile.ID & 0x3FFF];
|
||||
StaticTile tile = tiles[j];
|
||||
ItemData id = TileData.ItemTable[tile.ID & TileData.MaxItemValue];
|
||||
|
||||
if ( id.Impassable || (id.Surface && (id.Flags & TileFlag.Background) == 0 && (tile.Z + id.CalcHeight) > (center.Z + 2)) )
|
||||
return HousePlacementResult.BadStatic; // Broke rule #1
|
||||
|
|
@ -353,11 +353,11 @@ namespace Server.Multis
|
|||
|
||||
IPooledEnumerable eable = map.GetMultiTilesAt( yardPoint.X, yardPoint.Y );
|
||||
|
||||
foreach ( Tile[] tile in eable )
|
||||
foreach ( StaticTile[] tile in eable )
|
||||
{
|
||||
for ( int j = 0; j < tile.Length; ++j )
|
||||
{
|
||||
if ( (TileData.ItemTable[tile[j].ID & 0x3FFF].Flags & (TileFlag.Impassable | TileFlag.Surface)) != 0 )
|
||||
if ( (TileData.ItemTable[tile[j].ID & TileData.MaxItemValue].Flags & (TileFlag.Impassable | TileFlag.Surface)) != 0 )
|
||||
{
|
||||
eable.Free();
|
||||
return HousePlacementResult.BadStatic; // Broke rule #3
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Server.Multis
|
|||
|
||||
public override HouseDeed GetDeed()
|
||||
{
|
||||
switch ( ItemID ^ 0x4000 )
|
||||
switch ( ItemID )
|
||||
{
|
||||
case 0x64: return new StonePlasterHouseDeed();
|
||||
case 0x66: return new FieldStoneHouseDeed();
|
||||
|
|
@ -128,7 +128,7 @@ namespace Server.Multis
|
|||
|
||||
public override HouseDeed GetDeed()
|
||||
{
|
||||
switch( ItemID ^ 0x4000 )
|
||||
switch( ItemID )
|
||||
{
|
||||
case 0x76: return new TwoStoryWoodPlasterHouseDeed();
|
||||
case 0x78:
|
||||
|
|
@ -554,7 +554,7 @@ namespace Server.Multis
|
|||
|
||||
public override HouseDeed GetDeed()
|
||||
{
|
||||
switch ( ItemID ^ 0x4000 )
|
||||
switch ( ItemID )
|
||||
{
|
||||
case 0xA0: return new StoneWorkshopDeed();
|
||||
case 0xA2:
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Server.Multis
|
|||
private List<Item> m_Components;
|
||||
private Timer m_Timer;
|
||||
|
||||
public PreviewHouse( int multiID ) : base( multiID | 0x4000 )
|
||||
public PreviewHouse( int multiID ) : base( multiID )
|
||||
{
|
||||
m_Components = new List<Item>();
|
||||
|
||||
|
|
@ -123,7 +123,7 @@ namespace Server.Multis
|
|||
}
|
||||
}
|
||||
|
||||
Delete();
|
||||
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( this.Delete ) );
|
||||
}
|
||||
|
||||
private class DecayTimer : Timer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue