Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -4,301 +4,298 @@ using Server.Multis;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum HolidayTreeType
|
||||
{
|
||||
Classic,
|
||||
Modern
|
||||
}
|
||||
public enum HolidayTreeType
|
||||
{
|
||||
Classic,
|
||||
Modern
|
||||
}
|
||||
|
||||
public class HolidayTree : Item, IAddon
|
||||
{
|
||||
private ArrayList m_Components;
|
||||
public class HolidayTree : Item, IAddon
|
||||
{
|
||||
private ArrayList m_Components;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Placer { get; set; }
|
||||
public HolidayTree(Mobile from, HolidayTreeType type, Point3D loc) : base(1)
|
||||
{
|
||||
Movable = false;
|
||||
MoveToWorld(loc, from.Map);
|
||||
|
||||
private class Ornament : Item
|
||||
{
|
||||
public override int LabelNumber => 1041118; // a tree ornament
|
||||
Placer = from;
|
||||
m_Components = new ArrayList();
|
||||
|
||||
public Ornament( int itemID ) : base( itemID )
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
switch (type)
|
||||
{
|
||||
case HolidayTreeType.Classic:
|
||||
{
|
||||
ItemID = 0xCD7;
|
||||
|
||||
public Ornament( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
AddItem(0, 0, 0, new TreeTrunk(this, 0xCD6));
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
AddOrnament(0, 0, 2, 0xF22);
|
||||
AddOrnament(0, 0, 9, 0xF18);
|
||||
AddOrnament(0, 0, 15, 0xF20);
|
||||
AddOrnament(0, 0, 19, 0xF17);
|
||||
AddOrnament(0, 0, 20, 0xF24);
|
||||
AddOrnament(0, 0, 20, 0xF1F);
|
||||
AddOrnament(0, 0, 20, 0xF19);
|
||||
AddOrnament(0, 0, 21, 0xF1B);
|
||||
AddOrnament(0, 0, 28, 0xF2F);
|
||||
AddOrnament(0, 0, 30, 0xF23);
|
||||
AddOrnament(0, 0, 32, 0xF2A);
|
||||
AddOrnament(0, 0, 33, 0xF30);
|
||||
AddOrnament(0, 0, 34, 0xF29);
|
||||
AddOrnament(0, 1, 7, 0xF16);
|
||||
AddOrnament(0, 1, 7, 0xF1E);
|
||||
AddOrnament(0, 1, 12, 0xF0F);
|
||||
AddOrnament(0, 1, 13, 0xF13);
|
||||
AddOrnament(0, 1, 18, 0xF12);
|
||||
AddOrnament(0, 1, 19, 0xF15);
|
||||
AddOrnament(0, 1, 25, 0xF28);
|
||||
AddOrnament(0, 1, 29, 0xF1A);
|
||||
AddOrnament(0, 1, 37, 0xF2B);
|
||||
AddOrnament(1, 0, 13, 0xF10);
|
||||
AddOrnament(1, 0, 14, 0xF1C);
|
||||
AddOrnament(1, 0, 16, 0xF14);
|
||||
AddOrnament(1, 0, 17, 0xF26);
|
||||
AddOrnament(1, 0, 22, 0xF27);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HolidayTreeType.Modern:
|
||||
{
|
||||
ItemID = 0x1B7E;
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
AddOrnament(0, 0, 2, 0xF2F);
|
||||
AddOrnament(0, 0, 2, 0xF20);
|
||||
AddOrnament(0, 0, 2, 0xF22);
|
||||
AddOrnament(0, 0, 5, 0xF30);
|
||||
AddOrnament(0, 0, 5, 0xF15);
|
||||
AddOrnament(0, 0, 5, 0xF1F);
|
||||
AddOrnament(0, 0, 5, 0xF2B);
|
||||
AddOrnament(0, 0, 6, 0xF0F);
|
||||
AddOrnament(0, 0, 7, 0xF1E);
|
||||
AddOrnament(0, 0, 7, 0xF24);
|
||||
AddOrnament(0, 0, 8, 0xF29);
|
||||
AddOrnament(0, 0, 9, 0xF18);
|
||||
AddOrnament(0, 0, 14, 0xF1C);
|
||||
AddOrnament(0, 0, 15, 0xF13);
|
||||
AddOrnament(0, 0, 15, 0xF20);
|
||||
AddOrnament(0, 0, 16, 0xF26);
|
||||
AddOrnament(0, 0, 17, 0xF12);
|
||||
AddOrnament(0, 0, 18, 0xF17);
|
||||
AddOrnament(0, 0, 20, 0xF1B);
|
||||
AddOrnament(0, 0, 23, 0xF28);
|
||||
AddOrnament(0, 0, 25, 0xF18);
|
||||
AddOrnament(0, 0, 25, 0xF2A);
|
||||
AddOrnament(0, 1, 7, 0xF16);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class TreeTrunk : Item
|
||||
{
|
||||
private HolidayTree m_Tree;
|
||||
public HolidayTree(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041117; // a tree for the holidays
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Placer{ get; set; }
|
||||
|
||||
public TreeTrunk( HolidayTree tree, int itemID ) : base( itemID )
|
||||
{
|
||||
Movable = false;
|
||||
MoveToWorld( tree.Location, tree.Map );
|
||||
public override int LabelNumber => 1041117; // a tree for the holidays
|
||||
|
||||
m_Tree = tree;
|
||||
}
|
||||
public bool CouldFit(IPoint3D p, Map map)
|
||||
{
|
||||
return map.CanFit((Point3D)p, 20);
|
||||
}
|
||||
|
||||
public TreeTrunk( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
Item IAddon.Deed => new HolidayTreeDeed();
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( m_Tree != null && !m_Tree.Deleted )
|
||||
m_Tree.OnDoubleClick( from );
|
||||
}
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
for (int i = 0; i < m_Components.Count; ++i)
|
||||
((Item)m_Components[i]).Delete();
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
private void AddOrnament(int x, int y, int z, int itemID)
|
||||
{
|
||||
AddItem(x + 1, y + 1, z + 11, new Ornament(itemID));
|
||||
}
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
private void AddItem(int x, int y, int z, Item item)
|
||||
{
|
||||
item.MoveToWorld(new Point3D(Location.X + x, Location.Y + y, Location.Z + z), Map);
|
||||
|
||||
writer.Write( m_Tree );
|
||||
}
|
||||
m_Components.Add(item);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
writer.Write(1); // version
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Tree = reader.ReadItem() as HolidayTree;
|
||||
writer.Write(Placer);
|
||||
|
||||
if ( m_Tree == null )
|
||||
Delete();
|
||||
writer.Write(m_Components.Count);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < m_Components.Count; ++i)
|
||||
writer.Write((Item)m_Components[i]);
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041117; // a tree for the holidays
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public HolidayTree( Mobile from, HolidayTreeType type, Point3D loc ) : base( 1 )
|
||||
{
|
||||
Movable = false;
|
||||
MoveToWorld( loc, from.Map );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Placer = from;
|
||||
m_Components = new ArrayList();
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Placer = reader.ReadMobile();
|
||||
|
||||
switch ( type )
|
||||
{
|
||||
case HolidayTreeType.Classic:
|
||||
{
|
||||
ItemID = 0xCD7;
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
int count = reader.ReadInt();
|
||||
|
||||
AddItem( 0, 0, 0, new TreeTrunk( this, 0xCD6 ) );
|
||||
m_Components = new ArrayList(count);
|
||||
|
||||
AddOrnament( 0, 0, 2, 0xF22 );
|
||||
AddOrnament( 0, 0, 9, 0xF18 );
|
||||
AddOrnament( 0, 0, 15, 0xF20 );
|
||||
AddOrnament( 0, 0, 19, 0xF17 );
|
||||
AddOrnament( 0, 0, 20, 0xF24 );
|
||||
AddOrnament( 0, 0, 20, 0xF1F );
|
||||
AddOrnament( 0, 0, 20, 0xF19 );
|
||||
AddOrnament( 0, 0, 21, 0xF1B );
|
||||
AddOrnament( 0, 0, 28, 0xF2F );
|
||||
AddOrnament( 0, 0, 30, 0xF23 );
|
||||
AddOrnament( 0, 0, 32, 0xF2A );
|
||||
AddOrnament( 0, 0, 33, 0xF30 );
|
||||
AddOrnament( 0, 0, 34, 0xF29 );
|
||||
AddOrnament( 0, 1, 7, 0xF16 );
|
||||
AddOrnament( 0, 1, 7, 0xF1E );
|
||||
AddOrnament( 0, 1, 12, 0xF0F );
|
||||
AddOrnament( 0, 1, 13, 0xF13 );
|
||||
AddOrnament( 0, 1, 18, 0xF12 );
|
||||
AddOrnament( 0, 1, 19, 0xF15 );
|
||||
AddOrnament( 0, 1, 25, 0xF28 );
|
||||
AddOrnament( 0, 1, 29, 0xF1A );
|
||||
AddOrnament( 0, 1, 37, 0xF2B );
|
||||
AddOrnament( 1, 0, 13, 0xF10 );
|
||||
AddOrnament( 1, 0, 14, 0xF1C );
|
||||
AddOrnament( 1, 0, 16, 0xF14 );
|
||||
AddOrnament( 1, 0, 17, 0xF26 );
|
||||
AddOrnament( 1, 0, 22, 0xF27 );
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
Item item = reader.ReadItem();
|
||||
|
||||
break;
|
||||
}
|
||||
case HolidayTreeType.Modern:
|
||||
{
|
||||
ItemID = 0x1B7E;
|
||||
if (item != null)
|
||||
m_Components.Add(item);
|
||||
}
|
||||
|
||||
AddOrnament( 0, 0, 2, 0xF2F );
|
||||
AddOrnament( 0, 0, 2, 0xF20 );
|
||||
AddOrnament( 0, 0, 2, 0xF22 );
|
||||
AddOrnament( 0, 0, 5, 0xF30 );
|
||||
AddOrnament( 0, 0, 5, 0xF15 );
|
||||
AddOrnament( 0, 0, 5, 0xF1F );
|
||||
AddOrnament( 0, 0, 5, 0xF2B );
|
||||
AddOrnament( 0, 0, 6, 0xF0F );
|
||||
AddOrnament( 0, 0, 7, 0xF1E );
|
||||
AddOrnament( 0, 0, 7, 0xF24 );
|
||||
AddOrnament( 0, 0, 8, 0xF29 );
|
||||
AddOrnament( 0, 0, 9, 0xF18 );
|
||||
AddOrnament( 0, 0, 14, 0xF1C );
|
||||
AddOrnament( 0, 0, 15, 0xF13 );
|
||||
AddOrnament( 0, 0, 15, 0xF20 );
|
||||
AddOrnament( 0, 0, 16, 0xF26 );
|
||||
AddOrnament( 0, 0, 17, 0xF12 );
|
||||
AddOrnament( 0, 0, 18, 0xF17 );
|
||||
AddOrnament( 0, 0, 20, 0xF1B );
|
||||
AddOrnament( 0, 0, 23, 0xF28 );
|
||||
AddOrnament( 0, 0, 25, 0xF18 );
|
||||
AddOrnament( 0, 0, 25, 0xF2A );
|
||||
AddOrnament( 0, 1, 7, 0xF16 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Timer.DelayCall(TimeSpan.Zero, ValidatePlacement);
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
for ( int i = 0; i < m_Components.Count; ++i )
|
||||
((Item)m_Components[i]).Delete();
|
||||
}
|
||||
public void ValidatePlacement()
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
private void AddOrnament( int x, int y, int z, int itemID )
|
||||
{
|
||||
AddItem( x + 1, y + 1, z + 11, new Ornament( itemID ) );
|
||||
}
|
||||
|
||||
private void AddItem( int x, int y, int z, Item item )
|
||||
{
|
||||
item.MoveToWorld( new Point3D( Location.X + x, Location.Y + y, Location.Z + z ), Map );
|
||||
|
||||
m_Components.Add( item );
|
||||
}
|
||||
|
||||
public HolidayTree( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public bool CouldFit( IPoint3D p, Map map )
|
||||
{
|
||||
return map.CanFit( (Point3D)p, 20 );
|
||||
}
|
||||
|
||||
Item IAddon.Deed => new HolidayTreeDeed();
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( Placer );
|
||||
|
||||
writer.Write( (int) m_Components.Count );
|
||||
|
||||
for ( int i = 0; i < m_Components.Count; ++i )
|
||||
writer.Write( (Item)m_Components[i] );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Placer = reader.ReadMobile();
|
||||
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
int count = reader.ReadInt();
|
||||
|
||||
m_Components = new ArrayList( count );
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
{
|
||||
Item item = reader.ReadItem();
|
||||
|
||||
if ( item != null )
|
||||
m_Components.Add( item );
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Timer.DelayCall( TimeSpan.Zero, ValidatePlacement );
|
||||
}
|
||||
|
||||
public void ValidatePlacement()
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( this );
|
||||
|
||||
if ( house == null )
|
||||
{
|
||||
HolidayTreeDeed deed = new HolidayTreeDeed();
|
||||
deed.MoveToWorld( Location, Map );
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
if (house == null)
|
||||
{
|
||||
HolidayTreeDeed deed = new HolidayTreeDeed();
|
||||
deed.MoveToWorld(Location, Map);
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), 1 ) )
|
||||
{
|
||||
if ( Placer == null || from == Placer || from.AccessLevel >= AccessLevel.GameMaster )
|
||||
{
|
||||
from.AddToBackpack( new HolidayTreeDeed() );
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 1))
|
||||
{
|
||||
if (Placer == null || from == Placer || from.AccessLevel >= AccessLevel.GameMaster)
|
||||
{
|
||||
from.AddToBackpack(new HolidayTreeDeed());
|
||||
|
||||
Delete();
|
||||
Delete();
|
||||
|
||||
BaseHouse house = BaseHouse.FindHouseAt( this );
|
||||
BaseHouse house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
if ( house != null && house.Addons.Contains( this ) )
|
||||
{
|
||||
house.Addons.Remove( this );
|
||||
}
|
||||
if (house != null && house.Addons.Contains(this)) house.Addons.Remove(this);
|
||||
|
||||
from.SendLocalizedMessage( 503393 ); // A deed for the tree has been placed in your backpack.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 503396 ); // You cannot take this tree down.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
from.SendLocalizedMessage(503393); // A deed for the tree has been placed in your backpack.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(503396); // You cannot take this tree down.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
}
|
||||
}
|
||||
|
||||
private class Ornament : Item
|
||||
{
|
||||
public Ornament(int itemID) : base(itemID)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public Ornament(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041118; // a tree ornament
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
private class TreeTrunk : Item
|
||||
{
|
||||
private HolidayTree m_Tree;
|
||||
|
||||
public TreeTrunk(HolidayTree tree, int itemID) : base(itemID)
|
||||
{
|
||||
Movable = false;
|
||||
MoveToWorld(tree.Location, tree.Map);
|
||||
|
||||
m_Tree = tree;
|
||||
}
|
||||
|
||||
public TreeTrunk(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041117; // a tree for the holidays
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_Tree != null && !m_Tree.Deleted)
|
||||
m_Tree.OnDoubleClick(from);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(m_Tree);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Tree = reader.ReadItem() as HolidayTree;
|
||||
|
||||
if (m_Tree == null)
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,37 +1,37 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
[Flippable( 0x232A, 0x232B )]
|
||||
public class GiftBox : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBox() : this( Utility.RandomDyedHue() )
|
||||
{
|
||||
}
|
||||
[Furniture]
|
||||
[Flippable(0x232A, 0x232B)]
|
||||
public class GiftBox : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBox() : this(Utility.RandomDyedHue())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GiftBox( int hue ) : base( Utility.Random( 0x232A, 2 ) )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = hue;
|
||||
}
|
||||
[Constructible]
|
||||
public GiftBox(int hue) : base(Utility.Random(0x232A, 2))
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public GiftBox( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public GiftBox(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,63 +1,62 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class GingerBreadHouseAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed => new GingerBreadHouseDeed();
|
||||
public class GingerBreadHouseAddon : BaseAddon
|
||||
{
|
||||
public GingerBreadHouseAddon()
|
||||
{
|
||||
for (int i = 0x2be5; i < 0x2be8; i++)
|
||||
{
|
||||
LocalizedAddonComponent laoc = new LocalizedAddonComponent(i, 1077395); // Gingerbread House
|
||||
laoc.Light = LightType.SouthSmall;
|
||||
AddComponent(laoc, i == 0x2be5 ? -1 : 0, i == 0x2be7 ? -1 : 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public GingerBreadHouseAddon()
|
||||
{
|
||||
for( int i=0x2be5; i<0x2be8; i++ )
|
||||
{
|
||||
LocalizedAddonComponent laoc = new LocalizedAddonComponent( i, 1077395 ); // Gingerbread House
|
||||
laoc.Light = LightType.SouthSmall;
|
||||
AddComponent( laoc, (i==0x2be5) ? -1 : 0, (i==0x2be7) ? -1 : 0, 0 );
|
||||
}
|
||||
}
|
||||
public GingerBreadHouseAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public GingerBreadHouseAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override BaseAddonDeed Deed => new GingerBreadHouseDeed();
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class GingerBreadHouseDeed : BaseAddonDeed
|
||||
{
|
||||
public override int LabelNumber => 1077394; //a Gingerbread House Deed
|
||||
public override BaseAddon Addon => new GingerBreadHouseAddon();
|
||||
public class GingerBreadHouseDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public GingerBreadHouseDeed()
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GingerBreadHouseDeed()
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public GingerBreadHouseDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public GingerBreadHouseDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1077394; //a Gingerbread House Deed
|
||||
public override BaseAddon Addon => new GingerBreadHouseAddon();
|
||||
|
||||
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 override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,106 +1,111 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HolidayBell : Item
|
||||
{
|
||||
private static string[] m_StaffNames = {
|
||||
"Adrick",
|
||||
"Alai",
|
||||
"Bulldoz",
|
||||
"Evocare",
|
||||
"FierY-iCe",
|
||||
"Greyburn",
|
||||
"Hanse",
|
||||
"Ignatz",
|
||||
"Jalek",
|
||||
"LadyMOI",
|
||||
"Lord Krum",
|
||||
"Malantus",
|
||||
"Nimrond",
|
||||
"Oaks",
|
||||
"Prophet",
|
||||
"Runesabre",
|
||||
"Sage",
|
||||
"Stellerex",
|
||||
"T-Bone",
|
||||
"Tajima",
|
||||
"Tyrant",
|
||||
"Vex"
|
||||
};
|
||||
private static int[] m_Hues = {
|
||||
0xA, 0x24, 0x42, 0x56, 0x1A, 0x4C, 0x3C, 0x60, 0x2E, 0x55, 0x23, 0x38, 0x482, 0x6, 0x10
|
||||
};
|
||||
public class HolidayBell : Item
|
||||
{
|
||||
private static string[] m_StaffNames =
|
||||
{
|
||||
"Adrick",
|
||||
"Alai",
|
||||
"Bulldoz",
|
||||
"Evocare",
|
||||
"FierY-iCe",
|
||||
"Greyburn",
|
||||
"Hanse",
|
||||
"Ignatz",
|
||||
"Jalek",
|
||||
"LadyMOI",
|
||||
"Lord Krum",
|
||||
"Malantus",
|
||||
"Nimrond",
|
||||
"Oaks",
|
||||
"Prophet",
|
||||
"Runesabre",
|
||||
"Sage",
|
||||
"Stellerex",
|
||||
"T-Bone",
|
||||
"Tajima",
|
||||
"Tyrant",
|
||||
"Vex"
|
||||
};
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int SoundID
|
||||
{
|
||||
get => m_SoundID;
|
||||
set { m_SoundID = value; InvalidateProperties(); }
|
||||
}
|
||||
private static int[] m_Hues =
|
||||
{
|
||||
0xA, 0x24, 0x42, 0x56, 0x1A, 0x4C, 0x3C, 0x60, 0x2E, 0x55, 0x23, 0x38, 0x482, 0x6, 0x10
|
||||
};
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string Giver { get => m_Maker;
|
||||
set => m_Maker = value;
|
||||
}
|
||||
private string m_Maker;
|
||||
private int m_SoundID;
|
||||
|
||||
public override string DefaultName => $"A Holiday Bell From {Giver}";
|
||||
[Constructible]
|
||||
public HolidayBell()
|
||||
: this(m_StaffNames[Utility.Random(m_StaffNames.Length)])
|
||||
{
|
||||
}
|
||||
|
||||
private string m_Maker;
|
||||
private int m_SoundID;
|
||||
[Constructible]
|
||||
public HolidayBell(string maker)
|
||||
: base(0x1C12)
|
||||
{
|
||||
m_Maker = maker;
|
||||
|
||||
[Constructible]
|
||||
public HolidayBell()
|
||||
: this(m_StaffNames[Utility.Random(m_StaffNames.Length)])
|
||||
{
|
||||
}
|
||||
LootType = LootType.Blessed;
|
||||
Hue = m_Hues[Utility.Random(m_Hues.Length)];
|
||||
SoundID = 0x0F5 + Utility.Random(14);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HolidayBell(string maker)
|
||||
: base(0x1C12)
|
||||
{
|
||||
m_Maker = maker;
|
||||
public HolidayBell(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
LootType = LootType.Blessed;
|
||||
Hue = m_Hues[Utility.Random(m_Hues.Length)];
|
||||
SoundID = 0x0F5 + Utility.Random(14);
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int SoundID
|
||||
{
|
||||
get => m_SoundID;
|
||||
set
|
||||
{
|
||||
m_SoundID = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
}
|
||||
else from.PlaySound(m_SoundID);
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string Giver
|
||||
{
|
||||
get => m_Maker;
|
||||
set => m_Maker = value;
|
||||
}
|
||||
|
||||
public HolidayBell(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public override string DefaultName => $"A Holiday Bell From {Giver}";
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
else from.PlaySound(m_SoundID);
|
||||
}
|
||||
|
||||
writer.Write((int)0); // version
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((string)m_Maker);
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.WriteEncodedInt((int)m_SoundID);
|
||||
}
|
||||
writer.Write(m_Maker);
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
writer.WriteEncodedInt(m_SoundID);
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
m_Maker = reader.ReadString();
|
||||
m_SoundID = reader.ReadEncodedInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Utility.Intern(ref m_Maker);
|
||||
}
|
||||
}
|
||||
m_Maker = reader.ReadString();
|
||||
m_SoundID = reader.ReadEncodedInt();
|
||||
|
||||
Utility.Intern(ref m_Maker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,172 +3,172 @@ using System.Collections.Generic;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CandyCane : Food
|
||||
{
|
||||
public static Dictionary<Mobile, CandyCaneTimer> ToothAches { get; set; }
|
||||
public class CandyCane : Food
|
||||
{
|
||||
[Constructible]
|
||||
public CandyCane()
|
||||
: this(0x2bdd + Utility.Random(4))
|
||||
{
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
ToothAches = new Dictionary<Mobile, CandyCaneTimer>();
|
||||
}
|
||||
public CandyCane(int itemID)
|
||||
: base(itemID)
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public class CandyCaneTimer : Timer
|
||||
{
|
||||
public Mobile Eater { get; }
|
||||
public CandyCane(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public int Eaten { get; set; }
|
||||
public static Dictionary<Mobile, CandyCaneTimer> ToothAches{ get; set; }
|
||||
|
||||
public CandyCaneTimer( Mobile eater )
|
||||
: base( TimeSpan.FromSeconds( 30 ), TimeSpan.FromSeconds( 30 ) )
|
||||
{
|
||||
Eater = eater;
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
Start();
|
||||
}
|
||||
public static void Initialize()
|
||||
{
|
||||
ToothAches = new Dictionary<Mobile, CandyCaneTimer>();
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
--Eaten;
|
||||
private static CandyCaneTimer EnsureTimer(Mobile from)
|
||||
{
|
||||
if (!ToothAches.TryGetValue(from, out CandyCaneTimer timer))
|
||||
ToothAches[from] = timer = new CandyCaneTimer(from);
|
||||
|
||||
if ( Eater == null || Eater.Deleted || Eaten <= 0 )
|
||||
{
|
||||
Stop();
|
||||
ToothAches.Remove( Eater );
|
||||
}
|
||||
else if ( Eater.Map != Map.Internal && Eater.Alive )
|
||||
{
|
||||
if ( Eaten > 60 )
|
||||
{
|
||||
Eater.Say( 1077388 + Utility.Random( 5 ) );
|
||||
return timer;
|
||||
}
|
||||
|
||||
/* ARRGH! My tooth hurts sooo much!
|
||||
* You just can't find a good Britannian dentist these days...
|
||||
* My teeth!
|
||||
* MAKE IT STOP!
|
||||
* AAAH! It feels like someone kicked me in the teeth!
|
||||
*/
|
||||
public static int GetToothAche(Mobile from)
|
||||
{
|
||||
if (ToothAches.TryGetValue(from, out CandyCaneTimer timer))
|
||||
return timer.Eaten;
|
||||
|
||||
if ( Utility.RandomBool() && Eater.Body.IsHuman && !Eater.Mounted )
|
||||
Eater.Animate( 32, 5, 1, true, false, 0 );
|
||||
}
|
||||
else if ( Eaten == 60 )
|
||||
{
|
||||
Eater.SendLocalizedMessage( 1077393 ); // The extreme pain in your teeth subsides.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static CandyCaneTimer EnsureTimer( Mobile from )
|
||||
{
|
||||
if (!ToothAches.TryGetValue( from, out CandyCaneTimer timer ))
|
||||
ToothAches[from] = timer = new CandyCaneTimer( from );
|
||||
public static void SetToothAche(Mobile from, int value)
|
||||
{
|
||||
EnsureTimer(from).Eaten = value;
|
||||
}
|
||||
|
||||
return timer;
|
||||
}
|
||||
public override bool CheckHunger(Mobile from)
|
||||
{
|
||||
EnsureTimer(from).Eaten += 32;
|
||||
|
||||
public static int GetToothAche( Mobile from )
|
||||
{
|
||||
if (ToothAches.TryGetValue( from, out CandyCaneTimer timer ))
|
||||
return timer.Eaten;
|
||||
from.SendLocalizedMessage(1077387); // You feel as if you could eat as much as you wanted!
|
||||
return true;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public static void SetToothAche( Mobile from, int value )
|
||||
{
|
||||
EnsureTimer( from ).Eaten = value;
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public CandyCane()
|
||||
: this( 0x2bdd + Utility.Random( 4 ) )
|
||||
{
|
||||
}
|
||||
public class CandyCaneTimer : Timer
|
||||
{
|
||||
public CandyCaneTimer(Mobile eater)
|
||||
: base(TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(30))
|
||||
{
|
||||
Eater = eater;
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
Start();
|
||||
}
|
||||
|
||||
public CandyCane( int itemID )
|
||||
: base( itemID )
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public Mobile Eater{ get; }
|
||||
|
||||
public override bool CheckHunger( Mobile from )
|
||||
{
|
||||
EnsureTimer( from ).Eaten += 32;
|
||||
public int Eaten{ get; set; }
|
||||
|
||||
from.SendLocalizedMessage( 1077387 ); // You feel as if you could eat as much as you wanted!
|
||||
return true;
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
--Eaten;
|
||||
|
||||
public CandyCane( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
if (Eater == null || Eater.Deleted || Eaten <= 0)
|
||||
{
|
||||
Stop();
|
||||
ToothAches.Remove(Eater);
|
||||
}
|
||||
else if (Eater.Map != Map.Internal && Eater.Alive)
|
||||
{
|
||||
if (Eaten > 60)
|
||||
{
|
||||
Eater.Say(1077388 + Utility.Random(5));
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
/* ARRGH! My tooth hurts sooo much!
|
||||
* You just can't find a good Britannian dentist these days...
|
||||
* My teeth!
|
||||
* MAKE IT STOP!
|
||||
* AAAH! It feels like someone kicked me in the teeth!
|
||||
*/
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
if (Utility.RandomBool() && Eater.Body.IsHuman && !Eater.Mounted)
|
||||
Eater.Animate(32, 5, 1, true, false, 0);
|
||||
}
|
||||
else if (Eaten == 60)
|
||||
{
|
||||
Eater.SendLocalizedMessage(1077393); // The extreme pain in your teeth subsides.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class GingerBreadCookie : Food
|
||||
{
|
||||
private readonly int[] m_Messages =
|
||||
{
|
||||
0,
|
||||
1077396, // Noooo!
|
||||
1077397, // Please don't eat me... *whimper*
|
||||
1077405, // Not the face!
|
||||
1077406, // Ahhhhhh! My foot<6F>s gone!
|
||||
1077407, // Please. No! I have gingerkids!
|
||||
1077408, // No, no! I<>m really made of poison. Really.
|
||||
1077409 // Run, run as fast as you can! You can't catch me! I'm the gingerbread man!
|
||||
};
|
||||
public class GingerBreadCookie : Food
|
||||
{
|
||||
private readonly int[] m_Messages =
|
||||
{
|
||||
0,
|
||||
1077396, // Noooo!
|
||||
1077397, // Please don't eat me... *whimper*
|
||||
1077405, // Not the face!
|
||||
1077406, // Ahhhhhh! My foot<6F>s gone!
|
||||
1077407, // Please. No! I have gingerkids!
|
||||
1077408, // No, no! I<>m really made of poison. Really.
|
||||
1077409 // Run, run as fast as you can! You can't catch me! I'm the gingerbread man!
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public GingerBreadCookie()
|
||||
: base( Utility.RandomBool() ? 0x2be1 : 0x2be2 )
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
[Constructible]
|
||||
public GingerBreadCookie()
|
||||
: base(Utility.RandomBool() ? 0x2be1 : 0x2be2)
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public GingerBreadCookie( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public GingerBreadCookie(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Eat( Mobile from )
|
||||
{
|
||||
int message = m_Messages[Utility.Random( m_Messages.Length )];
|
||||
public override bool Eat(Mobile from)
|
||||
{
|
||||
int message = m_Messages[Utility.Random(m_Messages.Length)];
|
||||
|
||||
if ( message != 0 )
|
||||
{
|
||||
SendLocalizedMessageTo( from, message );
|
||||
return false;
|
||||
}
|
||||
if (message != 0)
|
||||
{
|
||||
SendLocalizedMessageTo(from, message);
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.Eat( from );
|
||||
}
|
||||
return base.Eat(from);
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,219 +1,220 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class GiftBoxHues
|
||||
{
|
||||
public static int RandomGiftBoxHue => m_NormalHues[Utility.Random(m_NormalHues.Length)];
|
||||
public static int RandomNeonBoxHue => m_NeonHues[Utility.Random(m_NeonHues.Length)];
|
||||
public class GiftBoxHues
|
||||
{
|
||||
/* there's possibly a couple more, but this is what we could verify on OSI */
|
||||
|
||||
/* there's possibly a couple more, but this is what we could verify on OSI */
|
||||
private static readonly int[] m_NormalHues =
|
||||
{
|
||||
0x672,
|
||||
0x454,
|
||||
0x507,
|
||||
0x4ac,
|
||||
0x504,
|
||||
0x84b,
|
||||
0x495,
|
||||
0x97c,
|
||||
0x493,
|
||||
0x4a8,
|
||||
0x494,
|
||||
0x4aa,
|
||||
0xb8b,
|
||||
0x84f,
|
||||
0x491,
|
||||
0x851,
|
||||
0x503,
|
||||
0xb8c,
|
||||
0x4ab,
|
||||
0x84B
|
||||
};
|
||||
|
||||
private static readonly int[] m_NormalHues =
|
||||
{
|
||||
0x672,
|
||||
0x454,
|
||||
0x507,
|
||||
0x4ac,
|
||||
0x504,
|
||||
0x84b,
|
||||
0x495,
|
||||
0x97c,
|
||||
0x493,
|
||||
0x4a8,
|
||||
0x494,
|
||||
0x4aa,
|
||||
0xb8b,
|
||||
0x84f,
|
||||
0x491,
|
||||
0x851,
|
||||
0x503,
|
||||
0xb8c,
|
||||
0x4ab,
|
||||
0x84B
|
||||
};
|
||||
private static readonly int[] m_NeonHues =
|
||||
{
|
||||
0x438,
|
||||
0x424,
|
||||
0x433,
|
||||
0x445,
|
||||
0x42b,
|
||||
0x448
|
||||
};
|
||||
}
|
||||
private static readonly int[] m_NeonHues =
|
||||
{
|
||||
0x438,
|
||||
0x424,
|
||||
0x433,
|
||||
0x445,
|
||||
0x42b,
|
||||
0x448
|
||||
};
|
||||
|
||||
[FlippableAttribute(0x46A5, 0x46A6)]
|
||||
public class GiftBoxRectangle : BaseContainer
|
||||
{
|
||||
public override int DefaultGumpID => 0x11E;
|
||||
public static int RandomGiftBoxHue => m_NormalHues[Utility.Random(m_NormalHues.Length)];
|
||||
public static int RandomNeonBoxHue => m_NeonHues[Utility.Random(m_NeonHues.Length)];
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GiftBoxRectangle()
|
||||
: base(Utility.RandomBool() ? 0x46A5 : 0x46A6)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
}
|
||||
[Flippable(0x46A5, 0x46A6)]
|
||||
public class GiftBoxRectangle : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxRectangle()
|
||||
: base(Utility.RandomBool() ? 0x46A5 : 0x46A6)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
}
|
||||
|
||||
public GiftBoxRectangle(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public GiftBoxRectangle(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
public override int DefaultGumpID => 0x11E;
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public class GiftBoxCube : BaseContainer
|
||||
{
|
||||
public override int DefaultGumpID => 0x11B;
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GiftBoxCube()
|
||||
: base(0x46A2)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
}
|
||||
public class GiftBoxCube : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxCube()
|
||||
: base(0x46A2)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
}
|
||||
|
||||
public GiftBoxCube(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public GiftBoxCube(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
public override int DefaultGumpID => 0x11B;
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public class GiftBoxCylinder : BaseContainer
|
||||
{
|
||||
public override int DefaultGumpID => 0x11C;
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GiftBoxCylinder()
|
||||
: base(0x46A3)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
}
|
||||
public class GiftBoxCylinder : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxCylinder()
|
||||
: base(0x46A3)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
}
|
||||
|
||||
public GiftBoxCylinder(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public GiftBoxCylinder(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
public override int DefaultGumpID => 0x11C;
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public class GiftBoxOctogon : BaseContainer
|
||||
{
|
||||
public override int DefaultGumpID => 0x11D;
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GiftBoxOctogon()
|
||||
: base(0x46A4)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
}
|
||||
public class GiftBoxOctogon : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxOctogon()
|
||||
: base(0x46A4)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
}
|
||||
|
||||
public GiftBoxOctogon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public GiftBoxOctogon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
public override int DefaultGumpID => 0x11D;
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public class GiftBoxAngel : BaseContainer
|
||||
{
|
||||
public override int DefaultGumpID => 0x11F;
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GiftBoxAngel()
|
||||
: base(0x46A7)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
}
|
||||
public class GiftBoxAngel : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxAngel()
|
||||
: base(0x46A7)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
}
|
||||
|
||||
public GiftBoxAngel(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public GiftBoxAngel(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
public override int DefaultGumpID => 0x11F;
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
[Flippable(0x232A, 0x232B)]
|
||||
public class GiftBoxNeon : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxNeon()
|
||||
: base(Utility.RandomBool() ? 0x232A : 0x232B)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomNeonBoxHue;
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public GiftBoxNeon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
[Flippable(0x232A, 0x232B)]
|
||||
public class GiftBoxNeon : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxNeon()
|
||||
: base(Utility.RandomBool() ? 0x232A : 0x232B)
|
||||
{
|
||||
Hue = GiftBoxHues.RandomNeonBoxHue;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
public GiftBoxNeon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,151 +3,151 @@ using Server.Network;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HolidayPottedPlant : Item
|
||||
{
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
public class HolidayPottedPlant : Item
|
||||
{
|
||||
[Constructible]
|
||||
public HolidayPottedPlant()
|
||||
: this(Utility.RandomMinMax(0x11C8, 0x11CC))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HolidayPottedPlant()
|
||||
: this( Utility.RandomMinMax( 0x11C8, 0x11CC ) )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public HolidayPottedPlant(int itemID)
|
||||
: base(itemID)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HolidayPottedPlant( int itemID )
|
||||
: base( itemID )
|
||||
{
|
||||
}
|
||||
public HolidayPottedPlant(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public HolidayPottedPlant( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class PottedPlantDeed : Item
|
||||
{
|
||||
public override int LabelNumber => 1041114; // A deed for a potted plant.
|
||||
public override double DefaultWeight => 1.0;
|
||||
public class PottedPlantDeed : Item
|
||||
{
|
||||
[Constructible]
|
||||
public PottedPlantDeed()
|
||||
: base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public PottedPlantDeed()
|
||||
: base( 0x14F0 )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public PottedPlantDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public PottedPlantDeed( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1041114; // A deed for a potted plant.
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.CloseGump( typeof( InternalGump ) );
|
||||
from.SendGump( new InternalGump( this ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it.
|
||||
}
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump(typeof(InternalGump));
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private PottedPlantDeed m_Deed;
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private PottedPlantDeed m_Deed;
|
||||
|
||||
public InternalGump( PottedPlantDeed deed ) : base( 100, 200 )
|
||||
{
|
||||
m_Deed = deed;
|
||||
public InternalGump(PottedPlantDeed deed) : base(100, 200)
|
||||
{
|
||||
m_Deed = deed;
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Resizable = false;
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddPage( 0 );
|
||||
AddBackground( 0, 0, 360, 195, 0xA28 );
|
||||
AddPage(0);
|
||||
AddBackground(0, 0, 360, 195, 0xA28);
|
||||
|
||||
AddPage( 1 );
|
||||
AddLabel( 45, 15, 0, "Choose a Potted Plant:" );
|
||||
AddPage(1);
|
||||
AddLabel(45, 15, 0, "Choose a Potted Plant:");
|
||||
|
||||
AddItem( 45, 75, 0x11C8 );
|
||||
AddButton( 55, 50, 0x845, 0x846, 1, GumpButtonType.Reply, 0 );
|
||||
AddItem(45, 75, 0x11C8);
|
||||
AddButton(55, 50, 0x845, 0x846, 1, GumpButtonType.Reply, 0);
|
||||
|
||||
AddItem( 100, 75, 0x11C9 );
|
||||
AddButton( 115, 50, 0x845, 0x846, 2, GumpButtonType.Reply, 0 );
|
||||
AddItem(100, 75, 0x11C9);
|
||||
AddButton(115, 50, 0x845, 0x846, 2, GumpButtonType.Reply, 0);
|
||||
|
||||
AddItem( 160, 75, 0x11CA );
|
||||
AddButton( 175, 50, 0x845, 0x846, 3, GumpButtonType.Reply, 0 );
|
||||
AddItem(160, 75, 0x11CA);
|
||||
AddButton(175, 50, 0x845, 0x846, 3, GumpButtonType.Reply, 0);
|
||||
|
||||
AddItem( 225, 75, 0x11CB );
|
||||
AddButton( 235, 50, 0x845, 0x846, 4, GumpButtonType.Reply, 0 );
|
||||
AddItem(225, 75, 0x11CB);
|
||||
AddButton(235, 50, 0x845, 0x846, 4, GumpButtonType.Reply, 0);
|
||||
|
||||
AddItem( 280, 75, 0x11CC );
|
||||
AddButton( 295, 50, 0x845, 0x846, 5, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
AddItem(280, 75, 0x11CC);
|
||||
AddButton(295, 50, 0x845, 0x846, 5, GumpButtonType.Reply, 0);
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( m_Deed == null || m_Deed.Deleted )
|
||||
return;
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Deed == null || m_Deed.Deleted)
|
||||
return;
|
||||
|
||||
Mobile from = sender.Mobile;
|
||||
Mobile from = sender.Mobile;
|
||||
|
||||
if ( !m_Deed.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it
|
||||
return;
|
||||
}
|
||||
if (!m_Deed.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it
|
||||
return;
|
||||
}
|
||||
|
||||
int index = info.ButtonID - 1;
|
||||
int index = info.ButtonID - 1;
|
||||
|
||||
if ( index >= 0 && index <= 4 )
|
||||
{
|
||||
HolidayPottedPlant plant = new HolidayPottedPlant( 0x11C8 + index );
|
||||
if (index >= 0 && index <= 4)
|
||||
{
|
||||
HolidayPottedPlant plant = new HolidayPottedPlant(0x11C8 + index);
|
||||
|
||||
if ( !from.PlaceInBackpack( plant ) )
|
||||
{
|
||||
plant.Delete();
|
||||
from.SendLocalizedMessage( 1078837 ); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Deed.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!from.PlaceInBackpack(plant))
|
||||
{
|
||||
plant.Delete();
|
||||
from.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Deed.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +1,36 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class HolidayTimepiece : Clock
|
||||
{
|
||||
public override int LabelNumber => 1041113; // a holiday timepiece
|
||||
public override double DefaultWeight => 1.0;
|
||||
public class HolidayTimepiece : Clock
|
||||
{
|
||||
[Constructible]
|
||||
public HolidayTimepiece()
|
||||
: base(0x1086)
|
||||
{
|
||||
Weight = DefaultWeight;
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Bracelet;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HolidayTimepiece()
|
||||
: base( 0x1086 )
|
||||
{
|
||||
Weight = DefaultWeight;
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Bracelet;
|
||||
}
|
||||
public HolidayTimepiece(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public HolidayTimepiece( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1041113; // a holiday timepiece
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,165 +1,170 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class IcicleLargeSouth : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleLargeSouth()
|
||||
: base(0x4572)
|
||||
{
|
||||
}
|
||||
public class IcicleLargeSouth : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleLargeSouth()
|
||||
: base(0x4572)
|
||||
{
|
||||
}
|
||||
|
||||
public IcicleLargeSouth(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public IcicleLargeSouth(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0);
|
||||
}
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class IcicleMedSouth : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleMedSouth ()
|
||||
: base(0x4573)
|
||||
{
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public IcicleMedSouth (Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public class IcicleMedSouth : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleMedSouth()
|
||||
: base(0x4573)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
public IcicleMedSouth(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
writer.Write((int)0);
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class IcicleSmallSouth : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleSmallSouth ()
|
||||
: base(0x4574)
|
||||
{
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public IcicleSmallSouth (Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
public class IcicleSmallSouth : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleSmallSouth()
|
||||
: base(0x4574)
|
||||
{
|
||||
}
|
||||
|
||||
writer.Write((int)0);
|
||||
}
|
||||
public IcicleSmallSouth(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class IcicleLargeEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleLargeEast ()
|
||||
: base(0x4575)
|
||||
{
|
||||
}
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public IcicleLargeEast (Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
writer.Write((int)0);
|
||||
}
|
||||
public class IcicleLargeEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleLargeEast()
|
||||
: base(0x4575)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
public IcicleLargeEast(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class IcicleMedEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleMedEast ()
|
||||
: base(0x4576)
|
||||
{
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public IcicleMedEast (Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
writer.Write((int)0);
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
public class IcicleMedEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleMedEast()
|
||||
: base(0x4576)
|
||||
{
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class IcicleSmallEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleSmallEast ()
|
||||
: base(0x4577)
|
||||
{
|
||||
}
|
||||
public IcicleMedEast(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public IcicleSmallEast(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
writer.Write((int)0);
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public class IcicleSmallEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleSmallEast()
|
||||
: base(0x4577)
|
||||
{
|
||||
}
|
||||
|
||||
public IcicleSmallEast(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4,122 +4,118 @@ using Server.Spells;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class IcyPatch : Item
|
||||
{
|
||||
public override int LabelNumber => 1095159; //An Icy Patch
|
||||
public override double DefaultWeight => 5.0;
|
||||
public class IcyPatch : Item
|
||||
{
|
||||
/* On OSI, the iceypatch with itemid 0x122a is "rarer", so we will give it 1:10 chance of creating it that way */
|
||||
|
||||
/* On OSI, the iceypatch with itemid 0x122a is "rarer", so we will give it 1:10 chance of creating it that way */
|
||||
[Constructible]
|
||||
public IcyPatch()
|
||||
: this(Utility.Random(10) == 0 ? 0x122A : 0x122F)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public IcyPatch()
|
||||
: this((Utility.Random(10) == 0) ? 0x122A : 0x122F)
|
||||
{
|
||||
}
|
||||
public IcyPatch(int itemid)
|
||||
: base(itemid)
|
||||
{
|
||||
Hue = 0x481;
|
||||
}
|
||||
|
||||
public IcyPatch(int itemid)
|
||||
: base (itemid)
|
||||
{
|
||||
Hue = 0x481;
|
||||
}
|
||||
public IcyPatch(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public IcyPatch(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1095159; //An Icy Patch
|
||||
public override double DefaultWeight => 5.0;
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile && m.Alive && m.AccessLevel == AccessLevel.Player)
|
||||
{
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0: RunSequence(m, 1095160, false); break; //You steadily walk over the slippery surface.
|
||||
case 1: RunSequence(m, 1095161, true); break; //You skillfully manage to maintain your balance.
|
||||
default: RunSequence(m, 1095162, true); break; //You lose your footing and ungracefully splatter on the ground.
|
||||
}
|
||||
}
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile && m.Alive && m.AccessLevel == AccessLevel.Player)
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
RunSequence(m, 1095160, false);
|
||||
break; //You steadily walk over the slippery surface.
|
||||
case 1:
|
||||
RunSequence(m, 1095161, true);
|
||||
break; //You skillfully manage to maintain your balance.
|
||||
default:
|
||||
RunSequence(m, 1095162, true);
|
||||
break; //You lose your footing and ungracefully splatter on the ground.
|
||||
}
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
|
||||
public virtual void RunSequence(Mobile m, int message, bool freeze)
|
||||
{
|
||||
object[] arg = null;
|
||||
public virtual void RunSequence(Mobile m, int message, bool freeze)
|
||||
{
|
||||
object[] arg = null;
|
||||
|
||||
if (freeze)
|
||||
{
|
||||
m.Frozen = freeze;
|
||||
Timer.DelayCall(TimeSpan.FromSeconds((message==1095162) ? 2.0 : 1.25), new TimerStateCallback(EndFall_Callback), m);
|
||||
}
|
||||
if (freeze)
|
||||
{
|
||||
m.Frozen = freeze;
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(message == 1095162 ? 2.0 : 1.25),
|
||||
new TimerStateCallback(EndFall_Callback), m);
|
||||
}
|
||||
|
||||
m.SendLocalizedMessage(message);
|
||||
m.SendLocalizedMessage(message);
|
||||
|
||||
if (message == 1095162)
|
||||
{
|
||||
if (m.Mounted)
|
||||
{
|
||||
m.Mount.Rider = null;
|
||||
}
|
||||
if (message == 1095162)
|
||||
{
|
||||
if (m.Mounted) m.Mount.Rider = null;
|
||||
|
||||
Point3D p = new Point3D(Location);
|
||||
Point3D p = new Point3D(Location);
|
||||
|
||||
if (SpellHelper.FindValidSpawnLocation(Map, ref p, true))
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(0), new TimerStateCallback(Relocate_Callback), new object[] { m, p });
|
||||
}
|
||||
if (SpellHelper.FindValidSpawnLocation(Map, ref p, true))
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(0), new TimerStateCallback(Relocate_Callback),
|
||||
new object[] { m, p });
|
||||
|
||||
arg = new object[] { m, (21 + Utility.Random(2)), !m.Female ? 0x426 : 0x317 };
|
||||
}
|
||||
else if (message == 1095161)
|
||||
{
|
||||
arg = new object[] { m, 17, !m.Female ? 0x429 : 0x319 };
|
||||
}
|
||||
if (arg != null)
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(.4), new TimerStateCallback(BeginFall_Callback), arg);
|
||||
}
|
||||
}
|
||||
arg = new object[] { m, 21 + Utility.Random(2), !m.Female ? 0x426 : 0x317 };
|
||||
}
|
||||
else if (message == 1095161)
|
||||
{
|
||||
arg = new object[] { m, 17, !m.Female ? 0x429 : 0x319 };
|
||||
}
|
||||
|
||||
private static void Relocate_Callback(object state)
|
||||
{
|
||||
object[] states = (object[])state;
|
||||
Mobile m = (Mobile)states[0];
|
||||
Point3D to = (Point3D)states[1];
|
||||
if (arg != null) Timer.DelayCall(TimeSpan.FromSeconds(.4), new TimerStateCallback(BeginFall_Callback), arg);
|
||||
}
|
||||
|
||||
m.MoveToWorld(to, m.Map);
|
||||
}
|
||||
private static void Relocate_Callback(object state)
|
||||
{
|
||||
object[] states = (object[])state;
|
||||
Mobile m = (Mobile)states[0];
|
||||
Point3D to = (Point3D)states[1];
|
||||
|
||||
private static void BeginFall_Callback(object state)
|
||||
{
|
||||
object[] states = (object[])state;
|
||||
m.MoveToWorld(to, m.Map);
|
||||
}
|
||||
|
||||
Mobile m = (Mobile)states[0];
|
||||
int action = (int)states[1];
|
||||
int sound = (int)states[2];
|
||||
if (!m.Mounted)
|
||||
{
|
||||
m.Animate(action, 1, 1, false, true, 0);
|
||||
}
|
||||
m.PlaySound(sound);
|
||||
}
|
||||
private static void BeginFall_Callback(object state)
|
||||
{
|
||||
object[] states = (object[])state;
|
||||
|
||||
private static void EndFall_Callback(object state)
|
||||
{
|
||||
((Mobile)state).Frozen = false;
|
||||
}
|
||||
Mobile m = (Mobile)states[0];
|
||||
int action = (int)states[1];
|
||||
int sound = (int)states[2];
|
||||
if (!m.Mounted) m.Animate(action, 1, 1, false, true, 0);
|
||||
m.PlaySound(sound);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
private static void EndFall_Callback(object state)
|
||||
{
|
||||
((Mobile)state).Frozen = false;
|
||||
}
|
||||
|
||||
writer.Write((int)0);
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,89 +1,89 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class Coal : Item
|
||||
{
|
||||
public override string DefaultName => "Coal";
|
||||
public class Coal : Item
|
||||
{
|
||||
[Constructible]
|
||||
public Coal() : base(0x19b9)
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 0x965;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Coal() : base( 0x19b9 )
|
||||
{
|
||||
Stackable = false;
|
||||
LootType=LootType.Blessed;
|
||||
Hue = 0x965;
|
||||
}
|
||||
public Coal(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public Coal( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override string DefaultName => "Coal";
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class BadCard : Item
|
||||
{
|
||||
public override int LabelNumber // Maybe next year youll get a better...
|
||||
=> 1041428;
|
||||
public class BadCard : Item
|
||||
{
|
||||
[Constructible]
|
||||
public BadCard() : base(0x14ef)
|
||||
{
|
||||
int[] m_CardHues = { 0x45, 0x27, 0x3d0 };
|
||||
Hue = m_CardHues[Utility.Random(m_CardHues.Length)];
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
Movable = true;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public BadCard() : base( 0x14ef )
|
||||
{
|
||||
int[] m_CardHues={ 0x45, 0x27, 0x3d0 };
|
||||
Hue = m_CardHues[Utility.Random(m_CardHues.Length)];
|
||||
Stackable = false;
|
||||
LootType=LootType.Blessed;
|
||||
Movable=true;
|
||||
}
|
||||
public BadCard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public BadCard( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override int LabelNumber // Maybe next year youll get a better...
|
||||
=> 1041428;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class Spam : Food
|
||||
{
|
||||
[Constructible]
|
||||
public Spam() : base( 0x1044 )
|
||||
{
|
||||
Stackable = false;
|
||||
LootType=LootType.Blessed;
|
||||
}
|
||||
public class Spam : Food
|
||||
{
|
||||
[Constructible]
|
||||
public Spam() : base(0x1044)
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public Spam( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public Spam(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,58 +1,58 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class RedPoinsettia : Item
|
||||
{
|
||||
[Constructible]
|
||||
public RedPoinsettia() : base( 0x2330 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public class RedPoinsettia : Item
|
||||
{
|
||||
[Constructible]
|
||||
public RedPoinsettia() : base(0x2330)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public RedPoinsettia( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public RedPoinsettia(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class WhitePoinsettia : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WhitePoinsettia() : base( 0x2331 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public class WhitePoinsettia : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WhitePoinsettia() : base(0x2331)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public WhitePoinsettia( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public WhitePoinsettia(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,309 +1,320 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SnowGlobe : Item
|
||||
{
|
||||
public override double DefaultWeight => 1.0;
|
||||
public class SnowGlobe : Item
|
||||
{
|
||||
public SnowGlobe()
|
||||
: base(0xE2F)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Light = LightType.Circle150;
|
||||
}
|
||||
|
||||
public SnowGlobe()
|
||||
: base( 0xE2F )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Light = LightType.Circle150;
|
||||
}
|
||||
public SnowGlobe(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public SnowGlobe( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public enum SnowGlobeTypeOne
|
||||
{
|
||||
Britain,
|
||||
Moonglow,
|
||||
Minoc,
|
||||
Magincia,
|
||||
BuccaneersDen,
|
||||
Trinsic,
|
||||
Yew,
|
||||
SkaraBrae,
|
||||
Jhelom,
|
||||
Nujelm,
|
||||
Papua,
|
||||
Delucia,
|
||||
Cove,
|
||||
Ocllo,
|
||||
SerpentsHold,
|
||||
EmpathAbbey,
|
||||
TheLycaeum,
|
||||
Vesper,
|
||||
Wind
|
||||
}
|
||||
public enum SnowGlobeTypeOne
|
||||
{
|
||||
Britain,
|
||||
Moonglow,
|
||||
Minoc,
|
||||
Magincia,
|
||||
BuccaneersDen,
|
||||
Trinsic,
|
||||
Yew,
|
||||
SkaraBrae,
|
||||
Jhelom,
|
||||
Nujelm,
|
||||
Papua,
|
||||
Delucia,
|
||||
Cove,
|
||||
Ocllo,
|
||||
SerpentsHold,
|
||||
EmpathAbbey,
|
||||
TheLycaeum,
|
||||
Vesper,
|
||||
Wind
|
||||
}
|
||||
|
||||
public class SnowGlobeOne : SnowGlobe
|
||||
{
|
||||
private SnowGlobeTypeOne m_Type;
|
||||
public class SnowGlobeOne : SnowGlobe
|
||||
{
|
||||
private SnowGlobeTypeOne m_Type;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SnowGlobeTypeOne Place
|
||||
{
|
||||
get => m_Type;
|
||||
set { m_Type = value; InvalidateProperties(); }
|
||||
}
|
||||
[Constructible]
|
||||
public SnowGlobeOne()
|
||||
: this((SnowGlobeTypeOne)Utility.Random(19))
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041454 + (int) m_Type;
|
||||
[Constructible]
|
||||
public SnowGlobeOne(SnowGlobeTypeOne type)
|
||||
{
|
||||
m_Type = type;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeOne()
|
||||
: this( (SnowGlobeTypeOne) Utility.Random( 19 ) )
|
||||
{
|
||||
}
|
||||
public SnowGlobeOne(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeOne( SnowGlobeTypeOne type )
|
||||
{
|
||||
m_Type = type;
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public SnowGlobeTypeOne Place
|
||||
{
|
||||
get => m_Type;
|
||||
set
|
||||
{
|
||||
m_Type = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public SnowGlobeOne( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1041454 + (int)m_Type;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.WriteEncodedInt( (int) m_Type );
|
||||
}
|
||||
writer.Write(0); // version
|
||||
writer.WriteEncodedInt((int)m_Type);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (SnowGlobeTypeOne) reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (SnowGlobeTypeOne)reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum SnowGlobeTypeTwo
|
||||
{
|
||||
AncientCitadel,
|
||||
BlackthornesCastle,
|
||||
CityofMontor,
|
||||
CityofMistas,
|
||||
ExodusLair,
|
||||
LakeofFire,
|
||||
Lakeshire,
|
||||
PassofKarnaugh,
|
||||
TheEtherealFortress,
|
||||
TwinOaksTavern,
|
||||
ChaosShrine,
|
||||
ShrineofHumility,
|
||||
ShrineofSacrifice,
|
||||
ShrineofCompassion,
|
||||
ShrineofHonor,
|
||||
ShrineofHonesty,
|
||||
ShrineofSpirituality,
|
||||
ShrineofJustice,
|
||||
ShrineofValor
|
||||
}
|
||||
public enum SnowGlobeTypeTwo
|
||||
{
|
||||
AncientCitadel,
|
||||
BlackthornesCastle,
|
||||
CityofMontor,
|
||||
CityofMistas,
|
||||
ExodusLair,
|
||||
LakeofFire,
|
||||
Lakeshire,
|
||||
PassofKarnaugh,
|
||||
TheEtherealFortress,
|
||||
TwinOaksTavern,
|
||||
ChaosShrine,
|
||||
ShrineofHumility,
|
||||
ShrineofSacrifice,
|
||||
ShrineofCompassion,
|
||||
ShrineofHonor,
|
||||
ShrineofHonesty,
|
||||
ShrineofSpirituality,
|
||||
ShrineofJustice,
|
||||
ShrineofValor
|
||||
}
|
||||
|
||||
public class SnowGlobeTwo : SnowGlobe
|
||||
{
|
||||
/* Oddly, these are not localized. */
|
||||
private static readonly string[] m_PlaceNames = {
|
||||
/* AncientCitadel */ "Ancient Citadel",
|
||||
/* BlackthornesCastle */ "Blackthorne's Castle",
|
||||
/* CityofMontor */ "City of Montor",
|
||||
/* CityofMistas */ "City of Mistas",
|
||||
/* ExodusLair */ "Exodus' Lair",
|
||||
/* LakeofFire */ "Lake of Fire",
|
||||
/* Lakeshire */ "Lakeshire",
|
||||
/* PassofKarnaugh */ "Pass of Karnaugh",
|
||||
/* TheEtherealFortress */ "The Etheral Fortress",
|
||||
/* TwinOaksTavern */ "Twin Oaks Tavern",
|
||||
/* ChaosShrine */ "Chaos Shrine",
|
||||
/* ShrineofHumility */ "Shrine of Humility",
|
||||
/* ShrineofSacrifice */ "Shrine of Sacrifice",
|
||||
/* ShrineofCompassion */ "Shrine of Compassion",
|
||||
/* ShrineofHonor */ "Shrine of Honor",
|
||||
/* ShrineofHonesty */ "Shrine of Honesty",
|
||||
/* ShrineofSpirituality */ "Shrine of Spirituality",
|
||||
/* ShrineofJustice */ "Shrine of Justice",
|
||||
/* ShrineofValor */ "Shrine of Valor"
|
||||
};
|
||||
public class SnowGlobeTwo : SnowGlobe
|
||||
{
|
||||
/* Oddly, these are not localized. */
|
||||
private static readonly string[] m_PlaceNames =
|
||||
{
|
||||
/* AncientCitadel */ "Ancient Citadel",
|
||||
/* BlackthornesCastle */ "Blackthorne's Castle",
|
||||
/* CityofMontor */ "City of Montor",
|
||||
/* CityofMistas */ "City of Mistas",
|
||||
/* ExodusLair */ "Exodus' Lair",
|
||||
/* LakeofFire */ "Lake of Fire",
|
||||
/* Lakeshire */ "Lakeshire",
|
||||
/* PassofKarnaugh */ "Pass of Karnaugh",
|
||||
/* TheEtherealFortress */ "The Etheral Fortress",
|
||||
/* TwinOaksTavern */ "Twin Oaks Tavern",
|
||||
/* ChaosShrine */ "Chaos Shrine",
|
||||
/* ShrineofHumility */ "Shrine of Humility",
|
||||
/* ShrineofSacrifice */ "Shrine of Sacrifice",
|
||||
/* ShrineofCompassion */ "Shrine of Compassion",
|
||||
/* ShrineofHonor */ "Shrine of Honor",
|
||||
/* ShrineofHonesty */ "Shrine of Honesty",
|
||||
/* ShrineofSpirituality */ "Shrine of Spirituality",
|
||||
/* ShrineofJustice */ "Shrine of Justice",
|
||||
/* ShrineofValor */ "Shrine of Valor"
|
||||
};
|
||||
|
||||
private SnowGlobeTypeTwo m_Type;
|
||||
private SnowGlobeTypeTwo m_Type;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SnowGlobeTypeTwo Place
|
||||
{
|
||||
get => m_Type;
|
||||
set { m_Type = value; InvalidateProperties(); }
|
||||
}
|
||||
[Constructible]
|
||||
public SnowGlobeTwo()
|
||||
: this((SnowGlobeTypeTwo)Utility.Random(19))
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName
|
||||
{
|
||||
get
|
||||
{
|
||||
int idx = (int) m_Type;
|
||||
[Constructible]
|
||||
public SnowGlobeTwo(SnowGlobeTypeTwo type)
|
||||
{
|
||||
m_Type = type;
|
||||
}
|
||||
|
||||
if ( idx < 0 || idx >= m_PlaceNames.Length )
|
||||
return "a snowy scene";
|
||||
public SnowGlobeTwo(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
return $"a snowy scene of {m_PlaceNames[idx]}";
|
||||
}
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public SnowGlobeTypeTwo Place
|
||||
{
|
||||
get => m_Type;
|
||||
set
|
||||
{
|
||||
m_Type = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeTwo()
|
||||
: this( (SnowGlobeTypeTwo) Utility.Random( 19 ) )
|
||||
{
|
||||
}
|
||||
public override string DefaultName
|
||||
{
|
||||
get
|
||||
{
|
||||
int idx = (int)m_Type;
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeTwo( SnowGlobeTypeTwo type )
|
||||
{
|
||||
m_Type = type;
|
||||
}
|
||||
if (idx < 0 || idx >= m_PlaceNames.Length)
|
||||
return "a snowy scene";
|
||||
|
||||
public SnowGlobeTwo( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
return $"a snowy scene of {m_PlaceNames[idx]}";
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.WriteEncodedInt( (int) m_Type );
|
||||
}
|
||||
writer.Write(0); // version
|
||||
writer.WriteEncodedInt((int)m_Type);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (SnowGlobeTypeTwo) reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (SnowGlobeTypeTwo)reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum SnowGlobeTypeThree
|
||||
{
|
||||
Luna,
|
||||
Umbra,
|
||||
Zento,
|
||||
Heartwood,
|
||||
Covetous,
|
||||
Deceit,
|
||||
Destard,
|
||||
Hythloth,
|
||||
Khaldun,
|
||||
Shame,
|
||||
Wrong,
|
||||
Doom,
|
||||
TheCitadel,
|
||||
ThePalaceofParoxysmus,
|
||||
TheBlightedGrove,
|
||||
ThePrismofLight
|
||||
}
|
||||
public enum SnowGlobeTypeThree
|
||||
{
|
||||
Luna,
|
||||
Umbra,
|
||||
Zento,
|
||||
Heartwood,
|
||||
Covetous,
|
||||
Deceit,
|
||||
Destard,
|
||||
Hythloth,
|
||||
Khaldun,
|
||||
Shame,
|
||||
Wrong,
|
||||
Doom,
|
||||
TheCitadel,
|
||||
ThePalaceofParoxysmus,
|
||||
TheBlightedGrove,
|
||||
ThePrismofLight
|
||||
}
|
||||
|
||||
public class SnowGlobeThree : SnowGlobe
|
||||
{
|
||||
private SnowGlobeTypeThree m_Type;
|
||||
public class SnowGlobeThree : SnowGlobe
|
||||
{
|
||||
private SnowGlobeTypeThree m_Type;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public SnowGlobeTypeThree Place
|
||||
{
|
||||
get => m_Type;
|
||||
set { m_Type = value; InvalidateProperties(); }
|
||||
}
|
||||
[Constructible]
|
||||
public SnowGlobeThree()
|
||||
: this((SnowGlobeTypeThree)Utility.Random(16))
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Type >= SnowGlobeTypeThree.Covetous )
|
||||
return 1075440 + ( (int) m_Type - 4 );
|
||||
[Constructible]
|
||||
public SnowGlobeThree(SnowGlobeTypeThree type)
|
||||
{
|
||||
m_Type = type;
|
||||
}
|
||||
|
||||
return 1075294 + (int) m_Type;
|
||||
}
|
||||
}
|
||||
public SnowGlobeThree(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeThree()
|
||||
: this( (SnowGlobeTypeThree) Utility.Random( 16 ) )
|
||||
{
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public SnowGlobeTypeThree Place
|
||||
{
|
||||
get => m_Type;
|
||||
set
|
||||
{
|
||||
m_Type = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeThree( SnowGlobeTypeThree type )
|
||||
{
|
||||
m_Type = type;
|
||||
}
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Type >= SnowGlobeTypeThree.Covetous)
|
||||
return 1075440 + ((int)m_Type - 4);
|
||||
|
||||
public SnowGlobeThree( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
return 1075294 + (int)m_Type;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.WriteEncodedInt( (int) m_Type );
|
||||
}
|
||||
writer.Write(0); // version
|
||||
writer.WriteEncodedInt((int)m_Type);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (SnowGlobeTypeThree) reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (SnowGlobeTypeThree)reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,42 +1,42 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class SnowPileDeco : Item
|
||||
{
|
||||
public override string DefaultName => "Snow Pile";
|
||||
public override double DefaultWeight => 2.0;
|
||||
public class SnowPileDeco : Item
|
||||
{
|
||||
private static readonly int[] m_Types = { 0x8E2, 0x8E0, 0x8E6, 0x8E5, 0x8E3 };
|
||||
|
||||
private static readonly int[] m_Types = { 0x8E2, 0x8E0, 0x8E6, 0x8E5, 0x8E3 };
|
||||
[Constructible]
|
||||
public SnowPileDeco()
|
||||
: this(m_Types[Utility.Random(m_Types.Length)])
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowPileDeco()
|
||||
: this(m_Types[Utility.Random(m_Types.Length)])
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public SnowPileDeco(int itemid)
|
||||
: base(itemid)
|
||||
{
|
||||
Hue = 0x481;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowPileDeco( int itemid )
|
||||
: base(itemid)
|
||||
{
|
||||
Hue = 0x481;
|
||||
}
|
||||
public SnowPileDeco(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public SnowPileDeco(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public override string DefaultName => "Snow Pile";
|
||||
public override double DefaultWeight => 2.0;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0);
|
||||
}
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,242 +3,250 @@ using Server.Network;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flippable( 0x456E, 0x456F )]
|
||||
public class SnowStatuePegasus : Item
|
||||
{
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
[Flippable(0x456E, 0x456F)]
|
||||
public class SnowStatuePegasus : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatuePegasus()
|
||||
: base(0x456E)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowStatuePegasus()
|
||||
: base( 0x456E )
|
||||
{
|
||||
}
|
||||
public SnowStatuePegasus(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public SnowStatuePegasus( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable( 0x4578, 0x4579 )]
|
||||
public class SnowStatueSeahorse : Item
|
||||
{
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
[Flippable(0x4578, 0x4579)]
|
||||
public class SnowStatueSeahorse : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueSeahorse()
|
||||
: base(0x4578)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowStatueSeahorse()
|
||||
: base( 0x4578 )
|
||||
{
|
||||
}
|
||||
public SnowStatueSeahorse(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public SnowStatueSeahorse( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable( 0x457A, 0x457B )]
|
||||
public class SnowStatueMermaid : Item
|
||||
{
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
[Flippable(0x457A, 0x457B)]
|
||||
public class SnowStatueMermaid : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueMermaid()
|
||||
: base(0x457A)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowStatueMermaid()
|
||||
: base( 0x457A )
|
||||
{
|
||||
}
|
||||
public SnowStatueMermaid(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public SnowStatueMermaid( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable( 0x457C, 0x457D )]
|
||||
public class SnowStatueGriffon : Item
|
||||
{
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
[Flippable(0x457C, 0x457D)]
|
||||
public class SnowStatueGriffon : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueGriffon()
|
||||
: base(0x457C)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowStatueGriffon()
|
||||
: base( 0x457C )
|
||||
{
|
||||
}
|
||||
public SnowStatueGriffon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public SnowStatueGriffon( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class SnowStatueDeed : Item
|
||||
{
|
||||
public override int LabelNumber => 1114296; // snow statue deed
|
||||
public override double DefaultWeight => 1.0;
|
||||
public class SnowStatueDeed : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueDeed()
|
||||
: base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowStatueDeed()
|
||||
: base( 0x14F0 )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public SnowStatueDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public SnowStatueDeed( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1114296; // snow statue deed
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.CloseGump( typeof( InternalGump ) );
|
||||
from.SendGump( new InternalGump( this ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it.
|
||||
}
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump(typeof(InternalGump));
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private SnowStatueDeed m_Deed;
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private SnowStatueDeed m_Deed;
|
||||
|
||||
public InternalGump( SnowStatueDeed deed ) : base( 100, 200 )
|
||||
{
|
||||
m_Deed = deed;
|
||||
public InternalGump(SnowStatueDeed deed) : base(100, 200)
|
||||
{
|
||||
m_Deed = deed;
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Resizable = false;
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddPage( 0 );
|
||||
AddBackground( 0, 0, 360, 225, 0xA28 );
|
||||
AddPage(0);
|
||||
AddBackground(0, 0, 360, 225, 0xA28);
|
||||
|
||||
AddPage( 1 );
|
||||
AddLabel( 45, 15, 0, "Select One:" );
|
||||
AddPage(1);
|
||||
AddLabel(45, 15, 0, "Select One:");
|
||||
|
||||
AddItem( 35, 75, 0x456E );
|
||||
AddButton( 65, 50, 0x845, 0x846, 1, GumpButtonType.Reply, 0 );
|
||||
AddItem(35, 75, 0x456E);
|
||||
AddButton(65, 50, 0x845, 0x846, 1, GumpButtonType.Reply, 0);
|
||||
|
||||
AddItem( 120, 75, 0x4578 );
|
||||
AddButton( 135, 50, 0x845, 0x846, 2, GumpButtonType.Reply, 0 );
|
||||
AddItem(120, 75, 0x4578);
|
||||
AddButton(135, 50, 0x845, 0x846, 2, GumpButtonType.Reply, 0);
|
||||
|
||||
AddItem( 190, 75, 0x457A );
|
||||
AddButton( 205, 50, 0x845, 0x846, 3, GumpButtonType.Reply, 0 );
|
||||
AddItem(190, 75, 0x457A);
|
||||
AddButton(205, 50, 0x845, 0x846, 3, GumpButtonType.Reply, 0);
|
||||
|
||||
AddItem( 250, 75, 0x457C );
|
||||
AddButton( 275, 50, 0x845, 0x846, 4, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
AddItem(250, 75, 0x457C);
|
||||
AddButton(275, 50, 0x845, 0x846, 4, GumpButtonType.Reply, 0);
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( m_Deed == null || m_Deed.Deleted )
|
||||
return;
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Deed == null || m_Deed.Deleted)
|
||||
return;
|
||||
|
||||
Mobile from = sender.Mobile;
|
||||
Mobile from = sender.Mobile;
|
||||
|
||||
if ( !m_Deed.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it
|
||||
return;
|
||||
}
|
||||
if (!m_Deed.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it
|
||||
return;
|
||||
}
|
||||
|
||||
Item statue = null;
|
||||
Item statue = null;
|
||||
|
||||
switch ( info.ButtonID )
|
||||
{
|
||||
case 1: statue = new SnowStatuePegasus(); break;
|
||||
case 2: statue = new SnowStatueSeahorse(); break;
|
||||
case 3: statue = new SnowStatueMermaid(); break;
|
||||
case 4: statue = new SnowStatueGriffon(); break;
|
||||
}
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 1:
|
||||
statue = new SnowStatuePegasus();
|
||||
break;
|
||||
case 2:
|
||||
statue = new SnowStatueSeahorse();
|
||||
break;
|
||||
case 3:
|
||||
statue = new SnowStatueMermaid();
|
||||
break;
|
||||
case 4:
|
||||
statue = new SnowStatueGriffon();
|
||||
break;
|
||||
}
|
||||
|
||||
if ( statue == null )
|
||||
return;
|
||||
if (statue == null)
|
||||
return;
|
||||
|
||||
if ( !from.PlaceInBackpack( statue ) )
|
||||
{
|
||||
statue.Delete();
|
||||
from.SendLocalizedMessage( 1078837 ); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Deed.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!from.PlaceInBackpack(statue))
|
||||
{
|
||||
statue.Delete();
|
||||
from.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Deed.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,58 +1,58 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class BlueSnowflake : Item
|
||||
{
|
||||
[Constructible]
|
||||
public BlueSnowflake() : base( 0x232E )
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public class BlueSnowflake : Item
|
||||
{
|
||||
[Constructible]
|
||||
public BlueSnowflake() : base(0x232E)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public BlueSnowflake( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public BlueSnowflake(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class WhiteSnowflake : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WhiteSnowflake() : base( 0x232F )
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public class WhiteSnowflake : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WhiteSnowflake() : base(0x232F)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public WhiteSnowflake( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public WhiteSnowflake(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,154 +1,159 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Flippable( 0x2328, 0x2329 )]
|
||||
public class Snowman : Item, IDyable
|
||||
{
|
||||
public static string GetRandomTitle()
|
||||
{
|
||||
// All hail OSI staff
|
||||
string[] titles = {
|
||||
/* 1 */ "Backflash",
|
||||
/* 2 */ "Carbon",
|
||||
/* 3 */ "Colbalistic",
|
||||
/* 4 */ "Comforl",
|
||||
/* 5 */ "Coppacchia",
|
||||
/* 6 */ "Cyrus",
|
||||
/* 7 */ "DannyB",
|
||||
/* 8 */ "DJSoul",
|
||||
/* 9 */ "DraconisRex",
|
||||
/* 10 */ "Earia",
|
||||
/* 11 */ "Foster",
|
||||
/* 12 */ "Gonzo",
|
||||
/* 13 */ "Haan",
|
||||
/* 14 */ "Halona",
|
||||
/* 15 */ "Hugo",
|
||||
/* 16 */ "Hyacinth",
|
||||
/* 17 */ "Imirian",
|
||||
/* 18 */ "Jinsol",
|
||||
/* 19 */ "Liciatia",
|
||||
/* 20 */ "Loewen",
|
||||
/* 21 */ "Loke",
|
||||
/* 22 */ "Magnus",
|
||||
/* 23 */ "Maleki",
|
||||
/* 24 */ "Morpheus",
|
||||
/* 25 */ "Obberron",
|
||||
/* 26 */ "Odee",
|
||||
/* 27 */ "Orbeus",
|
||||
/* 28 */ "Pax",
|
||||
/* 29 */ "Phields",
|
||||
/* 30 */ "Pigpen",
|
||||
/* 31 */ "Platinum",
|
||||
/* 32 */ "Polpol",
|
||||
/* 33 */ "Prume",
|
||||
/* 34 */ "Quinnly",
|
||||
/* 35 */ "Ragnarok",
|
||||
/* 36 */ "Rend",
|
||||
/* 37 */ "Roland",
|
||||
/* 38 */ "RyanM",
|
||||
/* 39 */ "Screach",
|
||||
/* 40 */ "Seraph",
|
||||
/* 41 */ "Silvani",
|
||||
/* 42 */ "Sherbear",
|
||||
/* 43 */ "SkyWalker",
|
||||
/* 44 */ "Snark",
|
||||
/* 45 */ "Sowl",
|
||||
/* 46 */ "Spada",
|
||||
/* 47 */ "Starblade",
|
||||
/* 48 */ "Tenacious",
|
||||
/* 49 */ "Tnez",
|
||||
/* 50 */ "Wasia",
|
||||
/* 51 */ "Zilo",
|
||||
/* 52 */ "Zippy",
|
||||
/* 53 */ "Zoer"
|
||||
};
|
||||
[Flippable(0x2328, 0x2329)]
|
||||
public class Snowman : Item, IDyable
|
||||
{
|
||||
private string m_Title;
|
||||
|
||||
if ( titles.Length > 0 )
|
||||
return titles[Utility.Random( titles.Length )];
|
||||
[Constructible]
|
||||
public Snowman() : this(Utility.RandomDyedHue(), GetRandomTitle())
|
||||
{
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
[Constructible]
|
||||
public Snowman(int hue) : this(hue, GetRandomTitle())
|
||||
{
|
||||
}
|
||||
|
||||
private string m_Title;
|
||||
[Constructible]
|
||||
public Snowman(string title) : this(Utility.RandomDyedHue(), title)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string Title
|
||||
{
|
||||
get => m_Title;
|
||||
set{ m_Title = value; InvalidateProperties(); }
|
||||
}
|
||||
[Constructible]
|
||||
public Snowman(int hue, string title) : base(Utility.Random(0x2328, 2))
|
||||
{
|
||||
Weight = 10.0;
|
||||
Hue = hue;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
[Constructible]
|
||||
public Snowman() : this( Utility.RandomDyedHue(), GetRandomTitle() )
|
||||
{
|
||||
}
|
||||
m_Title = title;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Snowman( int hue ) : this( hue, GetRandomTitle() )
|
||||
{
|
||||
}
|
||||
public Snowman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Snowman( string title ) : this( Utility.RandomDyedHue(), title )
|
||||
{
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string Title
|
||||
{
|
||||
get => m_Title;
|
||||
set
|
||||
{
|
||||
m_Title = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Snowman( int hue, string title ) : base( Utility.Random( 0x2328, 2 ) )
|
||||
{
|
||||
Weight = 10.0;
|
||||
Hue = hue;
|
||||
LootType = LootType.Blessed;
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
return false;
|
||||
|
||||
m_Title = title;
|
||||
}
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( m_Title != null )
|
||||
list.Add( 1062841, m_Title ); // ~1_NAME~ the Snowman
|
||||
}
|
||||
public static string GetRandomTitle()
|
||||
{
|
||||
// All hail OSI staff
|
||||
string[] titles =
|
||||
{
|
||||
/* 1 */ "Backflash",
|
||||
/* 2 */ "Carbon",
|
||||
/* 3 */ "Colbalistic",
|
||||
/* 4 */ "Comforl",
|
||||
/* 5 */ "Coppacchia",
|
||||
/* 6 */ "Cyrus",
|
||||
/* 7 */ "DannyB",
|
||||
/* 8 */ "DJSoul",
|
||||
/* 9 */ "DraconisRex",
|
||||
/* 10 */ "Earia",
|
||||
/* 11 */ "Foster",
|
||||
/* 12 */ "Gonzo",
|
||||
/* 13 */ "Haan",
|
||||
/* 14 */ "Halona",
|
||||
/* 15 */ "Hugo",
|
||||
/* 16 */ "Hyacinth",
|
||||
/* 17 */ "Imirian",
|
||||
/* 18 */ "Jinsol",
|
||||
/* 19 */ "Liciatia",
|
||||
/* 20 */ "Loewen",
|
||||
/* 21 */ "Loke",
|
||||
/* 22 */ "Magnus",
|
||||
/* 23 */ "Maleki",
|
||||
/* 24 */ "Morpheus",
|
||||
/* 25 */ "Obberron",
|
||||
/* 26 */ "Odee",
|
||||
/* 27 */ "Orbeus",
|
||||
/* 28 */ "Pax",
|
||||
/* 29 */ "Phields",
|
||||
/* 30 */ "Pigpen",
|
||||
/* 31 */ "Platinum",
|
||||
/* 32 */ "Polpol",
|
||||
/* 33 */ "Prume",
|
||||
/* 34 */ "Quinnly",
|
||||
/* 35 */ "Ragnarok",
|
||||
/* 36 */ "Rend",
|
||||
/* 37 */ "Roland",
|
||||
/* 38 */ "RyanM",
|
||||
/* 39 */ "Screach",
|
||||
/* 40 */ "Seraph",
|
||||
/* 41 */ "Silvani",
|
||||
/* 42 */ "Sherbear",
|
||||
/* 43 */ "SkyWalker",
|
||||
/* 44 */ "Snark",
|
||||
/* 45 */ "Sowl",
|
||||
/* 46 */ "Spada",
|
||||
/* 47 */ "Starblade",
|
||||
/* 48 */ "Tenacious",
|
||||
/* 49 */ "Tnez",
|
||||
/* 50 */ "Wasia",
|
||||
/* 51 */ "Zilo",
|
||||
/* 52 */ "Zippy",
|
||||
/* 53 */ "Zoer"
|
||||
};
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
if (titles.Length > 0)
|
||||
return titles[Utility.Random(titles.Length)];
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
return null;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
public Snowman( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
if (m_Title != null)
|
||||
list.Add(1062841, m_Title); // ~1_NAME~ the Snowman
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
writer.Write(1); // version
|
||||
|
||||
writer.Write( (string) m_Title );
|
||||
}
|
||||
writer.Write(m_Title);
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Title = reader.ReadString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Title = reader.ReadString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Utility.Intern( ref m_Title );
|
||||
}
|
||||
}
|
||||
Utility.Intern(ref m_Title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,61 +1,60 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
[FlippableAttribute( 0x2bd9, 0x2bda )]
|
||||
public class GreenStocking : BaseContainer
|
||||
{
|
||||
public override int DefaultGumpID => 0x103;
|
||||
public override int DefaultDropSound => 0x42;
|
||||
[Furniture]
|
||||
[Flippable(0x2bd9, 0x2bda)]
|
||||
public class GreenStocking : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GreenStocking() : base(Utility.Random(0x2BD9, 2))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GreenStocking() : base ( Utility.Random( 0x2BD9, 2 ) )
|
||||
{
|
||||
}
|
||||
public GreenStocking(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public GreenStocking( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override int DefaultGumpID => 0x103;
|
||||
public override int DefaultDropSound => 0x42;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[FlippableAttribute( 0x2bdb, 0x2bdc )]
|
||||
public class RedStocking : BaseContainer
|
||||
{
|
||||
public override int DefaultGumpID => 0x103;
|
||||
public override int DefaultDropSound => 0x42;
|
||||
[Furniture]
|
||||
[Flippable(0x2bdb, 0x2bdc)]
|
||||
public class RedStocking : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public RedStocking() : base(Utility.Random(0x2BDB, 2))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public RedStocking() : base ( Utility.Random( 0x2BDB, 2 ) )
|
||||
{
|
||||
}
|
||||
public RedStocking(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public RedStocking( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override int DefaultGumpID => 0x103;
|
||||
public override int DefaultDropSound => 0x42;
|
||||
|
||||
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 override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +1,33 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
[Flippable( 0x232A, 0x232B )]
|
||||
public class WinterGiftPackage2003 : GiftBox
|
||||
{
|
||||
[Constructible]
|
||||
public WinterGiftPackage2003()
|
||||
{
|
||||
DropItem( new Snowman() );
|
||||
DropItem( new WreathDeed() );
|
||||
DropItem( new BlueSnowflake() );
|
||||
DropItem( new RedPoinsettia() );
|
||||
}
|
||||
[Flippable(0x232A, 0x232B)]
|
||||
public class WinterGiftPackage2003 : GiftBox
|
||||
{
|
||||
[Constructible]
|
||||
public WinterGiftPackage2003()
|
||||
{
|
||||
DropItem(new Snowman());
|
||||
DropItem(new WreathDeed());
|
||||
DropItem(new BlueSnowflake());
|
||||
DropItem(new RedPoinsettia());
|
||||
}
|
||||
|
||||
public WinterGiftPackage2003( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public WinterGiftPackage2003(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,311 +6,311 @@ using Server.Targeting;
|
|||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class WreathAddon : Item, IDyable, IAddon
|
||||
{
|
||||
[Constructible]
|
||||
public WreathAddon() : this( Utility.RandomDyedHue() )
|
||||
{
|
||||
}
|
||||
public class WreathAddon : Item, IDyable, IAddon
|
||||
{
|
||||
[Constructible]
|
||||
public WreathAddon() : this(Utility.RandomDyedHue())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WreathAddon( int hue ) : base( 0x232C )
|
||||
{
|
||||
Hue = hue;
|
||||
Movable = false;
|
||||
}
|
||||
[Constructible]
|
||||
public WreathAddon(int hue) : base(0x232C)
|
||||
{
|
||||
Hue = hue;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public WreathAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public WreathAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public bool CouldFit( IPoint3D p, Map map )
|
||||
{
|
||||
if ( !map.CanFit( p.X, p.Y, p.Z, ItemData.Height ) )
|
||||
return false;
|
||||
public bool CouldFit(IPoint3D p, Map map)
|
||||
{
|
||||
if (!map.CanFit(p.X, p.Y, p.Z, ItemData.Height))
|
||||
return false;
|
||||
|
||||
if ( ItemID == 0x232C )
|
||||
return BaseAddon.IsWall( p.X, p.Y - 1, p.Z, map ); // North wall
|
||||
return BaseAddon.IsWall( p.X - 1, p.Y, p.Z, map ); // West wall
|
||||
}
|
||||
if (ItemID == 0x232C)
|
||||
return BaseAddon.IsWall(p.X, p.Y - 1, p.Z, map); // North wall
|
||||
return BaseAddon.IsWall(p.X - 1, p.Y, p.Z, map); // West wall
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public Item Deed => new WreathDeed(Hue);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
public virtual bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
return false;
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
BaseHouse house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
if (house != null && house.IsCoOwner(from))
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 1))
|
||||
{
|
||||
Hue = sender.DyedHue;
|
||||
return true;
|
||||
}
|
||||
|
||||
Timer.DelayCall( TimeSpan.Zero, FixMovingCrate );
|
||||
}
|
||||
from.SendLocalizedMessage(500295); // You are too far away to do that.
|
||||
return false;
|
||||
}
|
||||
|
||||
private void FixMovingCrate()
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( Movable || IsLockedDown )
|
||||
{
|
||||
Item deed = Deed;
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
if ( Parent is Item item )
|
||||
{
|
||||
item.AddItem( deed );
|
||||
deed.Location = Location;
|
||||
}
|
||||
else
|
||||
{
|
||||
deed.MoveToWorld( Location, Map );
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
public Item Deed => new WreathDeed( Hue );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( this );
|
||||
Timer.DelayCall(TimeSpan.Zero, FixMovingCrate);
|
||||
}
|
||||
|
||||
if ( house != null && house.IsCoOwner( from ) )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), 3 ) )
|
||||
{
|
||||
from.CloseGump( typeof( WreathAddonGump ) );
|
||||
from.SendGump( new WreathAddonGump( from, this ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
}
|
||||
}
|
||||
}
|
||||
private void FixMovingCrate()
|
||||
{
|
||||
if (Deleted)
|
||||
return;
|
||||
|
||||
public virtual bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
return false;
|
||||
if (Movable || IsLockedDown)
|
||||
{
|
||||
Item deed = Deed;
|
||||
|
||||
BaseHouse house = BaseHouse.FindHouseAt( this );
|
||||
if (Parent is Item item)
|
||||
{
|
||||
item.AddItem(deed);
|
||||
deed.Location = Location;
|
||||
}
|
||||
else
|
||||
{
|
||||
deed.MoveToWorld(Location, Map);
|
||||
}
|
||||
|
||||
if ( house != null && house.IsCoOwner( from ) )
|
||||
{
|
||||
if ( from.InRange( GetWorldLocation(), 1 ) )
|
||||
{
|
||||
Hue = sender.DyedHue;
|
||||
return true;
|
||||
}
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 500295 ); // You are too far away to do that.
|
||||
return false;
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
return false;
|
||||
}
|
||||
if (house != null && house.IsCoOwner(from))
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 3))
|
||||
{
|
||||
from.CloseGump(typeof(WreathAddonGump));
|
||||
from.SendGump(new WreathAddonGump(from, this));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class WreathAddonGump : Gump
|
||||
{
|
||||
private Mobile m_From;
|
||||
private WreathAddon m_Addon;
|
||||
private class WreathAddonGump : Gump
|
||||
{
|
||||
private WreathAddon m_Addon;
|
||||
private Mobile m_From;
|
||||
|
||||
public WreathAddonGump( Mobile from, WreathAddon addon ) : base( 150, 50 )
|
||||
{
|
||||
m_From = from;
|
||||
m_Addon = addon;
|
||||
public WreathAddonGump(Mobile from, WreathAddon addon) : base(150, 50)
|
||||
{
|
||||
m_From = from;
|
||||
m_Addon = addon;
|
||||
|
||||
AddPage( 0 );
|
||||
AddPage(0);
|
||||
|
||||
AddBackground( 0, 0, 220, 170, 0x13BE );
|
||||
AddBackground( 10, 10, 200, 150, 0xBB8 );
|
||||
AddHtmlLocalized( 20, 30, 180, 60, 1062839, false, false ); // Do you wish to re-deed this decoration?
|
||||
AddHtmlLocalized( 55, 100, 160, 25, 1011011, false, false ); // CONTINUE
|
||||
AddButton( 20, 100, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 55, 125, 160, 25, 1011012, false, false ); // CANCEL
|
||||
AddButton( 20, 125, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
AddBackground(0, 0, 220, 170, 0x13BE);
|
||||
AddBackground(10, 10, 200, 150, 0xBB8);
|
||||
AddHtmlLocalized(20, 30, 180, 60, 1062839, false, false); // Do you wish to re-deed this decoration?
|
||||
AddHtmlLocalized(55, 100, 160, 25, 1011011, false, false); // CONTINUE
|
||||
AddButton(20, 100, 0xFA5, 0xFA7, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 125, 160, 25, 1011012, false, false); // CANCEL
|
||||
AddButton(20, 125, 0xFA5, 0xFA7, 0, GumpButtonType.Reply, 0);
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( m_Addon.Deleted )
|
||||
return;
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Addon.Deleted)
|
||||
return;
|
||||
|
||||
if ( info.ButtonID == 1 )
|
||||
{
|
||||
if ( m_From.InRange( m_Addon.GetWorldLocation(), 3 ) )
|
||||
{
|
||||
m_From.AddToBackpack( m_Addon.Deed );
|
||||
m_Addon.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_From.SendLocalizedMessage( 500295 ); // You are too far away to do that.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (info.ButtonID == 1)
|
||||
{
|
||||
if (m_From.InRange(m_Addon.GetWorldLocation(), 3))
|
||||
{
|
||||
m_From.AddToBackpack(m_Addon.Deed);
|
||||
m_Addon.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_From.SendLocalizedMessage(500295); // You are too far away to do that.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable( 0x14F0, 0x14EF )]
|
||||
public class WreathDeed : Item
|
||||
{
|
||||
public override int LabelNumber => 1062837; // holiday wreath deed
|
||||
[Flippable(0x14F0, 0x14EF)]
|
||||
public class WreathDeed : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WreathDeed() : this(Utility.RandomDyedHue())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WreathDeed() : this( Utility.RandomDyedHue() )
|
||||
{
|
||||
}
|
||||
[Constructible]
|
||||
public WreathDeed(int hue) : base(0x14F0)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = hue;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WreathDeed( int hue ) : base( 0x14F0 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = hue;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public WreathDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public WreathDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1062837; // holiday wreath deed
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( from );
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
if ( house != null && house.IsCoOwner( from ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1062838 ); // Where would you like to place this decoration?
|
||||
from.BeginTarget( -1, true, TargetFlags.None, Placement_OnTarget, null );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 502092 ); // You must be in your house to do this.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
if (house != null && house.IsCoOwner(from))
|
||||
{
|
||||
from.SendLocalizedMessage(1062838); // Where would you like to place this decoration?
|
||||
from.BeginTarget(-1, true, TargetFlags.None, Placement_OnTarget, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502092); // You must be in your house to do this.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public void Placement_OnTarget( Mobile from, object targeted, object state )
|
||||
{
|
||||
if ( !(targeted is IPoint3D p) )
|
||||
return;
|
||||
public void Placement_OnTarget(Mobile from, object targeted, object state)
|
||||
{
|
||||
if (!(targeted is IPoint3D p))
|
||||
return;
|
||||
|
||||
Point3D loc = new Point3D( p );
|
||||
Point3D loc = new Point3D(p);
|
||||
|
||||
BaseHouse house = BaseHouse.FindHouseAt( loc, from.Map, 16 );
|
||||
BaseHouse house = BaseHouse.FindHouseAt(loc, from.Map, 16);
|
||||
|
||||
if ( house != null && house.IsCoOwner( from ) )
|
||||
{
|
||||
bool northWall = BaseAddon.IsWall( loc.X, loc.Y - 1, loc.Z, from.Map );
|
||||
bool westWall = BaseAddon.IsWall( loc.X - 1, loc.Y, loc.Z, from.Map );
|
||||
if (house != null && house.IsCoOwner(from))
|
||||
{
|
||||
bool northWall = BaseAddon.IsWall(loc.X, loc.Y - 1, loc.Z, from.Map);
|
||||
bool westWall = BaseAddon.IsWall(loc.X - 1, loc.Y, loc.Z, from.Map);
|
||||
|
||||
if ( northWall && westWall )
|
||||
from.SendGump( new WreathDeedGump( from, loc, this ) );
|
||||
else
|
||||
PlaceAddon( from, loc, northWall, westWall );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042036 ); // That location is not in your house.
|
||||
}
|
||||
}
|
||||
if (northWall && westWall)
|
||||
from.SendGump(new WreathDeedGump(from, loc, this));
|
||||
else
|
||||
PlaceAddon(from, loc, northWall, westWall);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042036); // That location is not in your house.
|
||||
}
|
||||
}
|
||||
|
||||
private void PlaceAddon( Mobile from, Point3D loc, bool northWall, bool westWall )
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
private void PlaceAddon(Mobile from, Point3D loc, bool northWall, bool westWall)
|
||||
{
|
||||
if (Deleted)
|
||||
return;
|
||||
|
||||
BaseHouse house = BaseHouse.FindHouseAt( loc, from.Map, 16 );
|
||||
BaseHouse house = BaseHouse.FindHouseAt(loc, from.Map, 16);
|
||||
|
||||
if ( house == null || !house.IsCoOwner( from ) )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042036 ); // That location is not in your house.
|
||||
return;
|
||||
}
|
||||
if (house == null || !house.IsCoOwner(from))
|
||||
{
|
||||
from.SendLocalizedMessage(1042036); // That location is not in your house.
|
||||
return;
|
||||
}
|
||||
|
||||
int itemID = 0;
|
||||
int itemID = 0;
|
||||
|
||||
if ( northWall )
|
||||
itemID = 0x232C;
|
||||
else if ( westWall )
|
||||
itemID = 0x232D;
|
||||
else
|
||||
from.SendLocalizedMessage( 1062840 ); // The decoration must be placed next to a wall.
|
||||
if (northWall)
|
||||
itemID = 0x232C;
|
||||
else if (westWall)
|
||||
itemID = 0x232D;
|
||||
else
|
||||
from.SendLocalizedMessage(1062840); // The decoration must be placed next to a wall.
|
||||
|
||||
if ( itemID > 0 )
|
||||
{
|
||||
Item addon = new WreathAddon( Hue );
|
||||
if (itemID > 0)
|
||||
{
|
||||
Item addon = new WreathAddon(Hue);
|
||||
|
||||
addon.ItemID = itemID;
|
||||
addon.MoveToWorld( loc, from.Map );
|
||||
addon.ItemID = itemID;
|
||||
addon.MoveToWorld(loc, from.Map);
|
||||
|
||||
house.Addons.Add( addon );
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
house.Addons.Add(addon);
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
private class WreathDeedGump : Gump
|
||||
{
|
||||
private Mobile m_From;
|
||||
private Point3D m_Loc;
|
||||
private WreathDeed m_Deed;
|
||||
private class WreathDeedGump : Gump
|
||||
{
|
||||
private WreathDeed m_Deed;
|
||||
private Mobile m_From;
|
||||
private Point3D m_Loc;
|
||||
|
||||
public WreathDeedGump( Mobile from, Point3D loc, WreathDeed deed ) : base( 150, 50 )
|
||||
{
|
||||
m_From = from;
|
||||
m_Loc = loc;
|
||||
m_Deed = deed;
|
||||
public WreathDeedGump(Mobile from, Point3D loc, WreathDeed deed) : base(150, 50)
|
||||
{
|
||||
m_From = from;
|
||||
m_Loc = loc;
|
||||
m_Deed = deed;
|
||||
|
||||
AddBackground( 0, 0, 300, 150, 0xA28 );
|
||||
AddBackground(0, 0, 300, 150, 0xA28);
|
||||
|
||||
AddPage( 0 );
|
||||
AddPage(0);
|
||||
|
||||
AddItem( 90, 30, 0x232D );
|
||||
AddItem( 180, 30, 0x232C );
|
||||
AddButton( 50, 35, 0x868, 0x869, 1, GumpButtonType.Reply, 0 );
|
||||
AddButton( 145, 35, 0x868, 0x869, 2, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
AddItem(90, 30, 0x232D);
|
||||
AddItem(180, 30, 0x232C);
|
||||
AddButton(50, 35, 0x868, 0x869, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(145, 35, 0x868, 0x869, 2, GumpButtonType.Reply, 0);
|
||||
}
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( m_Deed.Deleted )
|
||||
return;
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Deed.Deleted)
|
||||
return;
|
||||
|
||||
switch( info.ButtonID )
|
||||
{
|
||||
case 1:
|
||||
m_Deed.PlaceAddon( m_From, m_Loc, false, true );
|
||||
break;
|
||||
case 2:
|
||||
m_Deed.PlaceAddon( m_From, m_Loc, true, false );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 1:
|
||||
m_Deed.PlaceAddon(m_From, m_Loc, false, true);
|
||||
break;
|
||||
case 2:
|
||||
m_Deed.PlaceAddon(m_From, m_Loc, true, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,36 +1,36 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
public class WristWatch : Clock
|
||||
{
|
||||
public override int LabelNumber => 1041421; // a wrist watch
|
||||
public override double DefaultWeight => 1.0;
|
||||
public class WristWatch : Clock
|
||||
{
|
||||
[Constructible]
|
||||
public WristWatch()
|
||||
: base(0x1086)
|
||||
{
|
||||
Weight = DefaultWeight;
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Bracelet;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WristWatch()
|
||||
: base( 0x1086 )
|
||||
{
|
||||
Weight = DefaultWeight;
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Bracelet;
|
||||
}
|
||||
public WristWatch(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public WristWatch( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
public override int LabelNumber => 1041421; // a wrist watch
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue