Add DefaultName property to Mobiles & Items (#18)
This commit is contained in:
parent
b06f5bf60d
commit
8ee42c8ea2
713 changed files with 5112 additions and 4987 deletions
|
|
@ -7,10 +7,10 @@ using Server.Targeting;
|
|||
using Server.Engines.VeteranRewards;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
{
|
||||
public class WallBannerComponent : AddonComponent, IDyable
|
||||
{
|
||||
public override bool NeedsWall{ get{ return true; } }
|
||||
public override bool NeedsWall => true;
|
||||
public override Point3D WallPosition{ get{ return this.East ? new Point3D( -1, 0, 0 ) : new Point3D( 0, -1, 0 ); } }
|
||||
|
||||
public bool East{ get { return ((WallBanner)Addon).East; } }
|
||||
|
|
@ -29,14 +29,14 @@ namespace Server.Items
|
|||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
|
||||
|
||||
public bool Dye( Mobile from, DyeTub sender )
|
||||
{
|
||||
if ( Deleted )
|
||||
|
|
@ -52,14 +52,14 @@ namespace Server.Items
|
|||
public class WallBanner : BaseAddon, IRewardItem
|
||||
{
|
||||
public override BaseAddonDeed Deed
|
||||
{
|
||||
{
|
||||
get
|
||||
{
|
||||
{
|
||||
WallBannerDeed deed = new WallBannerDeed();
|
||||
deed.IsRewardItem = m_IsRewardItem;
|
||||
|
||||
return deed;
|
||||
}
|
||||
return deed;
|
||||
}
|
||||
}
|
||||
|
||||
private bool m_IsRewardItem;
|
||||
|
|
@ -70,7 +70,7 @@ namespace Server.Items
|
|||
get{ return m_IsRewardItem; }
|
||||
set{ m_IsRewardItem = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
|
||||
private bool m_East;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
|
|
@ -79,7 +79,7 @@ namespace Server.Items
|
|||
get{ return m_East; }
|
||||
set{ m_IsRewardItem = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
|
||||
[Constructible]
|
||||
public WallBanner( int bannerID ) : base()
|
||||
{
|
||||
|
|
@ -87,147 +87,147 @@ namespace Server.Items
|
|||
|
||||
switch ( bannerID )
|
||||
{
|
||||
case 1:
|
||||
case 1:
|
||||
AddComponent( new WallBannerComponent( 0x161F ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x161E ), 0, 1, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x161D ), 0, 2, 0 );
|
||||
break;
|
||||
case 2:
|
||||
case 2:
|
||||
AddComponent( new WallBannerComponent( 0x1586 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1587 ), 1, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1588 ), 2, 0, 0 );
|
||||
break;
|
||||
case 3:
|
||||
case 3:
|
||||
AddComponent( new WallBannerComponent( 0x1622 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1621 ), 0, 1, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1620 ), 0, 2, 0 );
|
||||
break;
|
||||
case 4:
|
||||
case 4:
|
||||
AddComponent( new WallBannerComponent( 0x1589 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x158A ), 1, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x158B ), 2, 0, 0 );
|
||||
break;
|
||||
case 5:
|
||||
case 5:
|
||||
AddComponent( new WallBannerComponent( 0x1625 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1624 ), 0, 1, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1623 ), 0, 2, 0 );
|
||||
break;
|
||||
case 6:
|
||||
case 6:
|
||||
AddComponent( new WallBannerComponent( 0x158C ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x158D ), 1, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x158E ), 2, 0, 0 );
|
||||
break;
|
||||
case 7:
|
||||
case 7:
|
||||
AddComponent( new WallBannerComponent( 0x1628 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1627 ), 0, 1, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1626 ), 0, 2, 0 );
|
||||
break;
|
||||
case 8:
|
||||
case 8:
|
||||
AddComponent( new WallBannerComponent( 0x1590 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1591 ), 1, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x158F ), 2, 0, 0 );
|
||||
break;
|
||||
case 9:
|
||||
case 9:
|
||||
AddComponent( new WallBannerComponent( 0x162A ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1629 ), 0, 1, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1626 ), 0, 2, 0 );
|
||||
break;
|
||||
case 10:
|
||||
case 10:
|
||||
AddComponent( new WallBannerComponent( 0x1592 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1593 ), 1, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x158F ), 2, 0, 0 );
|
||||
break;
|
||||
case 11:
|
||||
case 11:
|
||||
AddComponent( new WallBannerComponent( 0x162D ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x162C ), 0, 1, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x162B ), 0, 2, 0 );
|
||||
break;
|
||||
case 12:
|
||||
case 12:
|
||||
AddComponent( new WallBannerComponent( 0x1594 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1595 ), 1, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1596 ), 2, 0, 0 );
|
||||
break;
|
||||
case 13:
|
||||
case 13:
|
||||
AddComponent( new WallBannerComponent( 0x1632 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1631 ), 0, 1, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x162E ), 0, 2, 0 );
|
||||
break;
|
||||
case 14:
|
||||
case 14:
|
||||
AddComponent( new WallBannerComponent( 0x1598 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x159B ), 1, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x159C ), 2, 0, 0 );
|
||||
break;
|
||||
case 15:
|
||||
case 15:
|
||||
AddComponent( new WallBannerComponent( 0x1633 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1630 ), 0, 1, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x162F ), 0, 2, 0 );
|
||||
break;
|
||||
case 16:
|
||||
case 16:
|
||||
AddComponent( new WallBannerComponent( 0x1599 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x159A ), 1, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x159D ), 2, 0, 0 );
|
||||
break;
|
||||
|
||||
|
||||
case 17:
|
||||
case 17:
|
||||
AddComponent( new WallBannerComponent( 0x1610 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x160F ), 0, 1, 0 );
|
||||
break;
|
||||
case 18:
|
||||
case 18:
|
||||
AddComponent( new WallBannerComponent( 0x15A0 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x15A1 ), 1, 0, 0 );
|
||||
break;
|
||||
|
||||
case 19:
|
||||
case 19:
|
||||
AddComponent( new WallBannerComponent( 0x1612 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1611 ), 0, 1, 0 );
|
||||
break;
|
||||
case 20:
|
||||
case 20:
|
||||
AddComponent( new WallBannerComponent( 0x15A2 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x15A3 ), 1, 0, 0 );
|
||||
break;
|
||||
|
||||
case 21:
|
||||
case 21:
|
||||
AddComponent( new WallBannerComponent( 0x1614 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1613 ), 0, 1, 0 );
|
||||
break;
|
||||
case 22:
|
||||
case 22:
|
||||
AddComponent( new WallBannerComponent( 0x15A4 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x15A5 ), 1, 0, 0 );
|
||||
break;
|
||||
|
||||
case 23:
|
||||
case 23:
|
||||
AddComponent( new WallBannerComponent( 0x1616 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1615 ), 0, 1, 0 );
|
||||
break;
|
||||
case 24:
|
||||
case 24:
|
||||
AddComponent( new WallBannerComponent( 0x15A6 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x15A7 ), 1, 0, 0 );
|
||||
break;
|
||||
|
||||
case 25:
|
||||
case 25:
|
||||
AddComponent( new WallBannerComponent( 0x1618 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1617 ), 0, 1, 0 );
|
||||
break;
|
||||
case 26:
|
||||
case 26:
|
||||
AddComponent( new WallBannerComponent( 0x15A8 ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x15A9 ), 1, 0, 0 );
|
||||
break;
|
||||
|
||||
case 27:
|
||||
case 27:
|
||||
AddComponent( new WallBannerComponent( 0x161A ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x1619 ), 0, 1, 0 );
|
||||
break;
|
||||
case 28:
|
||||
case 28:
|
||||
AddComponent( new WallBannerComponent( 0x15AA ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x15AB ), 1, 0, 0 );
|
||||
break;
|
||||
|
||||
case 29:
|
||||
case 29:
|
||||
AddComponent( new WallBannerComponent( 0x161C ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x161B ), 0, 1, 0 );
|
||||
break;
|
||||
case 30:
|
||||
case 30:
|
||||
AddComponent( new WallBannerComponent( 0x15AC ), 0, 0, 0 );
|
||||
AddComponent( new WallBannerComponent( 0x15AD ), 1, 0, 0 );
|
||||
break;
|
||||
|
|
@ -243,22 +243,22 @@ namespace Server.Items
|
|||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
|
||||
|
||||
writer.Write( (bool) m_East );
|
||||
writer.Write( (bool) m_IsRewardItem );
|
||||
}
|
||||
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
|
||||
m_East = reader.ReadBool();
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class WallBannerDeed : BaseAddonDeed, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1080549; } } // Wall Banner Deed
|
||||
|
|
@ -283,43 +283,43 @@ namespace Server.Items
|
|||
get{ return m_IsRewardItem; }
|
||||
set{ m_IsRewardItem = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
|
||||
[Constructible]
|
||||
public WallBannerDeed() : base()
|
||||
{
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public WallBannerDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
|
||||
if ( m_IsRewardItem )
|
||||
list.Add( 1076225 ); // 9th Year Veteran Reward
|
||||
}
|
||||
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
{
|
||||
if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
|
||||
return;
|
||||
|
||||
|
||||
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.
|
||||
from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it.
|
||||
}
|
||||
|
||||
|
||||
public void Use( Mobile m, int bannerID )
|
||||
{
|
||||
m_BannerID = bannerID;
|
||||
|
||||
|
||||
base.OnDoubleClick( m );
|
||||
}
|
||||
|
||||
|
|
@ -328,32 +328,32 @@ namespace Server.Items
|
|||
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();
|
||||
}
|
||||
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private WallBannerDeed m_WallBanner;
|
||||
|
||||
|
||||
public InternalGump( WallBannerDeed WallBanner ) : base( 150, 50 )
|
||||
{
|
||||
m_WallBanner = WallBanner;
|
||||
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Resizable = false;
|
||||
|
||||
|
||||
AddBackground( 25, 0, 500, 265, 0xA28 );
|
||||
AddLabel( 70, 12, 0x3E3, "Choose a Wall Banner:" );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue