#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
8eae46895e
7512 changed files with 416187 additions and 0 deletions
64
Scripts/Items/Lights/BaseEquipableLight.cs
Normal file
64
Scripts/Items/Lights/BaseEquipableLight.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseEquipableLight : BaseLight
|
||||
{
|
||||
[Constructable]
|
||||
public BaseEquipableLight( int itemID ) : base( itemID )
|
||||
{
|
||||
Layer = Layer.TwoHanded;
|
||||
}
|
||||
|
||||
public BaseEquipableLight( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Ignite()
|
||||
{
|
||||
if ( !(Parent is Mobile) && RootParent is Mobile )
|
||||
{
|
||||
Mobile holder = (Mobile)RootParent;
|
||||
|
||||
if ( holder.EquipItem( this ) )
|
||||
{
|
||||
if ( this is Candle )
|
||||
holder.SendLocalizedMessage( 502969 ); // You put the candle in your left hand.
|
||||
else if ( this is Torch )
|
||||
holder.SendLocalizedMessage( 502971 ); // You put the torch in your left hand.
|
||||
|
||||
base.Ignite();
|
||||
}
|
||||
else
|
||||
{
|
||||
holder.SendLocalizedMessage( 502449 ); // You cannot hold this item.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
base.Ignite();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnAdded ( object parent )
|
||||
{
|
||||
if ( Burning && parent is Container )
|
||||
Douse();
|
||||
|
||||
base.OnAdded( parent );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
233
Scripts/Items/Lights/BaseLight.cs
Normal file
233
Scripts/Items/Lights/BaseLight.cs
Normal file
|
|
@ -0,0 +1,233 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseLight : Item
|
||||
{
|
||||
private Timer m_Timer;
|
||||
private DateTime m_End;
|
||||
private bool m_BurntOut = false;
|
||||
private bool m_Burning = false;
|
||||
private bool m_Protected = false;
|
||||
private TimeSpan m_Duration = TimeSpan.Zero;
|
||||
|
||||
public abstract int LitItemID{ get; }
|
||||
|
||||
public virtual int UnlitItemID{ get { return 0; } }
|
||||
public virtual int BurntOutItemID{ get { return 0; } }
|
||||
|
||||
public virtual int LitSound{ get { return 0x47; } }
|
||||
public virtual int UnlitSound{ get { return 0x3be; } }
|
||||
public virtual int BurntOutSound{ get { return 0x4b8; } }
|
||||
|
||||
public static readonly bool Burnout = false;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Burning
|
||||
{
|
||||
get { return m_Burning; }
|
||||
set
|
||||
{
|
||||
if ( m_Burning != value )
|
||||
{
|
||||
m_Burning = true;
|
||||
DoTimer( m_Duration );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool BurntOut
|
||||
{
|
||||
get { return m_BurntOut; }
|
||||
set { m_BurntOut = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Protected
|
||||
{
|
||||
get { return m_Protected; }
|
||||
set { m_Protected = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public TimeSpan Duration
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Duration != TimeSpan.Zero && m_Burning )
|
||||
{
|
||||
return m_End - DateTime.Now;
|
||||
}
|
||||
else
|
||||
return m_Duration;
|
||||
}
|
||||
|
||||
set { m_Duration = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BaseLight( int itemID ) : base( itemID )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseLight( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void PlayLitSound()
|
||||
{
|
||||
if ( LitSound != 0 )
|
||||
{
|
||||
Point3D loc = GetWorldLocation();
|
||||
Effects.PlaySound( loc, Map, LitSound );
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void PlayUnlitSound()
|
||||
{
|
||||
int sound = UnlitSound;
|
||||
|
||||
if ( m_BurntOut && BurntOutSound != 0 )
|
||||
sound = BurntOutSound;
|
||||
|
||||
|
||||
if ( sound != 0 )
|
||||
{
|
||||
Point3D loc = GetWorldLocation();
|
||||
Effects.PlaySound( loc, Map, sound );
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Ignite()
|
||||
{
|
||||
if ( !m_BurntOut )
|
||||
{
|
||||
PlayLitSound();
|
||||
|
||||
m_Burning = true;
|
||||
ItemID = LitItemID;
|
||||
DoTimer( m_Duration );
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Douse()
|
||||
{
|
||||
m_Burning = false;
|
||||
|
||||
if ( m_BurntOut && BurntOutItemID != 0 )
|
||||
ItemID = BurntOutItemID;
|
||||
else
|
||||
ItemID = UnlitItemID;
|
||||
|
||||
if ( m_BurntOut )
|
||||
m_Duration = TimeSpan.Zero;
|
||||
else if ( m_Duration != TimeSpan.Zero )
|
||||
m_Duration = m_End - DateTime.Now;
|
||||
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
PlayUnlitSound();
|
||||
}
|
||||
|
||||
public virtual void Burn()
|
||||
{
|
||||
m_BurntOut = true;
|
||||
Douse();
|
||||
}
|
||||
|
||||
private void DoTimer( TimeSpan delay )
|
||||
{
|
||||
m_Duration = delay;
|
||||
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
if ( delay == TimeSpan.Zero )
|
||||
return;
|
||||
|
||||
m_End = DateTime.Now + delay;
|
||||
|
||||
m_Timer = new InternalTimer( this, delay );
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( m_BurntOut )
|
||||
return;
|
||||
|
||||
if ( m_Protected && from.AccessLevel == AccessLevel.Player )
|
||||
return;
|
||||
|
||||
if ( !from.InRange( this.GetWorldLocation(), 2 ) )
|
||||
return;
|
||||
|
||||
if ( m_Burning )
|
||||
{
|
||||
if ( UnlitItemID != 0 )
|
||||
Douse();
|
||||
}
|
||||
else
|
||||
{
|
||||
Ignite();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 );
|
||||
writer.Write( m_BurntOut );
|
||||
writer.Write( m_Burning );
|
||||
writer.Write( m_Duration );
|
||||
writer.Write( m_Protected );
|
||||
|
||||
if ( m_Burning && m_Duration != TimeSpan.Zero )
|
||||
writer.WriteDeltaTime( m_End );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_BurntOut = reader.ReadBool();
|
||||
m_Burning = reader.ReadBool();
|
||||
m_Duration = reader.ReadTimeSpan();
|
||||
m_Protected = reader.ReadBool();
|
||||
|
||||
if ( m_Burning && m_Duration != TimeSpan.Zero )
|
||||
DoTimer( reader.ReadDeltaTime() - DateTime.Now );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private BaseLight m_Light;
|
||||
|
||||
public InternalTimer( BaseLight light, TimeSpan delay ) : base( delay )
|
||||
{
|
||||
m_Light = light;
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Light != null && !m_Light.Deleted )
|
||||
m_Light.Burn();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Items/Lights/Bonfire.cs
Normal file
37
Scripts/Items/Lights/Bonfire.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bonfire : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x03E4; } }
|
||||
public override int UnlitItemID{ get { return 0x03E3; } }
|
||||
|
||||
[Constructable]
|
||||
public Bonfire() : base( 0x03E3 )
|
||||
{
|
||||
Name = "bonefire";
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle300;
|
||||
Weight = 20.0;
|
||||
}
|
||||
|
||||
public Bonfire( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Scripts/Items/Lights/Brazier.cs
Normal file
36
Scripts/Items/Lights/Brazier.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Brazier : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0xE31; } }
|
||||
|
||||
[Constructable]
|
||||
public Brazier() : base( 0xE31 )
|
||||
{
|
||||
Movable = false;
|
||||
Duration = TimeSpan.Zero; // Never burnt out
|
||||
Burning = true;
|
||||
Light = LightType.Circle225;
|
||||
Weight = 20.0;
|
||||
}
|
||||
|
||||
public Brazier( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Scripts/Items/Lights/BrazierTall.cs
Normal file
36
Scripts/Items/Lights/BrazierTall.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BrazierTall : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x19AA; } }
|
||||
|
||||
[Constructable]
|
||||
public BrazierTall() : base( 0x19AA )
|
||||
{
|
||||
Movable = false;
|
||||
Duration = TimeSpan.Zero; // Never burnt out
|
||||
Burning = true;
|
||||
Light = LightType.Circle300;
|
||||
Weight = 25.0;
|
||||
}
|
||||
|
||||
public BrazierTall( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
75
Scripts/Items/Lights/Candelabra.cs
Normal file
75
Scripts/Items/Lights/Candelabra.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Candelabra : BaseLight, IShipwreckedItem
|
||||
{
|
||||
public override int LitItemID{ get { return 0xB1D; } }
|
||||
public override int UnlitItemID{ get { return 0xA27; } }
|
||||
|
||||
[Constructable]
|
||||
public Candelabra() : base( 0xA27 )
|
||||
{
|
||||
Duration = TimeSpan.Zero; // Never burnt out
|
||||
Burning = false;
|
||||
Light = LightType.Circle225;
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public Candelabra( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 1 );
|
||||
|
||||
writer.Write( m_IsShipwreckedItem );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_IsShipwreckedItem = reader.ReadBool();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
if ( m_IsShipwreckedItem )
|
||||
list.Add( 1041645 ); // recovered from a shipwreck
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
|
||||
if ( m_IsShipwreckedItem )
|
||||
LabelTo( from, 1041645 ); //recovered from a shipwreck
|
||||
}
|
||||
|
||||
#region IShipwreckedItem Members
|
||||
|
||||
private bool m_IsShipwreckedItem;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsShipwreckedItem
|
||||
{
|
||||
get { return m_IsShipwreckedItem; }
|
||||
set { m_IsShipwreckedItem = value; }
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
36
Scripts/Items/Lights/CandelabraStand.cs
Normal file
36
Scripts/Items/Lights/CandelabraStand.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CandelabraStand : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0xB26; } }
|
||||
public override int UnlitItemID{ get { return 0xA29; } }
|
||||
|
||||
[Constructable]
|
||||
public CandelabraStand() : base( 0xA29 )
|
||||
{
|
||||
Duration = TimeSpan.Zero; // Never burnt out
|
||||
Burning = false;
|
||||
Light = LightType.Circle225;
|
||||
Weight = 20.0;
|
||||
}
|
||||
|
||||
public CandelabraStand( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Items/Lights/Candle.cs
Normal file
40
Scripts/Items/Lights/Candle.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Candle : BaseEquipableLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0xA0F; } }
|
||||
public override int UnlitItemID{ get { return 0xA28; } }
|
||||
|
||||
[Constructable]
|
||||
public Candle() : base( 0xA28 )
|
||||
{
|
||||
if ( Burnout )
|
||||
Duration = TimeSpan.FromMinutes( 20 );
|
||||
else
|
||||
Duration = TimeSpan.Zero;
|
||||
|
||||
Burning = false;
|
||||
Light = LightType.Circle150;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Candle( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Scripts/Items/Lights/CandleLarge.cs
Normal file
36
Scripts/Items/Lights/CandleLarge.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CandleLarge : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0xB1A; } }
|
||||
public override int UnlitItemID{ get { return 0xA26; } }
|
||||
|
||||
[Constructable]
|
||||
public CandleLarge() : base( 0xA26 )
|
||||
{
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle150;
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public CandleLarge( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Scripts/Items/Lights/CandleLong.cs
Normal file
36
Scripts/Items/Lights/CandleLong.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CandleLong : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x1430; } }
|
||||
public override int UnlitItemID{ get { return 0x1433; } }
|
||||
|
||||
[Constructable]
|
||||
public CandleLong() : base( 0x1433 )
|
||||
{
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle150;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public CandleLong( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Scripts/Items/Lights/CandleMedium.cs
Normal file
36
Scripts/Items/Lights/CandleMedium.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CandleMedium : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x1434; } }
|
||||
public override int UnlitItemID{ get { return 0x1437; } }
|
||||
|
||||
[Constructable]
|
||||
public CandleMedium() : base( 0x1437 )
|
||||
{
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle150;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public CandleMedium( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
36
Scripts/Items/Lights/CandleShort.cs
Normal file
36
Scripts/Items/Lights/CandleShort.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CandleShort : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x142C; } }
|
||||
public override int UnlitItemID{ get { return 0x142F; } }
|
||||
|
||||
[Constructable]
|
||||
public CandleShort() : base( 0x142F )
|
||||
{
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle150;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public CandleShort( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Scripts/Items/Lights/CandleSkull.cs
Normal file
55
Scripts/Items/Lights/CandleSkull.cs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CandleSkull : BaseLight
|
||||
{
|
||||
public override int LitItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( ItemID == 0x1583 || ItemID == 0x1854 )
|
||||
return 0x1854;
|
||||
|
||||
return 0x1858;
|
||||
}
|
||||
}
|
||||
|
||||
public override int UnlitItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( ItemID == 0x1853 || ItemID == 0x1584 )
|
||||
return 0x1853;
|
||||
|
||||
return 0x1857;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CandleSkull() : base( 0x1853 )
|
||||
{
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle150;
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public CandleSkull( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
30
Scripts/Items/Lights/DarkSource.cs
Normal file
30
Scripts/Items/Lights/DarkSource.cs
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DarkSource : Item
|
||||
{
|
||||
[Constructable]
|
||||
public DarkSource() : base( 0x1646 )
|
||||
{
|
||||
Layer = Layer.TwoHanded;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public DarkSource( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Items/Lights/HangingLantern.cs
Normal file
37
Scripts/Items/Lights/HangingLantern.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HangingLantern : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0xA1A; } }
|
||||
public override int UnlitItemID{ get { return 0xA1D; } }
|
||||
|
||||
[Constructable]
|
||||
public HangingLantern() : base( 0xA1D )
|
||||
{
|
||||
Movable = false;
|
||||
Duration = TimeSpan.Zero; // Never burnt out
|
||||
Burning = false;
|
||||
Light = LightType.Circle300;
|
||||
Weight = 40.0;
|
||||
}
|
||||
|
||||
public HangingLantern( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
60
Scripts/Items/Lights/HeatingStand.cs
Normal file
60
Scripts/Items/Lights/HeatingStand.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HeatingStand : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x184A; } }
|
||||
public override int UnlitItemID{ get { return 0x1849; } }
|
||||
|
||||
[Constructable]
|
||||
public HeatingStand() : base( 0x1849 )
|
||||
{
|
||||
if ( Burnout )
|
||||
Duration = TimeSpan.FromMinutes( 25 );
|
||||
else
|
||||
Duration = TimeSpan.Zero;
|
||||
|
||||
Burning = false;
|
||||
Light = LightType.Empty;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override void Ignite()
|
||||
{
|
||||
base.Ignite();
|
||||
|
||||
if ( ItemID == LitItemID )
|
||||
Light = LightType.Circle150;
|
||||
else if ( ItemID == UnlitItemID )
|
||||
Light = LightType.Empty;
|
||||
}
|
||||
|
||||
public override void Douse()
|
||||
{
|
||||
base.Douse();
|
||||
|
||||
if ( ItemID == LitItemID )
|
||||
Light = LightType.Circle150;
|
||||
else if ( ItemID == UnlitItemID )
|
||||
Light = LightType.Empty;
|
||||
}
|
||||
|
||||
public HeatingStand( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Items/Lights/IronBrazier.cs
Normal file
37
Scripts/Items/Lights/IronBrazier.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class IronBrazier : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0xE31; } }
|
||||
public override int UnlitItemID{ get { return 0x1F20; } }
|
||||
|
||||
[Constructable]
|
||||
public IronBrazier() : base( 0x1F20 )
|
||||
{
|
||||
Name = "brazier";
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle225;
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public IronBrazier( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 1 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Items/Lights/IronBrazierShort.cs
Normal file
37
Scripts/Items/Lights/IronBrazierShort.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class IronBrazierShort : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x19BB; } }
|
||||
public override int UnlitItemID{ get { return 0x1F1F; } }
|
||||
|
||||
[Constructable]
|
||||
public IronBrazierShort() : base( 0x1F1F )
|
||||
{
|
||||
Name = "small brazier";
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle150;
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public IronBrazierShort( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Items/Lights/IronBrazierStand.cs
Normal file
37
Scripts/Items/Lights/IronBrazierStand.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class IronBrazierStand : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x19AA; } }
|
||||
public override int UnlitItemID{ get { return 0x1F21; } }
|
||||
|
||||
[Constructable]
|
||||
public IronBrazierStand() : base( 0x1F21 )
|
||||
{
|
||||
Name = "brazier stand";
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle225;
|
||||
Weight = 20.0;
|
||||
}
|
||||
|
||||
public IronBrazierStand( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Lights/IronCandelabra.cs
Normal file
38
Scripts/Items/Lights/IronCandelabra.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
public class IronCandelabra : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x0702; } }
|
||||
public override int UnlitItemID{ get { return 0x0701; } }
|
||||
|
||||
[Constructable]
|
||||
public IronCandelabra() : base( 0x0701 )
|
||||
{
|
||||
Name = "candelbra";
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle225;
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public IronCandelabra( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 1 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Lights/IronCandelabraStand.cs
Normal file
38
Scripts/Items/Lights/IronCandelabraStand.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
public class IronCandelabraStand : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x06F8; } }
|
||||
public override int UnlitItemID{ get { return 0x06F7; } }
|
||||
|
||||
[Constructable]
|
||||
public IronCandelabraStand() : base( 0x06F7 )
|
||||
{
|
||||
Name = "candelbra stand";
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle225;
|
||||
Weight = 20.0;
|
||||
}
|
||||
|
||||
public IronCandelabraStand( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
38
Scripts/Items/Lights/IronCandle.cs
Normal file
38
Scripts/Items/Lights/IronCandle.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
public class IronCandle : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0x0706; } }
|
||||
public override int UnlitItemID{ get { return 0x0705; } }
|
||||
|
||||
[Constructable]
|
||||
public IronCandle() : base( 0x0705 )
|
||||
{
|
||||
Name = "candle";
|
||||
Duration = TimeSpan.Zero;
|
||||
Burning = false;
|
||||
Light = LightType.Circle150;
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public IronCandle( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Items/Lights/LampPost1.cs
Normal file
37
Scripts/Items/Lights/LampPost1.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LampPost1 : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0xB20; } }
|
||||
public override int UnlitItemID{ get { return 0xB21; } }
|
||||
|
||||
[Constructable]
|
||||
public LampPost1() : base( 0xB21 )
|
||||
{
|
||||
Movable = false;
|
||||
Duration = TimeSpan.Zero; // Never burnt out
|
||||
Burning = false;
|
||||
Light = LightType.Circle300;
|
||||
Weight = 40.0;
|
||||
}
|
||||
|
||||
public LampPost1( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Items/Lights/LampPost2.cs
Normal file
37
Scripts/Items/Lights/LampPost2.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LampPost2 : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0xB22; } }
|
||||
public override int UnlitItemID{ get { return 0xB23; } }
|
||||
|
||||
[Constructable]
|
||||
public LampPost2() : base( 0xB23 )
|
||||
{
|
||||
Movable = false;
|
||||
Duration = TimeSpan.Zero; // Never burnt out
|
||||
Burning = false;
|
||||
Light = LightType.Circle300;
|
||||
Weight = 40.0;
|
||||
}
|
||||
|
||||
public LampPost2( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
37
Scripts/Items/Lights/LampPost3.cs
Normal file
37
Scripts/Items/Lights/LampPost3.cs
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LampPost3 : BaseLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0xB24; } }
|
||||
public override int UnlitItemID{ get { return 0xB25; } }
|
||||
|
||||
[Constructable]
|
||||
public LampPost3() : base( 0xb25 )
|
||||
{
|
||||
Movable = false;
|
||||
Duration = TimeSpan.Zero; // Never burnt out
|
||||
Burning = false;
|
||||
Light = LightType.Circle300;
|
||||
Weight = 40.0;
|
||||
}
|
||||
|
||||
public LampPost3( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
86
Scripts/Items/Lights/Lantern.cs
Normal file
86
Scripts/Items/Lights/Lantern.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Lantern : BaseEquipableLight
|
||||
{
|
||||
public override int LitItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( ItemID == 0xA15 || ItemID == 0xA17 )
|
||||
return ItemID;
|
||||
|
||||
return 0xA22;
|
||||
}
|
||||
}
|
||||
|
||||
public override int UnlitItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( ItemID == 0xA18 )
|
||||
return ItemID;
|
||||
|
||||
return 0xA25;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Lantern() : base( 0xA25 )
|
||||
{
|
||||
if ( Burnout )
|
||||
Duration = TimeSpan.FromMinutes( 20 );
|
||||
else
|
||||
Duration = TimeSpan.Zero;
|
||||
|
||||
Burning = false;
|
||||
Light = LightType.Circle300;
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Lantern( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class LanternOfSouls : Lantern
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1061618; } } // Lantern of Souls
|
||||
|
||||
[Constructable]
|
||||
public LanternOfSouls()
|
||||
{
|
||||
Hue = 0x482;
|
||||
}
|
||||
|
||||
public LanternOfSouls( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Scripts/Items/Lights/LightSource.cs
Normal file
55
Scripts/Items/Lights/LightSource.cs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LightSource : Item
|
||||
{
|
||||
[Constructable]
|
||||
public LightSource() : base( 0x1647 )
|
||||
{
|
||||
Layer = Layer.TwoHanded;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public LightSource( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class LighterSource : Item
|
||||
{
|
||||
[Constructable]
|
||||
public LighterSource() : base( 0x0E84 )
|
||||
{
|
||||
Layer = Layer.TwoHanded;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public LighterSource( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Items/Lights/Torch.cs
Normal file
46
Scripts/Items/Lights/Torch.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Torch : BaseEquipableLight
|
||||
{
|
||||
public override int LitItemID{ get { return 0xA12; } }
|
||||
public override int UnlitItemID{ get { return 0xF6B; } }
|
||||
|
||||
public override int LitSound{ get { return 0x54; } }
|
||||
public override int UnlitSound{ get { return 0x4BB; } }
|
||||
|
||||
[Constructable]
|
||||
public Torch() : base( 0xF6B )
|
||||
{
|
||||
if ( Burnout )
|
||||
Duration = TimeSpan.FromMinutes( 30 );
|
||||
else
|
||||
Duration = TimeSpan.Zero;
|
||||
|
||||
Burning = false;
|
||||
Light = LightType.Circle300;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public Torch( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( Weight == 2.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Scripts/Items/Lights/WallSconce.cs
Normal file
74
Scripts/Items/Lights/WallSconce.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable]
|
||||
public class WallSconce : BaseLight
|
||||
{
|
||||
public override int LitItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( ItemID == 0x9FB )
|
||||
return 0x9FD;
|
||||
else
|
||||
return 0xA02;
|
||||
}
|
||||
}
|
||||
|
||||
public override int UnlitItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( ItemID == 0x9FD )
|
||||
return 0x9FB;
|
||||
else
|
||||
return 0xA00;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WallSconce() : base( 0x9FB )
|
||||
{
|
||||
Movable = false;
|
||||
Duration = TimeSpan.Zero; // Never burnt out
|
||||
Burning = false;
|
||||
Light = LightType.WestBig;
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public WallSconce( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public void Flip()
|
||||
{
|
||||
if ( Light == LightType.WestBig )
|
||||
Light = LightType.NorthBig;
|
||||
else if ( Light == LightType.NorthBig )
|
||||
Light = LightType.WestBig;
|
||||
|
||||
switch ( ItemID )
|
||||
{
|
||||
case 0x9FB: ItemID = 0xA00; break;
|
||||
case 0x9FD: ItemID = 0xA02; break;
|
||||
|
||||
case 0xA00: ItemID = 0x9FB; break;
|
||||
case 0xA02: ItemID = 0x9FD; break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Scripts/Items/Lights/WallTorch.cs
Normal file
74
Scripts/Items/Lights/WallTorch.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable]
|
||||
public class WallTorch : BaseLight
|
||||
{
|
||||
public override int LitItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( ItemID == 0xA05 )
|
||||
return 0xA07;
|
||||
else
|
||||
return 0xA0C;
|
||||
}
|
||||
}
|
||||
|
||||
public override int UnlitItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( ItemID == 0xA07 )
|
||||
return 0xA05;
|
||||
else
|
||||
return 0xA0A;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WallTorch() : base( 0xA05 )
|
||||
{
|
||||
Movable = false;
|
||||
Duration = TimeSpan.Zero; // Never burnt out
|
||||
Burning = false;
|
||||
Light = LightType.WestBig;
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public WallTorch( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public void Flip()
|
||||
{
|
||||
if ( Light == LightType.WestBig )
|
||||
Light = LightType.NorthBig;
|
||||
else if ( Light == LightType.NorthBig )
|
||||
Light = LightType.WestBig;
|
||||
|
||||
switch ( ItemID )
|
||||
{
|
||||
case 0xA05: ItemID = 0xA0A; break;
|
||||
case 0xA07: ItemID = 0xA0C; break;
|
||||
|
||||
case 0xA0A: ItemID = 0xA05; break;
|
||||
case 0xA0C: ItemID = 0xA07; break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue