#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
589
Scripts/Items/Construction/Doors/BaseDoor.cs
Normal file
589
Scripts/Items/Construction/Doors/BaseDoor.cs
Normal file
|
|
@ -0,0 +1,589 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Commands;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseDoor : Item, ILockable, ITelekinesisable
|
||||
{
|
||||
private bool m_Open, m_Locked;
|
||||
private int m_OpenedID, m_OpenedSound;
|
||||
private int m_ClosedID, m_ClosedSound;
|
||||
private Point3D m_Offset;
|
||||
private BaseDoor m_Link;
|
||||
private uint m_KeyValue;
|
||||
|
||||
private Timer m_Timer;
|
||||
|
||||
private static Point3D[] m_Offsets = new Point3D[]
|
||||
{
|
||||
new Point3D(-1, 1, 0 ),
|
||||
new Point3D( 1, 1, 0 ),
|
||||
new Point3D(-1, 0, 0 ),
|
||||
new Point3D( 1,-1, 0 ),
|
||||
new Point3D( 1, 1, 0 ),
|
||||
new Point3D( 1,-1, 0 ),
|
||||
new Point3D( 0, 0, 0 ),
|
||||
new Point3D( 0,-1, 0 ),
|
||||
|
||||
new Point3D( 0, 0, 0 ),
|
||||
new Point3D( 0, 0, 0 ),
|
||||
new Point3D( 0, 0, 0 ),
|
||||
new Point3D( 0, 0, 0 )
|
||||
};
|
||||
|
||||
// Called by RunUO
|
||||
public static void Initialize()
|
||||
{
|
||||
EventSink.OpenDoorMacroUsed += new OpenDoorMacroEventHandler( EventSink_OpenDoorMacroUsed );
|
||||
|
||||
CommandSystem.Register( "Link", AccessLevel.GameMaster, new CommandEventHandler( Link_OnCommand ) );
|
||||
CommandSystem.Register( "ChainLink", AccessLevel.GameMaster, new CommandEventHandler( ChainLink_OnCommand ) );
|
||||
}
|
||||
|
||||
[Usage( "Link" )]
|
||||
[Description( "Links two targeted doors together." )]
|
||||
private static void Link_OnCommand( CommandEventArgs e )
|
||||
{
|
||||
e.Mobile.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( Link_OnFirstTarget ) );
|
||||
e.Mobile.SendMessage( "Target the first door to link." );
|
||||
}
|
||||
|
||||
private static void Link_OnFirstTarget( Mobile from, object targeted )
|
||||
{
|
||||
BaseDoor door = targeted as BaseDoor;
|
||||
|
||||
if ( door == null )
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetCallback( Link_OnFirstTarget ) );
|
||||
from.SendMessage( "That is not a door. Try again." );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetStateCallback( Link_OnSecondTarget ), door );
|
||||
from.SendMessage( "Target the second door to link." );
|
||||
}
|
||||
}
|
||||
|
||||
private static void Link_OnSecondTarget( Mobile from, object targeted, object state )
|
||||
{
|
||||
BaseDoor first = (BaseDoor)state;
|
||||
BaseDoor second = targeted as BaseDoor;
|
||||
|
||||
if ( second == null )
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetStateCallback( Link_OnSecondTarget ), first );
|
||||
from.SendMessage( "That is not a door. Try again." );
|
||||
}
|
||||
else
|
||||
{
|
||||
first.Link = second;
|
||||
second.Link = first;
|
||||
from.SendMessage( "The doors have been linked." );
|
||||
}
|
||||
}
|
||||
|
||||
[Usage( "ChainLink" )]
|
||||
[Description( "Chain-links two or more targeted doors together." )]
|
||||
private static void ChainLink_OnCommand( CommandEventArgs e )
|
||||
{
|
||||
e.Mobile.BeginTarget( -1, false, TargetFlags.None, new TargetStateCallback( ChainLink_OnTarget ), new List<BaseDoor>() );
|
||||
e.Mobile.SendMessage( "Target the first of a sequence of doors to link." );
|
||||
}
|
||||
|
||||
private static void ChainLink_OnTarget( Mobile from, object targeted, object state )
|
||||
{
|
||||
BaseDoor door = targeted as BaseDoor;
|
||||
|
||||
if ( door == null )
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetStateCallback( ChainLink_OnTarget ), state );
|
||||
from.SendMessage( "That is not a door. Try again." );
|
||||
}
|
||||
else
|
||||
{
|
||||
List<BaseDoor> list = (List<BaseDoor>)state;
|
||||
|
||||
if ( list.Count > 0 && list[0] == door )
|
||||
{
|
||||
if ( list.Count >= 2 )
|
||||
{
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
list[i].Link = list[(i + 1) % list.Count];
|
||||
|
||||
from.SendMessage( "The chain of doors have been linked." );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetStateCallback( ChainLink_OnTarget ), state );
|
||||
from.SendMessage( "You have not yet targeted two unique doors. Target the second door to link." );
|
||||
}
|
||||
}
|
||||
else if ( list.Contains( door ) )
|
||||
{
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetStateCallback( ChainLink_OnTarget ), state );
|
||||
from.SendMessage( "You have already targeted that door. Target another door, or retarget the first door to complete the chain." );
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add( door );
|
||||
|
||||
from.BeginTarget( -1, false, TargetFlags.None, new TargetStateCallback( ChainLink_OnTarget ), state );
|
||||
|
||||
if ( list.Count == 1 )
|
||||
from.SendMessage( "Target the second door to link." );
|
||||
else
|
||||
from.SendMessage( "Target another door to link. To complete the chain, retarget the first door." );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void EventSink_OpenDoorMacroUsed( OpenDoorMacroEventArgs args )
|
||||
{
|
||||
Mobile m = args.Mobile;
|
||||
|
||||
if ( m.Map != null )
|
||||
{
|
||||
int x = m.X, y = m.Y;
|
||||
|
||||
switch ( m.Direction & Direction.Mask )
|
||||
{
|
||||
case Direction.North: --y; break;
|
||||
case Direction.Right: ++x; --y; break;
|
||||
case Direction.East: ++x; break;
|
||||
case Direction.Down: ++x; ++y; break;
|
||||
case Direction.South: ++y; break;
|
||||
case Direction.Left: --x; ++y; break;
|
||||
case Direction.West: --x; break;
|
||||
case Direction.Up: --x; --y; break;
|
||||
}
|
||||
|
||||
Sector sector = m.Map.GetSector( x, y );
|
||||
|
||||
foreach ( Item item in sector.Items )
|
||||
{
|
||||
if ( item.Location.X == x && item.Location.Y == y && (item.Z + item.ItemData.Height) > m.Z && (m.Z + 16) > item.Z && item is BaseDoor && m.CanSee( item ) && m.InLOS( item ) )
|
||||
{
|
||||
if ( m.CheckAlive() )
|
||||
{
|
||||
m.SendLocalizedMessage( 500024 ); // Opening door...
|
||||
item.OnDoubleClick( m );
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Point3D GetOffset( DoorFacing facing )
|
||||
{
|
||||
return m_Offsets[(int)facing];
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private BaseDoor m_Door;
|
||||
|
||||
public InternalTimer( BaseDoor door ) : base( TimeSpan.FromSeconds( 20.0 ), TimeSpan.FromSeconds( 10.0 ) )
|
||||
{
|
||||
Priority = TimerPriority.OneSecond;
|
||||
m_Door = door;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Door.Open && m_Door.IsFreeToClose() )
|
||||
m_Door.Open = false;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Locked
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Locked;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Locked = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public uint KeyValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_KeyValue;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_KeyValue = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Open
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Open;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( m_Open != value )
|
||||
{
|
||||
m_Open = value;
|
||||
|
||||
ItemID = m_Open ? m_OpenedID : m_ClosedID;
|
||||
|
||||
if ( m_Open )
|
||||
Location = new Point3D( X + m_Offset.X, Y + m_Offset.Y, Z + m_Offset.Z );
|
||||
else
|
||||
Location = new Point3D( X - m_Offset.X, Y - m_Offset.Y, Z - m_Offset.Z );
|
||||
|
||||
Effects.PlaySound( this, Map, m_Open ? m_OpenedSound : m_ClosedSound );
|
||||
|
||||
if ( m_Open )
|
||||
m_Timer.Start();
|
||||
else
|
||||
m_Timer.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanClose()
|
||||
{
|
||||
if ( !m_Open )
|
||||
return true;
|
||||
|
||||
Map map = Map;
|
||||
|
||||
if ( map == null )
|
||||
return false;
|
||||
|
||||
Point3D p = new Point3D( X - m_Offset.X, Y - m_Offset.Y, Z - m_Offset.Z );
|
||||
|
||||
return CheckFit( map, p, 16 );
|
||||
}
|
||||
|
||||
private bool CheckFit( Map map, Point3D p, int height )
|
||||
{
|
||||
if ( map == Map.Internal )
|
||||
return false;
|
||||
|
||||
int x = p.X;
|
||||
int y = p.Y;
|
||||
int z = p.Z;
|
||||
|
||||
Sector sector = map.GetSector( x, y );
|
||||
List<Item> items = sector.Items;
|
||||
List<Mobile> mobs = sector.Mobiles;
|
||||
|
||||
for ( int i = 0; i < items.Count; ++i )
|
||||
{
|
||||
Item item = items[i];
|
||||
|
||||
if ( !(item is BaseMulti) && item.ItemID <= TileData.MaxItemValue && item.AtWorldPoint( x, y ) && !(item is BaseDoor) )
|
||||
{
|
||||
ItemData id = item.ItemData;
|
||||
bool surface = id.Surface;
|
||||
bool impassable = id.Impassable;
|
||||
|
||||
if ( (surface || impassable) && (item.Z + id.CalcHeight) > z && (z + height) > item.Z )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
for ( int i = 0; i < mobs.Count; ++i )
|
||||
{
|
||||
Mobile m = mobs[i];
|
||||
|
||||
if ( m.Location.X == x && m.Location.Y == y )
|
||||
{
|
||||
if ( m.Hidden && m.AccessLevel > AccessLevel.Player )
|
||||
continue;
|
||||
|
||||
if ( !m.Alive )
|
||||
continue;
|
||||
|
||||
if ( (m.Z + 16) > z && (z + height) > m.Z )
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int OpenedID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OpenedID;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_OpenedID = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int ClosedID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ClosedID;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_ClosedID = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int OpenedSound
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_OpenedSound;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_OpenedSound = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int ClosedSound
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_ClosedSound;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_ClosedSound = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Point3D Offset
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Offset;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Offset = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public BaseDoor Link
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Link != null && m_Link.Deleted )
|
||||
m_Link = null;
|
||||
|
||||
return m_Link;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Link = value;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool UseChainedFunctionality{ get{ return false; } }
|
||||
|
||||
public List<BaseDoor> GetChain()
|
||||
{
|
||||
List<BaseDoor> list = new List<BaseDoor>();
|
||||
BaseDoor c = this;
|
||||
|
||||
do
|
||||
{
|
||||
list.Add( c );
|
||||
c = c.Link;
|
||||
} while ( c != null && !list.Contains( c ) );
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public bool IsFreeToClose()
|
||||
{
|
||||
if ( !UseChainedFunctionality )
|
||||
return CanClose();
|
||||
|
||||
List<BaseDoor> list = GetChain();
|
||||
|
||||
bool freeToClose = true;
|
||||
|
||||
for ( int i = 0; freeToClose && i < list.Count; ++i )
|
||||
freeToClose = list[i].CanClose();
|
||||
|
||||
return freeToClose;
|
||||
}
|
||||
|
||||
public void OnTelekinesis( Mobile from )
|
||||
{
|
||||
Effects.SendLocationParticles( EffectItem.Create( Location, Map, EffectItem.DefaultDuration ), 0x376A, 9, 32, 5022 );
|
||||
Effects.PlaySound( Location, Map, 0x1F5 );
|
||||
|
||||
Use( from );
|
||||
}
|
||||
|
||||
public virtual bool IsInside( Mobile from )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual bool UseLocks()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void Use( Mobile from )
|
||||
{
|
||||
if ( m_Locked && !m_Open && UseLocks() )
|
||||
{
|
||||
if ( from.AccessLevel >= AccessLevel.GameMaster )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 502502 ); // That is locked, but you open it with your godly powers.
|
||||
//from.Send( new MessageLocalized( Serial, ItemID, MessageType.Regular, 0x3B2, 3, 502502, "", "" ) ); // That is locked, but you open it with your godly powers.
|
||||
}
|
||||
else if ( Key.ContainsKey( from.Backpack, this.KeyValue ) )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501282 ); // You quickly unlock, open, and relock the door
|
||||
}
|
||||
else if ( IsInside( from ) )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501280 ); // That is locked, but is usable from the inside.
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( Hue == 0x44E && Map == Map.Malas ) // doom door into healer room in doom
|
||||
this.SendLocalizedMessageTo( from, 1060014 ); // Only the dead may pass.
|
||||
else
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 502503 ); // That is locked.
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_Open && !IsFreeToClose() )
|
||||
return;
|
||||
|
||||
if ( m_Open )
|
||||
OnClosed( from );
|
||||
else
|
||||
OnOpened( from );
|
||||
|
||||
if ( UseChainedFunctionality )
|
||||
{
|
||||
bool open = !m_Open;
|
||||
|
||||
List<BaseDoor> list = GetChain();
|
||||
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
list[i].Open = open;
|
||||
}
|
||||
else
|
||||
{
|
||||
Open = !m_Open;
|
||||
|
||||
BaseDoor link = this.Link;
|
||||
|
||||
if ( m_Open && link != null && !link.Open )
|
||||
link.Open = true;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnOpened( Mobile from )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnClosed( Mobile from )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.AccessLevel == AccessLevel.Player && (/*!from.InLOS( this ) || */!from.InRange( GetWorldLocation(), 2 )) )
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
else
|
||||
Use( from );
|
||||
}
|
||||
|
||||
public BaseDoor( int closedID, int openedID, int openedSound, int closedSound, Point3D offset ) : base( closedID )
|
||||
{
|
||||
m_OpenedID = openedID;
|
||||
m_ClosedID = closedID;
|
||||
m_OpenedSound = openedSound;
|
||||
m_ClosedSound = closedSound;
|
||||
m_Offset = offset;
|
||||
|
||||
m_Timer = new InternalTimer( this );
|
||||
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public BaseDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( m_KeyValue );
|
||||
|
||||
writer.Write( m_Open );
|
||||
writer.Write( m_Locked );
|
||||
writer.Write( m_OpenedID );
|
||||
writer.Write( m_ClosedID );
|
||||
writer.Write( m_OpenedSound );
|
||||
writer.Write( m_ClosedSound );
|
||||
writer.Write( m_Offset );
|
||||
writer.Write( m_Link );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_KeyValue = reader.ReadUInt();
|
||||
m_Open = reader.ReadBool();
|
||||
m_Locked = reader.ReadBool();
|
||||
m_OpenedID = reader.ReadInt();
|
||||
m_ClosedID = reader.ReadInt();
|
||||
m_OpenedSound = reader.ReadInt();
|
||||
m_ClosedSound = reader.ReadInt();
|
||||
m_Offset = reader.ReadPoint3D();
|
||||
m_Link = reader.ReadItem() as BaseDoor;
|
||||
|
||||
m_Timer = new InternalTimer( this );
|
||||
|
||||
if ( m_Open )
|
||||
m_Timer.Start();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
359
Scripts/Items/Construction/Doors/Doors.cs
Normal file
359
Scripts/Items/Construction/Doors/Doors.cs
Normal file
|
|
@ -0,0 +1,359 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum DoorFacing
|
||||
{
|
||||
WestCW,
|
||||
EastCCW,
|
||||
WestCCW,
|
||||
EastCW,
|
||||
SouthCW,
|
||||
NorthCCW,
|
||||
SouthCCW,
|
||||
NorthCW,
|
||||
//Sliding Doors
|
||||
SouthSW,
|
||||
SouthSE,
|
||||
WestSS,
|
||||
WestSN
|
||||
}
|
||||
|
||||
public class IronGateShort : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public IronGateShort( DoorFacing facing ) : base( 0x84c + (2 * (int)facing), 0x84d + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public IronGateShort( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class IronGate : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public IronGate( DoorFacing facing ) : base( 0x824 + (2 * (int)facing), 0x825 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public IronGate( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class LightWoodGate : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public LightWoodGate( DoorFacing facing ) : base( 0x839 + (2 * (int)facing), 0x83A + (2 * (int)facing), 0xEB, 0xF2, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public LightWoodGate( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class DarkWoodGate : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public DarkWoodGate( DoorFacing facing ) : base( 0x866 + (2 * (int)facing), 0x867 + (2 * (int)facing), 0xEB, 0xF2, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public DarkWoodGate( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class MetalDoor : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public MetalDoor( DoorFacing facing ) : base( 0x675 + (2 * (int)facing), 0x676 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public MetalDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BarredMetalDoor : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public BarredMetalDoor( DoorFacing facing ) : base( 0x685 + (2 * (int)facing), 0x686 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public BarredMetalDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BarredMetalDoor2 : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public BarredMetalDoor2( DoorFacing facing ) : base( 0x1FED + (2 * (int)facing), 0x1FEE + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public BarredMetalDoor2( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class RattanDoor : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public RattanDoor( DoorFacing facing ) : base( 0x695 + (2 * (int)facing), 0x696 + (2 * (int)facing), 0xEB, 0xF2, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public RattanDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class DarkWoodDoor : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public DarkWoodDoor( DoorFacing facing ) : base( 0x6A5 + (2 * (int)facing), 0x6A6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public DarkWoodDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class MediumWoodDoor : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public MediumWoodDoor( DoorFacing facing ) : base( 0x6B5 + (2 * (int)facing), 0x6B6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public MediumWoodDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class MetalDoor2 : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public MetalDoor2( DoorFacing facing ) : base( 0x6C5 + (2 * (int)facing), 0x6C6 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public MetalDoor2( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class LightWoodDoor : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public LightWoodDoor( DoorFacing facing ) : base( 0x6D5 + (2 * (int)facing), 0x6D6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public LightWoodDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class StrongWoodDoor : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public StrongWoodDoor( DoorFacing facing ) : base( 0x6E5 + (2 * (int)facing), 0x6E6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public StrongWoodDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
253
Scripts/Items/Construction/Doors/HouseDoors.cs
Normal file
253
Scripts/Items/Construction/Doors/HouseDoors.cs
Normal file
|
|
@ -0,0 +1,253 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Multis;
|
||||
using Server.Gumps;
|
||||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MetalHouseDoor : BaseHouseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public MetalHouseDoor( DoorFacing facing ) : base( facing, 0x675 + (2 * (int)facing), 0x676 + (2 * (int)facing), 0xEC, 0xF3, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public MetalHouseDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class DarkWoodHouseDoor : BaseHouseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public DarkWoodHouseDoor( DoorFacing facing ) : base( facing, 0x6A5 + (2 * (int)facing), 0x6A6 + (2 * (int)facing), 0xEA, 0xF1, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public DarkWoodHouseDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GenericHouseDoor : BaseHouseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public GenericHouseDoor( DoorFacing facing, int baseItemID, int openedSound, int closedSound ) : this( facing, baseItemID, openedSound, closedSound, true )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GenericHouseDoor( DoorFacing facing, int baseItemID, int openedSound, int closedSound, bool autoAdjust )
|
||||
: base( facing, baseItemID + (autoAdjust ? (2 * (int)facing) : 0), baseItemID + 1 + (autoAdjust ? (2 * (int)facing) : 0), openedSound, closedSound, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public GenericHouseDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class BaseHouseDoor : BaseDoor, ISecurable
|
||||
{
|
||||
private DoorFacing m_Facing;
|
||||
private SecureLevel m_Level;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DoorFacing Facing
|
||||
{
|
||||
get{ return m_Facing; }
|
||||
set{ m_Facing = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SecureLevel Level
|
||||
{
|
||||
get{ return m_Level; }
|
||||
set{ m_Level = value; }
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
SetSecureLevelEntry.AddTo( from, this, list );
|
||||
}
|
||||
|
||||
public BaseHouseDoor( DoorFacing facing, int closedID, int openedID, int openedSound, int closedSound, Point3D offset ) : base( closedID, openedID, openedSound, closedSound, offset )
|
||||
{
|
||||
m_Facing = facing;
|
||||
m_Level = SecureLevel.Anyone;
|
||||
}
|
||||
|
||||
public BaseHouse FindHouse()
|
||||
{
|
||||
Point3D loc;
|
||||
|
||||
if ( Open )
|
||||
loc = new Point3D( X - Offset.X, Y - Offset.Y, Z - Offset.Z );
|
||||
else
|
||||
loc = this.Location;
|
||||
|
||||
return BaseHouse.FindHouseAt( loc, Map, 20 );
|
||||
}
|
||||
|
||||
public bool CheckAccess( Mobile m )
|
||||
{
|
||||
BaseHouse house = FindHouse();
|
||||
|
||||
if ( house == null )
|
||||
return false;
|
||||
|
||||
if ( !house.IsAosRules )
|
||||
return true;
|
||||
|
||||
if ( house.Public ? house.IsBanned( m ) : !house.HasAccess( m ) )
|
||||
return false;
|
||||
|
||||
return house.HasSecureAccess( m, m_Level );
|
||||
}
|
||||
|
||||
public override void OnOpened( Mobile from )
|
||||
{
|
||||
BaseHouse house = FindHouse();
|
||||
|
||||
if ( house != null && house.IsFriend( from ) && from.AccessLevel == AccessLevel.Player && house.RefreshDecay() )
|
||||
from.SendLocalizedMessage( 1043293 ); // Your house's age and contents have been refreshed.
|
||||
|
||||
if ( house != null && house.Public && !house.IsFriend( from ) )
|
||||
house.Visits++;
|
||||
}
|
||||
|
||||
public override bool UseLocks()
|
||||
{
|
||||
BaseHouse house = FindHouse();
|
||||
|
||||
return ( house == null || !house.IsAosRules );
|
||||
}
|
||||
|
||||
public override void Use( Mobile from )
|
||||
{
|
||||
if ( !CheckAccess( from ) )
|
||||
from.SendLocalizedMessage( 1061637 ); // You are not allowed to access this.
|
||||
else
|
||||
base.Use( from );
|
||||
}
|
||||
|
||||
public BaseHouseDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Level );
|
||||
|
||||
writer.Write( (int) m_Facing );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Level = (SecureLevel)reader.ReadInt();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
if ( version < 1 )
|
||||
m_Level = SecureLevel.Anyone;
|
||||
|
||||
m_Facing = (DoorFacing)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsInside( Mobile from )
|
||||
{
|
||||
int x,y,w,h;
|
||||
|
||||
const int r = 2;
|
||||
const int bs = r*2+1;
|
||||
const int ss = r+1;
|
||||
|
||||
switch ( m_Facing )
|
||||
{
|
||||
case DoorFacing.WestCW:
|
||||
case DoorFacing.EastCCW: x = -r; y = -r; w = bs; h = ss; break;
|
||||
|
||||
case DoorFacing.EastCW:
|
||||
case DoorFacing.WestCCW: x = -r; y = 0; w = bs; h = ss; break;
|
||||
|
||||
case DoorFacing.SouthCW:
|
||||
case DoorFacing.NorthCCW: x = -r; y = -r; w = ss; h = bs; break;
|
||||
|
||||
case DoorFacing.NorthCW:
|
||||
case DoorFacing.SouthCCW: x = 0; y = -r; w = ss; h = bs; break;
|
||||
|
||||
//No way to test the 'insideness' of SE Sliding doors on OSI, so leaving them default to false until furthur information gained
|
||||
|
||||
default: return false;
|
||||
}
|
||||
|
||||
int rx = from.X - X;
|
||||
int ry = from.Y - Y;
|
||||
int az = Math.Abs( from.Z - Z );
|
||||
|
||||
return ( rx >= x && rx < (x+w) && ry >= y && ry < (y+h) && az <= 4 );
|
||||
}
|
||||
}
|
||||
}
|
||||
60
Scripts/Items/Construction/Doors/Portcullis.cs
Normal file
60
Scripts/Items/Construction/Doors/Portcullis.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PortcullisNS : BaseDoor
|
||||
{
|
||||
public override bool UseChainedFunctionality{ get{ return true; } }
|
||||
|
||||
[Constructable]
|
||||
public PortcullisNS() : base( 0x6F5, 0x6F5, 0xF0, 0xEF, new Point3D( 0, 0, 20 ) )
|
||||
{
|
||||
}
|
||||
|
||||
public PortcullisNS( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class PortcullisEW : BaseDoor
|
||||
{
|
||||
public override bool UseChainedFunctionality{ get{ return true; } }
|
||||
|
||||
[Constructable]
|
||||
public PortcullisEW() : base( 0x6F6, 0x6F6, 0xF0, 0xEF, new Point3D( 0, 0, 20 ) )
|
||||
{
|
||||
}
|
||||
|
||||
public PortcullisEW( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
160
Scripts/Items/Construction/Doors/SecretDoors.cs
Normal file
160
Scripts/Items/Construction/Doors/SecretDoors.cs
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SecretStoneDoor1 : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public SecretStoneDoor1( DoorFacing facing ) : base( 0xE8 + (2 * (int)facing), 0xE9 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public SecretStoneDoor1( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SecretDungeonDoor : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public SecretDungeonDoor( DoorFacing facing ) : base( 0x314 + (2 * (int)facing), 0x315 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public SecretDungeonDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SecretStoneDoor2 : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public SecretStoneDoor2( DoorFacing facing ) : base( 0x324 + (2 * (int)facing), 0x325 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public SecretStoneDoor2( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SecretWoodenDoor : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public SecretWoodenDoor( DoorFacing facing ) : base( 0x334 + (2 * (int)facing), 0x335 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public SecretWoodenDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SecretLightWoodDoor : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public SecretLightWoodDoor( DoorFacing facing ) : base( 0x344 + (2 * (int)facing), 0x345 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public SecretLightWoodDoor( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SecretStoneDoor3 : BaseDoor
|
||||
{
|
||||
[Constructable]
|
||||
public SecretStoneDoor3( DoorFacing facing ) : base( 0x354 + (2 * (int)facing), 0x355 + (2 * (int)facing), 0xED, 0xF4, BaseDoor.GetOffset( facing ) )
|
||||
{
|
||||
}
|
||||
|
||||
public SecretStoneDoor3( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer ) // Default Serialize method
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader ) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue