#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
69
Scripts/Items/Special/Veteran Rewards/CommodityDeedBox.cs
Normal file
69
Scripts/Items/Special/Veteran Rewards/CommodityDeedBox.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Engines.VeteranRewards;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Furniture]
|
||||
public class CommodityDeedBox : BaseContainer, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get { return 1080523; } } // Commodity Deed Box
|
||||
public override int DefaultGumpID{ get{ return 0x43; } }
|
||||
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsRewardItem
|
||||
{
|
||||
get{ return m_IsRewardItem; }
|
||||
set{ m_IsRewardItem = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CommodityDeedBox() : base( 0x9AA )
|
||||
{
|
||||
Hue = 0x47;
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
||||
public CommodityDeedBox( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_IsRewardItem )
|
||||
list.Add( 1076217 ); // 1st Year Veteran Reward
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
|
||||
writer.Write( (bool) m_IsRewardItem );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
|
||||
public static CommodityDeedBox Find( Item deed )
|
||||
{
|
||||
Item parent = deed;
|
||||
|
||||
while ( parent != null && !( parent is CommodityDeedBox ) )
|
||||
parent = parent.Parent as Item;
|
||||
|
||||
return parent as CommodityDeedBox;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue