Upgrades code style - First batch (#22)
This commit is contained in:
parent
8ee42c8ea2
commit
632e8b4757
1834 changed files with 10245 additions and 10437 deletions
|
|
@ -25,7 +25,7 @@ namespace Server.Gumps
|
|||
public int Hue{ get{ return m_Hue; } }
|
||||
public CAGCategory Parent{ get{ return m_Parent; } }
|
||||
|
||||
public override string Caption{ get{ return ( m_Type == null ? "bad type" : m_Type.Name ); } }
|
||||
public override string Caption => ( m_Type == null ? "bad type" : m_Type.Name );
|
||||
|
||||
public override void OnClick( Mobile from, int page )
|
||||
{
|
||||
|
|
@ -66,7 +66,7 @@ namespace Server.Gumps
|
|||
public CAGNode[] Nodes{ get{ return m_Nodes; } }
|
||||
public CAGCategory Parent{ get{ return m_Parent; } }
|
||||
|
||||
public override string Caption{ get{ return m_Title; } }
|
||||
public override string Caption => m_Title;
|
||||
|
||||
public override void OnClick( Mobile from, int page )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,24 +7,24 @@ namespace Server.Gumps
|
|||
{
|
||||
public class ConfirmBreakCrystalGump : BaseConfirmGump
|
||||
{
|
||||
public override int LabelNumber{ get{ return 1075084; } } // This statuette will be destroyed when its trapped creature is summoned. The creature will be bonded to you but will disappear if released. <br><br>Do you wish to proceed?
|
||||
|
||||
public override int LabelNumber => 1075084; // This statuette will be destroyed when its trapped creature is summoned. The creature will be bonded to you but will disappear if released. <br><br>Do you wish to proceed?
|
||||
|
||||
private BaseImprisonedMobile m_Item;
|
||||
|
||||
public ConfirmBreakCrystalGump( BaseImprisonedMobile item ) : base()
|
||||
|
||||
public ConfirmBreakCrystalGump( BaseImprisonedMobile item )
|
||||
{
|
||||
m_Item = item;
|
||||
}
|
||||
|
||||
|
||||
public override void Confirm( Mobile from )
|
||||
{
|
||||
{
|
||||
if ( m_Item == null || m_Item.Deleted )
|
||||
return;
|
||||
|
||||
|
||||
BaseCreature summon = m_Item.Summon;
|
||||
|
||||
|
||||
if ( summon != null )
|
||||
{
|
||||
{
|
||||
if ( !summon.SetControlMaster( from ) )
|
||||
{
|
||||
summon.Delete();
|
||||
|
|
@ -32,24 +32,24 @@ namespace Server.Gumps
|
|||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1049666 ); // Your pet has bonded with you!
|
||||
|
||||
|
||||
summon.MoveToWorld( from.Location, from.Map );
|
||||
summon.IsBonded = true;
|
||||
|
||||
|
||||
summon.Skills.Wrestling.Base = 100;
|
||||
summon.Skills.Tactics.Base = 100;
|
||||
summon.Skills.MagicResist.Base = 100;
|
||||
summon.Skills.Anatomy.Base = 100;
|
||||
|
||||
|
||||
Effects.PlaySound( summon.Location, summon.Map, summon.BaseSoundID );
|
||||
Effects.SendLocationParticles( EffectItem.Create( summon.Location, summon.Map, EffectItem.DefaultDuration ), 0x3728, 1, 10, 0x26B6 );
|
||||
|
||||
|
||||
m_Item.Release( from, summon );
|
||||
m_Item.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ namespace Server.Gumps
|
|||
else
|
||||
tree = Tokuno;
|
||||
|
||||
ParentNode branch = null;
|
||||
tree.LastBranch.TryGetValue( from, out branch );
|
||||
tree.LastBranch.TryGetValue( from, out ParentNode branch );
|
||||
|
||||
if ( branch == null )
|
||||
branch = tree.Root;
|
||||
|
|
@ -247,4 +246,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Server.Guilds
|
|||
bool m_Ascending;
|
||||
string m_Filter;
|
||||
int m_StartNumber;
|
||||
|
||||
|
||||
private const int itemsPerPage = 8;
|
||||
|
||||
public BaseGuildListGump( PlayerMobile pm, Guild g, List<T> list, IComparer<T> currentComparer, bool ascending, string filter, int startNumber, InfoField<T>[] fields )
|
||||
|
|
@ -55,8 +55,8 @@ namespace Server.Guilds
|
|||
m_List.Sort( m_Comparer );
|
||||
m_StartNumber = Math.Max( Math.Min( m_StartNumber, m_List.Count - 1 ), 0 );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
AddBackground( 130, 75, 385, 30, 0xBB8 );
|
||||
AddTextEntry( 135, 80, 375, 30, 0x481, 1, m_Filter );
|
||||
AddButton( 520, 75, 0x867, 0x868, 5, GumpButtonType.Reply, 0 ); //Filter Button
|
||||
|
|
@ -85,12 +85,12 @@ namespace Server.Guilds
|
|||
AddButton( 65, 80, 0x15E3, 0x15E7, 6, GumpButtonType.Reply, 0 ); // Back
|
||||
|
||||
if( m_StartNumber + itemsPerPage > m_List.Count )
|
||||
AddButton( 95, 80, 0x15E1, 0x15E5, 0, GumpButtonType.Page, 0 );
|
||||
AddButton( 95, 80, 0x15E1, 0x15E5, 0, GumpButtonType.Page, 0 );
|
||||
else
|
||||
AddButton( 95, 80, 0x15E1, 0x15E5, 7, GumpButtonType.Reply, 0 ); // Forward
|
||||
|
||||
|
||||
|
||||
|
||||
int itemNumber = 0;
|
||||
|
||||
if( m_Ascending )
|
||||
|
|
@ -198,7 +198,7 @@ namespace Server.Guilds
|
|||
|
||||
public TextDefinition Name{ get{ return m_Name; } }
|
||||
public int Width{ get{ return m_Width; } }
|
||||
public IComparer<T> Comparer { get { return m_Comparer; } }
|
||||
public IComparer<T> Comparer => m_Comparer;
|
||||
public InfoField( TextDefinition name, int width, IComparer<T> comparer )
|
||||
{
|
||||
m_Name = name;
|
||||
|
|
@ -206,4 +206,4 @@ namespace Server.Guilds
|
|||
m_Comparer = comparer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,9 +40,9 @@ namespace Server.Gumps
|
|||
m_Y = Y;
|
||||
}
|
||||
|
||||
public int ArtID { get { return m_Art; } }
|
||||
public int BodyID { get { return m_Body; } }
|
||||
public int LocNumber{ get { return m_Num; } }
|
||||
public int ArtID => m_Art;
|
||||
public int BodyID => m_Body;
|
||||
public int LocNumber => m_Num;
|
||||
public int X{ get{ return m_X; } }
|
||||
public int Y{ get{ return m_Y; } }
|
||||
}
|
||||
|
|
@ -61,8 +61,8 @@ namespace Server.Gumps
|
|||
m_Entries = entries;
|
||||
}
|
||||
|
||||
public PolymorphEntry[] Entries{ get { return m_Entries; } }
|
||||
public int LocNumber{ get { return m_Num; } }
|
||||
public PolymorphEntry[] Entries => m_Entries;
|
||||
public int LocNumber => m_Num;
|
||||
}
|
||||
|
||||
private static PolymorphCategory[] Categories = new PolymorphCategory[]
|
||||
|
|
@ -244,4 +244,4 @@ namespace Server.Gumps
|
|||
spell.Cast();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -235,10 +235,10 @@ namespace Server.Gumps
|
|||
private string m_Name;
|
||||
private string m_DisplayName;
|
||||
|
||||
public int Body { get { return m_Body; } }
|
||||
public int ItemID { get { return m_ItemID; } }
|
||||
public string Name { get { return m_Name; } }
|
||||
public string DisplayName { get { return m_DisplayName; } }
|
||||
public int Body => m_Body;
|
||||
public int ItemID => m_ItemID;
|
||||
public string Name => m_Name;
|
||||
public string DisplayName => m_DisplayName;
|
||||
|
||||
private static string[] m_GroupNames = new string[]
|
||||
{
|
||||
|
|
@ -292,4 +292,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@ namespace Server.Gumps
|
|||
private int m_Points;
|
||||
private RewardPickedHandler m_OnPicked;
|
||||
|
||||
public TextDefinition Title { get { return m_Title; } }
|
||||
public IRewardEntry[] Rewards { get { return m_Rewards; } }
|
||||
public int Points { get { return m_Points; } }
|
||||
public RewardPickedHandler OnPicked { get { return m_OnPicked; } }
|
||||
public TextDefinition Title => m_Title;
|
||||
public IRewardEntry[] Rewards => m_Rewards;
|
||||
public int Points => m_Points;
|
||||
public RewardPickedHandler OnPicked => m_OnPicked;
|
||||
|
||||
public RewardGump( TextDefinition title, IRewardEntry[] rewards, int points, RewardPickedHandler onPicked )
|
||||
: base( 250, 50 )
|
||||
|
|
@ -186,4 +186,4 @@ namespace Server.Gumps
|
|||
sender.Mobile.SendGump( new RewardGump( m_Parent.Title, m_Parent.Rewards, m_Parent.Points, m_Parent.OnPicked ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue