Upgrades code style - First batch (#22)
This commit is contained in:
parent
8ee42c8ea2
commit
632e8b4757
1834 changed files with 10245 additions and 10437 deletions
|
|
@ -12,7 +12,7 @@ namespace Server.Items
|
|||
public class AnkhOfSacrificeComponent : AddonComponent
|
||||
{
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
public override int LabelNumber{ get{ return 1027772; } } // Ankh of Sacrifice
|
||||
public override int LabelNumber => 1027772; // Ankh of Sacrifice
|
||||
|
||||
public AnkhOfSacrificeComponent( int itemID ) : base( itemID )
|
||||
{
|
||||
|
|
@ -175,7 +175,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public AnkhOfSacrificeAddon( bool east ) : base()
|
||||
public AnkhOfSacrificeAddon( bool east )
|
||||
{
|
||||
if ( east )
|
||||
{
|
||||
|
|
@ -228,7 +228,7 @@ namespace Server.Items
|
|||
|
||||
public class AnkhOfSacrificeDeed : BaseAddonDeed, IRewardItem, IRewardOption
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1080397; } } // Deed For An Ankh Of Sacrifice
|
||||
public override int LabelNumber => 1080397; // Deed For An Ankh Of Sacrifice
|
||||
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
|
|
@ -257,7 +257,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public AnkhOfSacrificeDeed( bool isRewardItem ) : base()
|
||||
public AnkhOfSacrificeDeed( bool isRewardItem )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ namespace Server.Items
|
|||
|
||||
public class BannerDeed : Item, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1041007; } } // a banner deed
|
||||
public override int LabelNumber => 1041007; // a banner deed
|
||||
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ namespace Server.Items
|
|||
public class BloodyPentagramComponent : AddonComponent
|
||||
{
|
||||
public override bool DisplayWeight => false;
|
||||
public override int LabelNumber{ get{ return 1080279; } } // Bloody Pentagram
|
||||
public override int LabelNumber => 1080279; // Bloody Pentagram
|
||||
|
||||
public BloodyPentagramComponent( int itemID ) : base( itemID )
|
||||
{
|
||||
|
|
@ -57,7 +57,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public BloodyPentagramAddon() : base()
|
||||
public BloodyPentagramAddon()
|
||||
{
|
||||
AddComponent( new BloodyPentagramComponent( 0x1CF9 ), 0, 1, 0 );
|
||||
AddComponent( new BloodyPentagramComponent( 0x1CF8 ), 0, 2, 0 );
|
||||
|
|
@ -125,7 +125,7 @@ namespace Server.Items
|
|||
|
||||
public class BloodyPentagramDeed : BaseAddonDeed, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1080384; } } // Bloody Pentagram
|
||||
public override int LabelNumber => 1080384; // Bloody Pentagram
|
||||
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
|
|
@ -148,7 +148,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public BloodyPentagramDeed() : base()
|
||||
public BloodyPentagramDeed()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ namespace Server.Items
|
|||
|
||||
public class RewardBrazierDeed : Item, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1080527; } } // Brazier Deed
|
||||
public override int LabelNumber => 1080527; // Brazier Deed
|
||||
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
|
|
|||
|
|
@ -11,26 +11,26 @@ namespace Server.Items
|
|||
{
|
||||
public class CannonAddonComponent : AddonComponent
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1076157; } } // Decorative Cannon
|
||||
public override int LabelNumber => 1076157; // Decorative Cannon
|
||||
|
||||
public CannonAddonComponent( int itemID ) : base( itemID )
|
||||
{
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public CannonAddonComponent( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
|
||||
if ( Addon is CannonAddon )
|
||||
{
|
||||
if ( ((CannonAddon) Addon).IsRewardItem )
|
||||
list.Add( 1076223 ); // 7th Year Veteran Reward
|
||||
|
||||
|
||||
list.Add( 1076207, ((CannonAddon) Addon).Charges.ToString() ); // Remaining Charges: ~1_val~
|
||||
}
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
public class CannonAddon : BaseAddon
|
||||
{
|
||||
{
|
||||
public override BaseAddonDeed Deed
|
||||
{
|
||||
get
|
||||
|
|
@ -60,31 +60,31 @@ namespace Server.Items
|
|||
deed.Charges = m_Charges;
|
||||
deed.IsRewardItem = m_IsRewardItem;
|
||||
|
||||
return deed;
|
||||
}
|
||||
return deed;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private CannonDirection m_CannonDirection;
|
||||
private int m_Charges;
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CannonDirection CannonDirection
|
||||
{
|
||||
get{ return m_CannonDirection; }
|
||||
{
|
||||
get{ return m_CannonDirection; }
|
||||
}
|
||||
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Charges
|
||||
{
|
||||
get{ return m_Charges; }
|
||||
public int Charges
|
||||
{
|
||||
get{ return m_Charges; }
|
||||
set
|
||||
{
|
||||
m_Charges = value;
|
||||
|
||||
{
|
||||
m_Charges = value;
|
||||
|
||||
foreach ( AddonComponent c in Components )
|
||||
c.InvalidateProperties();
|
||||
}
|
||||
c.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
|
|
@ -92,11 +92,11 @@ namespace Server.Items
|
|||
{
|
||||
get{ return m_IsRewardItem; }
|
||||
set
|
||||
{
|
||||
m_IsRewardItem = value;
|
||||
|
||||
{
|
||||
m_IsRewardItem = value;
|
||||
|
||||
foreach ( AddonComponent c in Components )
|
||||
c.InvalidateProperties();
|
||||
c.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ namespace Server.Items
|
|||
public CannonAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override void OnComponentUsed( AddonComponent c, Mobile from )
|
||||
{
|
||||
if ( from.InRange( Location, 2 ) )
|
||||
|
|
@ -159,7 +159,7 @@ namespace Server.Items
|
|||
if ( from.Backpack != null )
|
||||
{
|
||||
PotionKeg keg = from.Backpack.FindItemByType( typeof( PotionKeg ) ) as PotionKeg;
|
||||
|
||||
|
||||
if ( Validate( keg ) > 0 )
|
||||
from.SendGump( new InternalGump( this, keg ) );
|
||||
else
|
||||
|
|
@ -170,7 +170,7 @@ namespace Server.Items
|
|||
else
|
||||
from.SendLocalizedMessage( 1076766 ); // That is too far away.
|
||||
}
|
||||
|
||||
|
||||
public int Validate( PotionKeg keg )
|
||||
{
|
||||
if ( keg != null && !keg.Deleted && keg.Held == 100 )
|
||||
|
|
@ -182,14 +182,14 @@ namespace Server.Items
|
|||
else if ( keg.Type == PotionEffect.ExplosionGreater )
|
||||
return 15;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public void Fill( Mobile from, PotionKeg keg )
|
||||
{
|
||||
Charges = Validate( keg );
|
||||
|
||||
|
||||
if ( Charges > 0 )
|
||||
{
|
||||
keg.Delete();
|
||||
|
|
@ -198,7 +198,7 @@ namespace Server.Items
|
|||
else
|
||||
from.SendLocalizedMessage( 1076198 ); // You do not have a full keg of explosion potions needed to recharge the cannon.
|
||||
}
|
||||
|
||||
|
||||
private static int[] m_Effects = new int[]
|
||||
{
|
||||
0x36B0, 0x3728, 0x3709, 0x36FE
|
||||
|
|
@ -207,20 +207,20 @@ namespace Server.Items
|
|||
public void DoFireEffect( IPoint3D target )
|
||||
{
|
||||
Map map = Map;
|
||||
|
||||
|
||||
if ( target == null || map == null )
|
||||
return;
|
||||
|
||||
|
||||
Effects.PlaySound( target, map, Utility.RandomList( 0x11B, 0x11C, 0x11D ) );
|
||||
Effects.SendLocationEffect( target, map, Utility.RandomList( m_Effects ), 16, 1 );
|
||||
|
||||
|
||||
for ( int count = Utility.Random( 3 ); count > 0; count-- )
|
||||
{
|
||||
{
|
||||
IPoint3D location = new Point3D( target.X + Utility.RandomMinMax( -1, 1 ), target.Y + Utility.RandomMinMax( -1, 1 ), target.Z );
|
||||
int effect = Utility.RandomList( m_Effects );
|
||||
Effects.SendLocationEffect( location, map, effect, 16, 1 );
|
||||
}
|
||||
|
||||
|
||||
Charges -= 1;
|
||||
}
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ namespace Server.Items
|
|||
m_Charges = reader.ReadInt();
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private CannonAddon m_Cannon;
|
||||
|
|
@ -259,134 +259,134 @@ namespace Server.Items
|
|||
{
|
||||
if ( m_Cannon == null || m_Cannon.Deleted )
|
||||
return;
|
||||
|
||||
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
|
||||
|
||||
if ( p == null )
|
||||
return;
|
||||
|
||||
|
||||
if ( from.InLOS( new Point3D( p ) ) )
|
||||
{
|
||||
if ( !Utility.InRange( new Point3D( p ), m_Cannon.Location, 2 ) )
|
||||
{
|
||||
bool allow = false;
|
||||
|
||||
|
||||
int x = p.X - m_Cannon.X;
|
||||
int y = p.Y - m_Cannon.Y;
|
||||
|
||||
|
||||
switch ( m_Cannon.CannonDirection )
|
||||
{
|
||||
case CannonDirection.North:
|
||||
if ( y < 0 && Math.Abs( x ) <= -y / 3 )
|
||||
allow = true;
|
||||
|
||||
|
||||
break;
|
||||
case CannonDirection.East:
|
||||
if ( x > 0 && Math.Abs( y ) <= x / 3 )
|
||||
allow = true;
|
||||
|
||||
|
||||
break;
|
||||
case CannonDirection.South:
|
||||
if ( y > 0 && Math.Abs( x ) <= y / 3 )
|
||||
allow = true;
|
||||
|
||||
|
||||
break;
|
||||
case CannonDirection.West:
|
||||
if ( x < 0 && Math.Abs( y ) <= -x / 3 )
|
||||
allow = true;
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if ( allow && Utility.InRange( new Point3D( p ), m_Cannon.Location, 14 ) )
|
||||
m_Cannon.DoFireEffect( p );
|
||||
else
|
||||
from.SendLocalizedMessage( 1076203 ); // Target out of range.
|
||||
from.SendLocalizedMessage( 1076203 ); // Target out of range.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1076215 ); // Cannon must be aimed farther away.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1049630 ); // You cannot see that target!
|
||||
from.SendLocalizedMessage( 1049630 ); // You cannot see that target!
|
||||
}
|
||||
|
||||
|
||||
protected override void OnTargetOutOfRange( Mobile from, object targeted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1076203 ); // Target out of range.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private CannonAddon m_Cannon;
|
||||
private PotionKeg m_Keg;
|
||||
|
||||
|
||||
private enum Buttons
|
||||
{
|
||||
Cancel,
|
||||
Recharge
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public InternalGump( CannonAddon cannon, PotionKeg keg ) : base( 50, 50 )
|
||||
{
|
||||
m_Cannon = cannon;
|
||||
m_Keg = keg;
|
||||
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddPage( 0 );
|
||||
|
||||
|
||||
AddBackground( 0, 0, 291, 133, 0x13BE );
|
||||
AddImageTiled( 5, 5, 280, 100, 0xA40 );
|
||||
|
||||
|
||||
AddHtmlLocalized( 9, 9, 272, 100, 1076196, cannon.Validate( keg ).ToString(), 0x7FFF, false, false ); // You will need a full keg of explosion potions to recharge the cannon. Your keg will provide ~1_CHARGES~ charges.
|
||||
|
||||
|
||||
AddButton( 5, 107, 0xFB1, 0xFB2, (int) Buttons.Cancel, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 40, 109, 100, 20, 1060051, 0x7FFF, false, false ); // CANCEL
|
||||
|
||||
|
||||
AddButton( 160, 107, 0xFB7, 0xFB8, (int) Buttons.Recharge, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 195, 109, 120, 20, 1076197, 0x7FFF, false, false ); // Recharge
|
||||
}
|
||||
|
||||
|
||||
public override void OnResponse( NetState state, RelayInfo info )
|
||||
{
|
||||
{
|
||||
if ( m_Cannon == null || m_Cannon.Deleted )
|
||||
return;
|
||||
|
||||
|
||||
if ( info.ButtonID == (int) Buttons.Recharge )
|
||||
m_Cannon.Fill( state.Mobile, m_Keg );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class CannonDeed : BaseAddonDeed, IRewardItem, IRewardOption
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1076195; } } // A deed for a cannon
|
||||
|
||||
public override int LabelNumber => 1076195; // A deed for a cannon
|
||||
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
{
|
||||
get
|
||||
{
|
||||
CannonAddon addon = new CannonAddon( m_Direction );
|
||||
addon.Charges = m_Charges;
|
||||
addon.IsRewardItem = m_IsRewardItem;
|
||||
|
||||
return addon;
|
||||
}
|
||||
return addon;
|
||||
}
|
||||
}
|
||||
|
||||
private CannonDirection m_Direction;
|
||||
private int m_Charges;
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Charges
|
||||
{
|
||||
get{ return m_Charges; }
|
||||
set{ m_Charges = value; InvalidateProperties(); }
|
||||
public int Charges
|
||||
{
|
||||
get{ return m_Charges; }
|
||||
set{ m_Charges = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
|
|
@ -395,39 +395,39 @@ namespace Server.Items
|
|||
get{ return m_IsRewardItem; }
|
||||
set{ m_IsRewardItem = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
|
||||
[Constructible]
|
||||
public CannonDeed() : base()
|
||||
{
|
||||
public CannonDeed()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public CannonDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_IsRewardItem )
|
||||
list.Add( 1076223 ); // 7th Year Veteran Reward
|
||||
|
||||
|
||||
list.Add( 1076207, m_Charges.ToString() ); // Remaining Charges: ~1_val~
|
||||
}
|
||||
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
{
|
||||
if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
|
||||
return;
|
||||
|
||||
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.CloseGump( typeof( RewardOptionGump ) );
|
||||
from.SendGump( new RewardOptionGump( 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 override void Serialize( GenericWriter writer )
|
||||
|
|
@ -435,17 +435,17 @@ namespace Server.Items
|
|||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
|
||||
|
||||
writer.Write( (int) m_Charges );
|
||||
writer.Write( (bool) m_IsRewardItem );
|
||||
}
|
||||
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
|
||||
m_Charges = reader.ReadInt();
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ 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; } }
|
||||
public override int LabelNumber => 1080523; // Commodity Deed Box
|
||||
public override int DefaultGumpID => 0x43;
|
||||
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
|
@ -29,13 +29,13 @@ namespace Server.Items
|
|||
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
|
||||
list.Add( 1076217 ); // 1st Year Veteran Reward
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
|
|
@ -46,7 +46,7 @@ namespace Server.Items
|
|||
|
||||
writer.Write( (bool) m_IsRewardItem );
|
||||
}
|
||||
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
|
@ -65,5 +65,5 @@ namespace Server.Items
|
|||
|
||||
return parent as CommodityDeedBox;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ namespace Server.Items
|
|||
|
||||
public class DecorativeShieldDeed : Item, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1049771; } } // deed for a decorative shield wall hanging
|
||||
public override int LabelNumber => 1049771; // deed for a decorative shield wall hanging
|
||||
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace Server.Items
|
|||
{
|
||||
public class FlamingHead : StoneFaceTrapNoDamage, IAddon, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1041266; } } // Flaming Head
|
||||
public override int LabelNumber => 1041266; // Flaming Head
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
public Item Deed
|
||||
|
|
@ -39,7 +39,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public FlamingHead( StoneFaceTrapType type ) : base()
|
||||
public FlamingHead( StoneFaceTrapType type )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Movable = false;
|
||||
|
|
@ -112,7 +112,7 @@ namespace Server.Items
|
|||
|
||||
public class FlamingHeadDeed : Item, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1041050; } } // a flaming head deed
|
||||
public override int LabelNumber => 1041050; // a flaming head deed
|
||||
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ namespace Server.Items
|
|||
|
||||
public class HangingSkeletonDeed : Item, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1049772; } } // deed for a hanging skeleton decoration
|
||||
public override int LabelNumber => 1049772; // deed for a hanging skeleton decoration
|
||||
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace Server.Items
|
|||
private Timer m_Timer;
|
||||
|
||||
[Constructible]
|
||||
public MiningCart( MiningCartType type ) : base()
|
||||
public MiningCart( MiningCartType type )
|
||||
{
|
||||
m_CartType = type;
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ namespace Server.Items
|
|||
|
||||
public class MiningCartDeed : BaseAddonDeed, IRewardItem, IRewardOption
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1080385; } } // deed for a mining cart decoration
|
||||
public override int LabelNumber => 1080385; // deed for a mining cart decoration
|
||||
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
|
|
@ -350,7 +350,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public MiningCartDeed() : base()
|
||||
public MiningCartDeed()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
|
@ -419,4 +419,4 @@ namespace Server.Items
|
|||
base.OnDoubleClick( from );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Server.Items
|
|||
MinotaurStatueDeed deed = new MinotaurStatueDeed();
|
||||
deed.IsRewardItem = m_IsRewardItem;
|
||||
|
||||
return deed;
|
||||
return deed;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public MinotaurStatue( MinotaurStatueType type ) : base()
|
||||
public MinotaurStatue( MinotaurStatueType type )
|
||||
{
|
||||
switch ( type )
|
||||
{
|
||||
|
|
@ -72,7 +72,7 @@ namespace Server.Items
|
|||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
|
||||
|
||||
writer.Write( (bool) m_IsRewardItem );
|
||||
}
|
||||
|
||||
|
|
@ -81,26 +81,26 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class MinotaurStatueDeed : BaseAddonDeed, IRewardItem, IRewardOption
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1080409; } } // Minotaur Statue Deed
|
||||
public override int LabelNumber => 1080409; // Minotaur Statue Deed
|
||||
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
{
|
||||
get
|
||||
{
|
||||
{
|
||||
MinotaurStatue addon = new MinotaurStatue( m_StatueType );
|
||||
addon.IsRewardItem = m_IsRewardItem;
|
||||
|
||||
return addon;
|
||||
}
|
||||
return addon;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private MinotaurStatueType m_StatueType;
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
|
@ -112,7 +112,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public MinotaurStatueDeed() : base()
|
||||
public MinotaurStatueDeed()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
|
@ -120,25 +120,25 @@ namespace Server.Items
|
|||
public MinotaurStatueDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
|
||||
return;
|
||||
|
||||
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
{
|
||||
from.CloseGump( typeof( RewardOptionGump ) );
|
||||
from.SendGump( new RewardOptionGump( this ) );
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1062334 ); // This item must be in your backpack to be used.
|
||||
from.SendLocalizedMessage( 1062334 ); // This item must be in your backpack to be used.
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
|
||||
if ( m_IsRewardItem )
|
||||
list.Add( 1076218 ); // 2nd Year Veteran Reward
|
||||
}
|
||||
|
|
@ -157,7 +157,7 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Items
|
|||
{
|
||||
public class RewardPottedCactus : Item, IRewardItem
|
||||
{
|
||||
public override bool ForceShowProperties{ get { return ObjectPropertyList.Enabled; } }
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
|
@ -21,12 +21,12 @@ namespace Server.Items
|
|||
|
||||
[Constructible]
|
||||
public RewardPottedCactus() : this( Utility.RandomMinMax( 0x1E0F, 0x1E14 ) )
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public RewardPottedCactus( int itemID ) : base( itemID )
|
||||
{
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
|
|
@ -55,13 +55,13 @@ namespace Server.Items
|
|||
m_IsRewardItem = reader.ReadBool();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class PottedCactusDeed : Item, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1080407; } } // Potted Cactus Deed
|
||||
public override int LabelNumber => 1080407; // Potted Cactus Deed
|
||||
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ namespace Server.Items
|
|||
else
|
||||
from.SendLocalizedMessage( 1042038 ); // You must have the object in your backpack to use it.
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
|
|
@ -120,14 +120,14 @@ namespace Server.Items
|
|||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
{
|
||||
private PottedCactusDeed m_Cactus;
|
||||
|
||||
|
||||
public InternalGump( PottedCactusDeed cactus ) : base( 100, 200 )
|
||||
{
|
||||
m_Cactus = cactus;
|
||||
|
|
@ -145,30 +145,30 @@ namespace Server.Items
|
|||
|
||||
AddItem( 45, 75, 0x1E0F );
|
||||
AddButton( 55, 50, 0x845, 0x846, 0x1E0F, GumpButtonType.Reply, 0 );
|
||||
|
||||
|
||||
AddItem( 105, 75, 0x1E10 );
|
||||
AddButton( 115, 50, 0x845, 0x846, 0x1E10, GumpButtonType.Reply, 0 );
|
||||
|
||||
AddItem( 160, 75, 0x1E14 );
|
||||
AddButton( 175, 50, 0x845, 0x846, 0x1E14, GumpButtonType.Reply, 0 );
|
||||
|
||||
|
||||
AddItem( 220, 75, 0x1E11 );
|
||||
AddButton( 235, 50, 0x845, 0x846, 0x1E11, GumpButtonType.Reply, 0 );
|
||||
|
||||
|
||||
AddItem( 280, 75, 0x1E12 );
|
||||
AddButton( 295, 50, 0x845, 0x846, 0x1E12, GumpButtonType.Reply, 0 );
|
||||
|
||||
AddItem( 340, 75, 0x1E13 );
|
||||
AddButton( 355, 50, 0x845, 0x846, 0x1E13, GumpButtonType.Reply, 0 );
|
||||
}
|
||||
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
if ( m_Cactus == null | m_Cactus.Deleted )
|
||||
return;
|
||||
|
||||
Mobile m = sender.Mobile;
|
||||
|
||||
return;
|
||||
|
||||
Mobile m = sender.Mobile;
|
||||
|
||||
if ( info.ButtonID >= 0x1E0F && info.ButtonID <= 0x1E14 )
|
||||
{
|
||||
RewardPottedCactus cactus = new RewardPottedCactus( info.ButtonID );
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public StoneAnkh( bool east ) : base()
|
||||
public StoneAnkh( bool east )
|
||||
{
|
||||
if ( east )
|
||||
{
|
||||
|
|
@ -142,7 +142,7 @@ namespace Server.Items
|
|||
|
||||
public class StoneAnkhDeed : BaseAddonDeed, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1049773; } } // deed for a stone ankh
|
||||
public override int LabelNumber => 1049773; // deed for a stone ankh
|
||||
|
||||
private bool m_East;
|
||||
private bool m_IsRewardItem;
|
||||
|
|
@ -166,7 +166,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public StoneAnkhDeed() : base()
|
||||
public StoneAnkhDeed()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Server.Items
|
|||
private Timer m_Timer;
|
||||
|
||||
[Constructible]
|
||||
public TreeStump( int itemID ) : base()
|
||||
public TreeStump( int itemID )
|
||||
{
|
||||
AddComponent( new AddonComponent( itemID ), 0, 0, 0 );
|
||||
|
||||
|
|
@ -157,7 +157,7 @@ namespace Server.Items
|
|||
|
||||
public class TreeStumpDeed : BaseAddonDeed, IRewardItem, IRewardOption
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1080406; } } // a deed for a tree stump decoration
|
||||
public override int LabelNumber => 1080406; // a deed for a tree stump decoration
|
||||
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
|
|
@ -191,7 +191,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public TreeStumpDeed() : base()
|
||||
public TreeStumpDeed()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
|
@ -264,4 +264,4 @@ namespace Server.Items
|
|||
base.OnDoubleClick( from );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ namespace Server.Items
|
|||
public class WallBannerComponent : AddonComponent, IDyable
|
||||
{
|
||||
public override bool NeedsWall => true;
|
||||
public override Point3D WallPosition{ get{ return this.East ? new Point3D( -1, 0, 0 ) : new Point3D( 0, -1, 0 ); } }
|
||||
public override Point3D WallPosition => this.East ? new Point3D( -1, 0, 0 ) : new Point3D( 0, -1, 0 );
|
||||
|
||||
public bool East{ get { return ((WallBanner)Addon).East; } }
|
||||
public bool East => ((WallBanner)Addon).East;
|
||||
|
||||
public WallBannerComponent( int itemID ) : base( itemID )
|
||||
{
|
||||
|
|
@ -81,7 +81,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public WallBanner( int bannerID ) : base()
|
||||
public WallBanner( int bannerID )
|
||||
{
|
||||
m_East = ((bannerID % 2) == 1 );
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ namespace Server.Items
|
|||
|
||||
public class WallBannerDeed : BaseAddonDeed, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1080549; } } // Wall Banner Deed
|
||||
public override int LabelNumber => 1080549; // Wall Banner Deed
|
||||
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
|
|
@ -285,7 +285,7 @@ namespace Server.Items
|
|||
}
|
||||
|
||||
[Constructible]
|
||||
public WallBannerDeed() : base()
|
||||
public WallBannerDeed()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ using Server.Engines.VeteranRewards;
|
|||
namespace Server.Items
|
||||
{
|
||||
public class WeaponEngravingTool : Item, IUsesRemaining, IRewardItem
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1076158; } } // Weapon Engraving Tool
|
||||
|
||||
{
|
||||
public override int LabelNumber => 1076158; // Weapon Engraving Tool
|
||||
|
||||
private int m_UsesRemaining;
|
||||
private bool m_IsRewardItem;
|
||||
|
||||
|
|
@ -20,12 +20,12 @@ namespace Server.Items
|
|||
get{ return m_UsesRemaining; }
|
||||
set{ m_UsesRemaining = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
|
||||
public virtual bool ShowUsesRemaining
|
||||
{
|
||||
get{ return true; }
|
||||
{
|
||||
get{ return true; }
|
||||
set{}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsRewardItem
|
||||
|
|
@ -33,76 +33,76 @@ namespace Server.Items
|
|||
get{ return m_IsRewardItem; }
|
||||
set{ m_IsRewardItem = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
|
||||
[Constructible]
|
||||
public WeaponEngravingTool() : this( 10 )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
[Constructible]
|
||||
public WeaponEngravingTool( int uses ) : base( 0x32F8 )
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Weight = 1.0;
|
||||
|
||||
|
||||
m_UsesRemaining = uses;
|
||||
}
|
||||
|
||||
public WeaponEngravingTool( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
|
||||
return;
|
||||
|
||||
|
||||
if ( m_UsesRemaining > 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1072357 ); // Select an object to engrave.
|
||||
from.Target = new TargetWeapon( this );
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if ( from.Skills.Tinkering.Value == 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1076179 ); // Since you have no tinkering skill, you will need to find an NPC tinkerer to repair this for you.
|
||||
from.SendLocalizedMessage( 1076179 ); // Since you have no tinkering skill, you will need to find an NPC tinkerer to repair this for you.
|
||||
}
|
||||
else if ( from.Skills.Tinkering.Value < 75.0 )
|
||||
{
|
||||
{
|
||||
from.SendLocalizedMessage( 1076178 ); // Your tinkering skill is too low to fix this yourself. An NPC tinkerer can help you repair this for a fee.
|
||||
}
|
||||
else
|
||||
{
|
||||
Item diamond = from.Backpack.FindItemByType( typeof( BlueDiamond ) );
|
||||
|
||||
{
|
||||
Item diamond = from.Backpack.FindItemByType( typeof( BlueDiamond ) );
|
||||
|
||||
if ( diamond != null )
|
||||
from.SendGump( new ConfirmGump( this, null ) );
|
||||
else
|
||||
from.SendLocalizedMessage( 1076166 ); // You do not have a blue diamond needed to recharge the engraving tool.
|
||||
from.SendGump( new ConfirmGump( this, null ) );
|
||||
else
|
||||
from.SendLocalizedMessage( 1076166 ); // You do not have a blue diamond needed to recharge the engraving tool.
|
||||
}
|
||||
|
||||
|
||||
from.SendLocalizedMessage( 1076163 ); // There are no charges left on this engraving tool.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
|
||||
if ( m_IsRewardItem )
|
||||
list.Add( 1076224 ); // 8th Year Veteran Reward
|
||||
|
||||
|
||||
if ( ShowUsesRemaining )
|
||||
list.Add( 1060584, m_UsesRemaining.ToString() ); // uses remaining: ~1_val~
|
||||
list.Add( 1060584, m_UsesRemaining.ToString() ); // uses remaining: ~1_val~
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
|
||||
writer.Write( (int) m_UsesRemaining );
|
||||
writer.Write( (bool) m_IsRewardItem );
|
||||
}
|
||||
|
|
@ -110,27 +110,27 @@ namespace Server.Items
|
|||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
|
||||
m_UsesRemaining = reader.ReadInt();
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
}
|
||||
|
||||
|
||||
public virtual void Recharge( Mobile from, Mobile guildmaster )
|
||||
{
|
||||
{
|
||||
if ( from.Backpack != null )
|
||||
{
|
||||
Item diamond = from.Backpack.FindItemByType( typeof( BlueDiamond ) );
|
||||
|
||||
Item diamond = from.Backpack.FindItemByType( typeof( BlueDiamond ) );
|
||||
|
||||
if ( guildmaster != null )
|
||||
{
|
||||
if ( m_UsesRemaining <= 0 )
|
||||
{
|
||||
{
|
||||
if ( diamond != null && Banker.Withdraw( from, 100000 ) )
|
||||
{
|
||||
{
|
||||
diamond.Consume();
|
||||
UsesRemaining = 10;
|
||||
UsesRemaining = 10;
|
||||
guildmaster.Say( 1076165 ); // Your weapon engraver should be good as new!
|
||||
}
|
||||
else
|
||||
|
|
@ -140,59 +140,59 @@ namespace Server.Items
|
|||
guildmaster.Say( 1076164 ); // I can only help with this if you are carrying an engraving tool that needs repair.
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
if ( from.Skills.Tinkering.Value == 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1076179 ); // Since you have no tinkering skill, you will need to find an NPC tinkerer to repair this for you.
|
||||
from.SendLocalizedMessage( 1076179 ); // Since you have no tinkering skill, you will need to find an NPC tinkerer to repair this for you.
|
||||
}
|
||||
else if ( from.Skills.Tinkering.Value < 75.0 )
|
||||
{
|
||||
{
|
||||
from.SendLocalizedMessage( 1076178 ); // Your tinkering skill is too low to fix this yourself. An NPC tinkerer can help you repair this for a fee.
|
||||
}
|
||||
else if ( diamond != null )
|
||||
{
|
||||
diamond.Consume();
|
||||
|
||||
|
||||
if ( Utility.RandomDouble() < from.Skills.Tinkering.Value / 100 )
|
||||
{
|
||||
UsesRemaining = 10;
|
||||
{
|
||||
UsesRemaining = 10;
|
||||
from.SendLocalizedMessage( 1076165 ); // Your weapon engraver should be good as new! ?????
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1076175 ); // You cracked the diamond attempting to fix the weapon engraver.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1076166 ); // You do not have a blue diamond needed to recharge the engraving tool.
|
||||
}
|
||||
}
|
||||
from.SendLocalizedMessage( 1076166 ); // You do not have a blue diamond needed to recharge the engraving tool.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static WeaponEngravingTool Find( Mobile from )
|
||||
{
|
||||
if ( from.Backpack != null )
|
||||
return from.Backpack.FindItemByType( typeof( WeaponEngravingTool ) ) as WeaponEngravingTool;
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
private class TargetWeapon : Target
|
||||
{
|
||||
private WeaponEngravingTool m_Tool;
|
||||
|
||||
|
||||
public TargetWeapon( WeaponEngravingTool tool ) : base( -1, true, TargetFlags.None )
|
||||
{
|
||||
m_Tool = tool;
|
||||
}
|
||||
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
if ( m_Tool == null || m_Tool.Deleted )
|
||||
return;
|
||||
|
||||
|
||||
if ( targeted is BaseWeapon )
|
||||
{
|
||||
BaseWeapon item = (BaseWeapon) targeted;
|
||||
|
||||
|
||||
from.CloseGump( typeof( InternalGump ) );
|
||||
from.SendGump( new InternalGump( m_Tool, item ) );
|
||||
}
|
||||
|
|
@ -200,29 +200,29 @@ namespace Server.Items
|
|||
from.SendLocalizedMessage( 1072309 ); // The selected item cannot be engraved by this engraving tool.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
private WeaponEngravingTool m_Tool;
|
||||
private BaseWeapon m_Target;
|
||||
|
||||
|
||||
private enum Buttons
|
||||
{
|
||||
Cancel,
|
||||
Okay,
|
||||
Text
|
||||
}
|
||||
|
||||
|
||||
public InternalGump( WeaponEngravingTool tool, BaseWeapon target ) : base( 0, 0 )
|
||||
{
|
||||
m_Tool = tool;
|
||||
m_Target = target;
|
||||
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Resizable = false;
|
||||
|
||||
|
||||
AddBackground( 50, 50, 400, 300, 0xA28 );
|
||||
|
||||
AddPage( 0 );
|
||||
|
|
@ -236,19 +236,19 @@ namespace Server.Items
|
|||
AddImageTiled( 75, 245, 2, 40, 0x23C3 );
|
||||
AddImageTiled( 75, 285, 350, 2, 0x23C5 );
|
||||
AddImageTiled( 425, 245, 2, 42, 0x23C3 );
|
||||
|
||||
|
||||
AddTextEntry( 75, 245, 350, 40, 0x0, (int) Buttons.Text, "" );
|
||||
}
|
||||
|
||||
|
||||
public override void OnResponse( Server.Network.NetState state, RelayInfo info )
|
||||
{
|
||||
{
|
||||
if ( m_Tool == null || m_Tool.Deleted || m_Target == null || m_Target.Deleted )
|
||||
return;
|
||||
|
||||
|
||||
if ( info.ButtonID == (int) Buttons.Okay )
|
||||
{
|
||||
TextRelay relay = info.GetTextEntry( (int) Buttons.Text );
|
||||
|
||||
|
||||
if ( relay != null )
|
||||
{
|
||||
if ( String.IsNullOrEmpty( relay.Text ) )
|
||||
|
|
@ -262,9 +262,9 @@ namespace Server.Items
|
|||
m_Target.EngravedText = Utility.FixHtml( relay.Text.Substring( 0, 64 ) );
|
||||
else
|
||||
m_Target.EngravedText = Utility.FixHtml( relay.Text );
|
||||
|
||||
state.Mobile.SendLocalizedMessage( 1072361 ); // You engraved the object.
|
||||
m_Target.InvalidateProperties();
|
||||
|
||||
state.Mobile.SendLocalizedMessage( 1072361 ); // You engraved the object.
|
||||
m_Target.InvalidateProperties();
|
||||
m_Tool.UsesRemaining -= 1;
|
||||
m_Tool.InvalidateProperties();
|
||||
}
|
||||
|
|
@ -274,33 +274,33 @@ namespace Server.Items
|
|||
state.Mobile.SendLocalizedMessage( 1072363 ); // The object was not engraved.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ConfirmGump : Gump
|
||||
{
|
||||
{
|
||||
private WeaponEngravingTool m_Engraver;
|
||||
private Mobile m_Guildmaster;
|
||||
|
||||
|
||||
private enum Buttons
|
||||
{
|
||||
Cancel,
|
||||
Confirm
|
||||
}
|
||||
|
||||
|
||||
public ConfirmGump( WeaponEngravingTool engraver, Mobile guildmaster ) : base( 200, 200 )
|
||||
{
|
||||
{
|
||||
m_Engraver = engraver;
|
||||
m_Guildmaster = guildmaster;
|
||||
|
||||
|
||||
Closable = false;
|
||||
Disposable = true;
|
||||
Dragable = true;
|
||||
Resizable = false;
|
||||
|
||||
|
||||
AddPage( 0 );
|
||||
|
||||
AddBackground( 0, 0, 291, 133, 0x13BE );
|
||||
AddImageTiled( 5, 5, 280, 100, 0xA40 );
|
||||
|
||||
|
||||
if ( guildmaster != null )
|
||||
{
|
||||
AddHtmlLocalized( 9, 9, 272, 100, 1076169, 0x7FFF, false, false ); // It will cost you 100,000 gold and a blue diamond to recharge your weapon engraver with 10 charges.
|
||||
|
|
@ -311,20 +311,20 @@ namespace Server.Items
|
|||
AddHtmlLocalized( 9, 9, 272, 100, 1076176, 0x7FFF, false, false ); // You will need a blue diamond to repair the tip of the engraver. A successful repair will give the engraver 10 charges.
|
||||
AddHtmlLocalized( 195, 109, 120, 20, 1076177, 0x7FFF, false, false ); // Replace the tip.
|
||||
}
|
||||
|
||||
AddButton( 160, 107, 0xFB7, 0xFB8, (int) Buttons.Confirm, GumpButtonType.Reply, 0 );
|
||||
|
||||
AddButton( 160, 107, 0xFB7, 0xFB8, (int) Buttons.Confirm, GumpButtonType.Reply, 0 );
|
||||
AddButton( 5, 107, 0xFB1, 0xFB2, (int) Buttons.Cancel, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 40, 109, 100, 20, 1060051, 0x7FFF, false, false ); // CANCEL
|
||||
}
|
||||
|
||||
|
||||
public override void OnResponse( Server.Network.NetState state, RelayInfo info )
|
||||
{
|
||||
{
|
||||
if ( m_Engraver == null || m_Engraver.Deleted )
|
||||
return;
|
||||
|
||||
|
||||
if ( info.ButtonID == (int) Buttons.Confirm )
|
||||
m_Engraver.Recharge( state.Mobile, m_Guildmaster );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue