diff --git a/Data/treasure.cfg b/Data/treasure.cfg index 0bd8d8426..79d000c5c 100644 --- a/Data/treasure.cfg +++ b/Data/treasure.cfg @@ -80,15 +80,8 @@ 2804 2255 2850 2252 2932 2240 -# 3568 2402 -# 3702 2825 -# 3511 2421 -# 3533 2471 -# 3417 2675 3425 2723 3476 2761 -# 3541 2784 -# 3558 2819 3594 2825 4419 3117 4471 3188 diff --git a/Scripts/Accounting/Account.cs b/Scripts/Accounting/Account.cs index 48fdf4547..885a50c55 100644 --- a/Scripts/Accounting/Account.cs +++ b/Scripts/Accounting/Account.cs @@ -225,7 +225,7 @@ namespace Server.Accounting /// public bool Inactive { - get { return ( ( m_LastLogin + InactiveDuration ) <= DateTime.Now ); } + get { return ( ( m_LastLogin + InactiveDuration ) <= DateTime.Now && AccessLevel == AccessLevel.Player ); } } /// @@ -365,7 +365,7 @@ namespace Server.Accounting string tagDuration = GetTag( "BanDuration" ); if ( tagTime != null ) - banTime = Utility.GetDateTime( tagTime, DateTime.MinValue ); + banTime = Utility.GetXMLDateTime( tagTime, DateTime.MinValue ); else banTime = DateTime.MinValue; @@ -657,9 +657,9 @@ namespace Server.Accounting } m_AccessLevel = (AccessLevel)Enum.Parse( typeof( AccessLevel ), Utility.GetText( node["accessLevel"], "Player" ), true ); - m_Flags = Utility.GetInt32( Utility.GetText( node["flags"], "0" ), 0 ); - m_Created = Utility.GetDateTime( Utility.GetText( node["created"], null ), DateTime.Now ); - m_LastLogin = Utility.GetDateTime( Utility.GetText( node["lastLogin"], null ), DateTime.Now ); + m_Flags = Utility.GetXMLInt32( Utility.GetText( node["flags"], "0" ), 0 ); + m_Created = Utility.GetXMLDateTime( Utility.GetText( node["created"], null ), DateTime.Now ); + m_LastLogin = Utility.GetXMLDateTime( Utility.GetText( node["lastLogin"], null ), DateTime.Now ); m_Mobiles = LoadMobiles( node ); m_Comments = LoadComments( node ); @@ -673,7 +673,7 @@ namespace Server.Accounting m_Mobiles[i].Account = this; } - TimeSpan totalGameTime = Utility.GetTimeSpan( Utility.GetText( node["totalGameTime"], null ), TimeSpan.Zero ); + TimeSpan totalGameTime = Utility.GetXMLTimeSpan( Utility.GetText( node["totalGameTime"], null ), TimeSpan.Zero ); if ( totalGameTime == TimeSpan.Zero ) { for ( int i = 0; i < m_Mobiles.Length; i++ ) @@ -736,7 +736,7 @@ namespace Server.Accounting if ( addressList != null ) { - int count = Utility.GetInt32( Utility.GetAttribute( addressList, "count", "0" ), 0 ); + int count = Utility.GetXMLInt32( Utility.GetAttribute( addressList, "count", "0" ), 0 ); list = new IPAddress[count]; @@ -793,8 +793,8 @@ namespace Server.Accounting { try { - int index = Utility.GetInt32( Utility.GetAttribute( ele, "index", "0" ), 0 ); - int serial = Utility.GetInt32( Utility.GetText( ele, "0" ), 0 ); + int index = Utility.GetXMLInt32( Utility.GetAttribute( ele, "index", "0" ), 0 ); + int serial = Utility.GetXMLInt32( Utility.GetText( ele, "0" ), 0 ); if ( index >= 0 && index < list.Length ) list[index] = World.FindMobile( serial ); diff --git a/Scripts/Accounting/AccountComment.cs b/Scripts/Accounting/AccountComment.cs index 709e70baf..778e7558b 100644 --- a/Scripts/Accounting/AccountComment.cs +++ b/Scripts/Accounting/AccountComment.cs @@ -53,7 +53,7 @@ namespace Server.Accounting public AccountComment( XmlElement node ) { m_AddedBy = Utility.GetAttribute( node, "addedBy", "empty" ); - m_LastModified = Utility.GetDateTime( Utility.GetAttribute( node, "lastModified" ), DateTime.Now ); + m_LastModified = Utility.GetXMLDateTime( Utility.GetAttribute( node, "lastModified" ), DateTime.Now ); m_Content = Utility.GetText( node, "" ); } diff --git a/Scripts/Commands/Properties.cs b/Scripts/Commands/Properties.cs index f4107d271..82850a739 100644 --- a/Scripts/Commands/Properties.cs +++ b/Scripts/Commands/Properties.cs @@ -266,10 +266,18 @@ namespace Server.Commands if( !( obj is IConvertible ) ) return "Property is not IConvertable."; - long v = (long)Convert.ChangeType( obj, TypeCode.Int64 ); - v += realValues[i]; + try + { - realProps[i].SetValue( realObjs[i], Convert.ChangeType( v, realProps[i].PropertyType ), null ); + long v = (long)Convert.ChangeType( obj, TypeCode.Int64 ); + v += realValues[i]; + + realProps[i].SetValue( realObjs[i], Convert.ChangeType( v, realProps[i].PropertyType ), null ); + } + catch + { + return "Value could not be converted"; + } } if ( realProps.Length == 1 ) diff --git a/Scripts/Commands/Statics.cs b/Scripts/Commands/Statics.cs index ffd7469e1..2fa16e3d3 100644 --- a/Scripts/Commands/Statics.cs +++ b/Scripts/Commands/Statics.cs @@ -6,6 +6,7 @@ using Server.Gumps; using Server.Items; using Server.Commands; using Server.Targeting; +using System.Collections.Generic; namespace Server { @@ -201,7 +202,7 @@ namespace Server for ( int i = 0; i < state.m_List.Count; ++i ) { - Item item = (Item)state.m_List[i]; + Item item = state.m_List[i]; int xOffset = item.X - (state.m_X * 8); int yOffset = item.Y - (state.m_Y * 8); @@ -551,13 +552,13 @@ namespace Server private class DeltaState { public int m_X, m_Y; - public ArrayList m_List; + public List m_List; public DeltaState( Point2D p ) { m_X = p.X; m_Y = p.Y; - m_List = new ArrayList(); + m_List = new List(); } } diff --git a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs index d2cbf1aa9..481b7f962 100644 --- a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs +++ b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleController.cs @@ -101,7 +101,7 @@ namespace Server.Engines.Doom m_Teles = new List(); for (; i<15; i++) - m_Teles.Add( AddLeverPuzzlePart( TA[i], new LampRoomTelePorter( TA[++i] ))); + m_Teles.Add( AddLeverPuzzlePart( TA[i], new LampRoomTeleporter( TA[++i] ))); m_Statues = new List(); for (; i<19; i++) @@ -266,7 +266,7 @@ namespace Server.Engines.Doom /* if one bit in each of the four nibbles is set, this is false */ - if( (TheirKey=(ushort)(code|(TheirKey<<=4))) < 4095 ) + if( (TheirKey=(ushort)(code|(TheirKey<<=4))) < 0x0FFF ) { l_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 30.0 ), new TimerCallback( ResetPuzzle )); return; diff --git a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs index 67b03a11a..a07113c90 100644 --- a/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs +++ b/Scripts/Engines/Doom/LeverPuzzle/LeverPuzzleItems.cs @@ -152,9 +152,11 @@ namespace Server.Engines.Doom m_Controller = reader.ReadItem() as LeverPuzzleController; } } - public class LampRoomTelePorter : Item + + [TypeAlias( "Server.Engines.Doom.LampRoomTelePorter" )] + public class LampRoomTeleporter : Item { - public LampRoomTelePorter( int[] dat ) + public LampRoomTeleporter( int[] dat ) { Hue = dat[1]; ItemID = dat[0]; @@ -180,7 +182,7 @@ namespace Server.Engines.Doom return true; } - public LampRoomTelePorter( Serial serial ) : base( serial ) + public LampRoomTeleporter( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) diff --git a/Scripts/Engines/Factions/Core/Faction.cs b/Scripts/Engines/Factions/Core/Faction.cs index 617b90970..fa7275a36 100644 --- a/Scripts/Engines/Factions/Core/Faction.cs +++ b/Scripts/Engines/Factions/Core/Faction.cs @@ -884,25 +884,28 @@ namespace Server.Factions public const double SkillLossFactor = 1.0 / 3; public static readonly TimeSpan SkillLossPeriod = TimeSpan.FromMinutes( 20.0 ); - private static Hashtable m_SkillLoss = new Hashtable(); + private static Dictionary m_SkillLoss = new Dictionary(); private class SkillLossContext { public Timer m_Timer; - public ArrayList m_Mods; + public List m_Mods; + } + + public static bool InSkillLoss( Mobile mob ) + { + return m_SkillLoss.ContainsKey( mob ); } public static void ApplySkillLoss( Mobile mob ) { - SkillLossContext context = (SkillLossContext)m_SkillLoss[mob]; - - if ( context != null ) + if ( InSkillLoss( mob ) ) return; - context = new SkillLossContext(); + SkillLossContext context = new SkillLossContext(); m_SkillLoss[mob] = context; - ArrayList mods = context.m_Mods = new ArrayList(); + List mods = context.m_Mods = new List(); for ( int i = 0; i < mob.Skills.Length; ++i ) { @@ -928,18 +931,17 @@ namespace Server.Factions public static bool ClearSkillLoss( Mobile mob ) { - SkillLossContext context = (SkillLossContext)m_SkillLoss[mob]; + SkillLossContext context; - if ( context == null ) { + if ( !m_SkillLoss.TryGetValue( mob, out context ) ) return false; - } m_SkillLoss.Remove( mob ); - ArrayList mods = context.m_Mods; + List mods = context.m_Mods; for ( int i = 0; i < mods.Count; ++i ) - mob.RemoveSkillMod( (SkillMod) mods[i] ); + mob.RemoveSkillMod( mods[i] ); context.m_Timer.Stop(); diff --git a/Scripts/Engines/Factions/Mobiles/Guards/GuardAI.cs b/Scripts/Engines/Factions/Mobiles/Guards/GuardAI.cs index 72765ebee..104f84aae 100644 --- a/Scripts/Engines/Factions/Mobiles/Guards/GuardAI.cs +++ b/Scripts/Engines/Factions/Mobiles/Guards/GuardAI.cs @@ -673,7 +673,7 @@ namespace Server.Factions int dexMod = GetStatMod( m_Guard, StatType.Dex ); int intMod = GetStatMod( m_Guard, StatType.Int ); - ArrayList types = new ArrayList(); + List types = new List(); if ( strMod <= 0 ) types.Add( typeof( StrengthSpell ) ); @@ -689,7 +689,7 @@ namespace Server.Factions if ( types.Count > 1 ) spell = new BlessSpell( m_Guard, null ); else if ( types.Count == 1 ) - spell = (Spell) Activator.CreateInstance( (Type) types[0], new object[]{ m_Guard, null } ); + spell = (Spell) Activator.CreateInstance( types[0], new object[]{ m_Guard, null } ); } else if ( types.Count > 0 ) { @@ -712,7 +712,7 @@ namespace Server.Factions int dexMod = GetStatMod( combatant, StatType.Dex ); int intMod = GetStatMod( combatant, StatType.Int ); - ArrayList types = new ArrayList(); + List types = new List(); if ( strMod >= 0 ) types.Add( typeof( WeakenSpell ) ); @@ -726,7 +726,7 @@ namespace Server.Factions if ( types.Count > 1 ) spell = new CurseSpell( m_Guard, null ); else if ( types.Count == 1 ) - spell = (Spell) Activator.CreateInstance( (Type) types[0], new object[]{ m_Guard, null } ); + spell = (Spell) Activator.CreateInstance( types[0], new object[]{ m_Guard, null } ); } } } diff --git a/Scripts/Engines/Factions/Mobiles/Vendors/BaseFactionVendor.cs b/Scripts/Engines/Factions/Mobiles/Vendors/BaseFactionVendor.cs index aa0d12fbc..8ca55e327 100644 --- a/Scripts/Engines/Factions/Mobiles/Vendors/BaseFactionVendor.cs +++ b/Scripts/Engines/Factions/Mobiles/Vendors/BaseFactionVendor.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Mobiles; @@ -44,8 +44,8 @@ namespace Server.Factions m_Town.UnregisterVendor( this ); } - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override void InitSBInfo() { diff --git a/Scripts/Engines/Factions/Mobiles/Vendors/FactionBoardVendor.cs b/Scripts/Engines/Factions/Mobiles/Vendors/FactionBoardVendor.cs index 584082448..2eb221dad 100644 --- a/Scripts/Engines/Factions/Mobiles/Vendors/FactionBoardVendor.cs +++ b/Scripts/Engines/Factions/Mobiles/Vendors/FactionBoardVendor.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; using Server.Mobiles; @@ -47,7 +47,7 @@ namespace Server.Factions public class SBFactionBoard : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBFactionBoard() @@ -55,9 +55,9 @@ namespace Server.Factions } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Engines/Factions/Mobiles/Vendors/FactionBottleVendor.cs b/Scripts/Engines/Factions/Mobiles/Vendors/FactionBottleVendor.cs index 2884d669d..eccad0397 100644 --- a/Scripts/Engines/Factions/Mobiles/Vendors/FactionBottleVendor.cs +++ b/Scripts/Engines/Factions/Mobiles/Vendors/FactionBottleVendor.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; using Server.Mobiles; @@ -52,7 +52,7 @@ namespace Server.Factions public class SBFactionBottle : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBFactionBottle() @@ -60,9 +60,9 @@ namespace Server.Factions } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs b/Scripts/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs index 9d5d3a071..cabac7eac 100644 --- a/Scripts/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs +++ b/Scripts/Engines/Factions/Mobiles/Vendors/FactionHorseVendor.cs @@ -4,6 +4,7 @@ using Server; using Server.Items; using Server.Mobiles; using Server.Network; +using System.Collections.Generic; namespace Server.Factions { @@ -55,12 +56,12 @@ namespace Server.Factions { } - public override bool OnBuyItems( Mobile buyer, ArrayList list ) + public override bool OnBuyItems( Mobile buyer, List list ) { return false; } - public override bool OnSellItems( Mobile seller, ArrayList list ) + public override bool OnSellItems( Mobile seller, List list ) { return false; } diff --git a/Scripts/Engines/Factions/Mobiles/Vendors/FactionOreVendor.cs b/Scripts/Engines/Factions/Mobiles/Vendors/FactionOreVendor.cs index 5e8e6d957..e76b93742 100644 --- a/Scripts/Engines/Factions/Mobiles/Vendors/FactionOreVendor.cs +++ b/Scripts/Engines/Factions/Mobiles/Vendors/FactionOreVendor.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; using Server.Mobiles; @@ -48,7 +48,7 @@ namespace Server.Factions public class SBFactionOre : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBFactionOre() @@ -56,9 +56,9 @@ namespace Server.Factions } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Engines/Factions/Mobiles/Vendors/FactionReagentVendor.cs b/Scripts/Engines/Factions/Mobiles/Vendors/FactionReagentVendor.cs index 03f4ae0d0..31e85cd4b 100644 --- a/Scripts/Engines/Factions/Mobiles/Vendors/FactionReagentVendor.cs +++ b/Scripts/Engines/Factions/Mobiles/Vendors/FactionReagentVendor.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; using Server.Mobiles; @@ -57,7 +57,7 @@ namespace Server.Factions public class SBFactionReagent : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBFactionReagent() @@ -65,9 +65,9 @@ namespace Server.Factions } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Engines/Party/Party.cs b/Scripts/Engines/Party/Party.cs index d771d99ec..2df8d72ee 100644 --- a/Scripts/Engines/Party/Party.cs +++ b/Scripts/Engines/Party/Party.cs @@ -5,15 +5,16 @@ using Server.Network; using Server.Targeting; using Server.Factions; using Server.Commands; +using System.Collections.Generic; namespace Server.Engines.PartySystem { public class Party : IParty { private Mobile m_Leader; - private ArrayList m_Members; - private ArrayList m_Candidates; - private ArrayList m_Listeners; // staff listening + private List m_Members; + private List m_Candidates; + private List m_Listeners; // staff listening public const int Capacity = 10; @@ -148,9 +149,9 @@ namespace Server.Engines.PartySystem { m_Leader = leader; - m_Members = new ArrayList(); - m_Candidates = new ArrayList(); - m_Listeners = new ArrayList(); + m_Members = new List(); + m_Candidates = new List(); + m_Listeners = new List(); m_Members.Add( new PartyMemberInfo( leader ) ); } @@ -335,10 +336,10 @@ namespace Server.Engines.PartySystem for ( int i = 0; i < m_Listeners.Count; ++i ) { - Mobile mob = (Mobile)m_Listeners[i]; + Mobile mob = m_Listeners[i]; if ( mob.Party != this ) - ((Mobile)m_Listeners[i]).SendMessage( "[{0}]: {1}", from.Name, text ); + m_Listeners[i].SendMessage( "[{0}]: {1}", from.Name, text ); } SendToStaffMessage( from, "[Party]: {0}", text ); @@ -350,10 +351,10 @@ namespace Server.Engines.PartySystem for ( int i = 0; i < m_Listeners.Count; ++i ) { - Mobile mob = (Mobile)m_Listeners[i]; + Mobile mob = m_Listeners[i]; if ( mob.Party != this ) - ((Mobile)m_Listeners[i]).SendMessage( "[{0}]->[{1}]: {2}", from.Name, to.Name, text ); + m_Listeners[i].SendMessage( "[{0}]->[{1}]: {2}", from.Name, to.Name, text ); } SendToStaffMessage( from, "[Party]->[{0}]: {1}", to.Name, text ); @@ -388,13 +389,13 @@ namespace Server.Engines.PartySystem p.Acquire(); for ( int i = 0; i < m_Members.Count; ++i ) - ((PartyMemberInfo)m_Members[i]).Mobile.Send( p ); + m_Members[i].Mobile.Send( p ); if ( p is MessageLocalized || p is MessageLocalizedAffix || p is UnicodeMessage || p is AsciiMessage ) { for ( int i = 0; i < m_Listeners.Count; ++i ) { - Mobile mob = (Mobile)m_Listeners[i]; + Mobile mob = m_Listeners[i]; if ( mob.Party != this ) mob.Send( p ); @@ -410,7 +411,7 @@ namespace Server.Engines.PartySystem for ( int i = 0; i < m_Members.Count; ++i ) { - Mobile c = ((PartyMemberInfo)m_Members[i]).Mobile; + Mobile c = m_Members[i].Mobile; if ( c != m && m.Map == c.Map && Utility.InUpdateRange( c, m ) && c.CanSee( m ) ) { @@ -430,7 +431,7 @@ namespace Server.Engines.PartySystem for ( int i = 0; i < m_Members.Count; ++i ) { - Mobile c = ((PartyMemberInfo)m_Members[i]).Mobile; + Mobile c = m_Members[i].Mobile; if ( c != m && m.Map == c.Map && Utility.InUpdateRange( c, m ) && c.CanSee( m ) ) { @@ -458,17 +459,17 @@ namespace Server.Engines.PartySystem public int Count{ get{ return m_Members.Count; } } public bool Active{ get{ return m_Members.Count > 1; } } public Mobile Leader{ get{ return m_Leader; } } - public ArrayList Members{ get{ return m_Members; } } - public ArrayList Candidates{ get{ return m_Candidates; } } + public List Members{ get{ return m_Members; } } + public List Candidates { get { return m_Candidates; } } - public PartyMemberInfo this[int index]{ get{ return (PartyMemberInfo)m_Members[index]; } } + public PartyMemberInfo this[int index]{ get{ return m_Members[index]; } } public PartyMemberInfo this[Mobile m] { get { for ( int i = 0; i < m_Members.Count; ++i ) - if ( ((PartyMemberInfo)m_Members[i]).Mobile == m ) - return (PartyMemberInfo)m_Members[i]; + if ( m_Members[i].Mobile == m ) + return m_Members[i]; return null; } diff --git a/Scripts/Engines/Quests/Core/BaseQuester.cs b/Scripts/Engines/Quests/Core/BaseQuester.cs index be45c7448..b433c0ce0 100644 --- a/Scripts/Engines/Quests/Core/BaseQuester.cs +++ b/Scripts/Engines/Quests/Core/BaseQuester.cs @@ -28,8 +28,8 @@ namespace Server.Engines.Quests public abstract class BaseQuester : BaseVendor { - protected ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + protected List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override bool IsActiveVendor{ get{ return false; } } public override bool IsInvulnerable{ get{ return true; } } diff --git a/Scripts/Engines/Quests/Uzeraan Turmoil/Mobiles/Dryad.cs b/Scripts/Engines/Quests/Uzeraan Turmoil/Mobiles/Dryad.cs index 15a5591bc..84be2ff57 100644 --- a/Scripts/Engines/Quests/Uzeraan Turmoil/Mobiles/Dryad.cs +++ b/Scripts/Engines/Quests/Uzeraan Turmoil/Mobiles/Dryad.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Mobiles; using Server.Items; @@ -161,7 +161,7 @@ namespace Server.Engines.Quests.Haven public class SBDryad : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBDryad() @@ -169,9 +169,9 @@ namespace Server.Engines.Quests.Haven } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokuno.cs b/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokuno.cs index 5fce51610..45393723a 100644 --- a/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokuno.cs +++ b/Scripts/Engines/Treasures of Tokuno/TreasuresOfTokuno.cs @@ -2,6 +2,7 @@ using System; using Server; using Server.Network; using System.Collections; +using System.Collections.Generic; using Server.Items; using Server.Gumps; using Server.Misc; @@ -192,8 +193,8 @@ namespace Server.Mobiles public override bool ClickTitle { get { return true; } } public override bool CanTeach { get { return false; } } - protected ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos { get { return m_SBInfos; } } + protected List m_SBInfos = new List(); + protected override List SBInfos { get { return m_SBInfos; } } public override void InitSBInfo() { diff --git a/Scripts/Gumps/AdminGump.cs b/Scripts/Gumps/AdminGump.cs index d8021a447..b60da3842 100644 --- a/Scripts/Gumps/AdminGump.cs +++ b/Scripts/Gumps/AdminGump.cs @@ -2353,11 +2353,9 @@ namespace Server.Gumps { ArrayList results = new ArrayList(); - DateTime minTime = DateTime.Now - Account.InactiveDuration; - foreach ( Account acct in Accounts.GetAccounts() ) { - if ( acct.LastLogin <= minTime ) + if ( acct.Inactive ) results.Add( acct ); } diff --git a/Scripts/Gumps/Guilds/New Guild System/GuildMemberInfoGump.cs b/Scripts/Gumps/Guilds/New Guild System/GuildMemberInfoGump.cs index 4494fd58e..d0c7f1d62 100644 --- a/Scripts/Gumps/Guilds/New Guild System/GuildMemberInfoGump.cs +++ b/Scripts/Gumps/Guilds/New Guild System/GuildMemberInfoGump.cs @@ -17,7 +17,7 @@ namespace Server.Guilds { m_ToLeader = toPromoteToLeader; m_toKick = toKick; - m_Member = (PlayerMobile)member; + m_Member = member; PopulateGump(); } diff --git a/Scripts/Gumps/VendorRentalGumps.cs b/Scripts/Gumps/VendorRentalGumps.cs index eedb07efb..c3507b1ba 100644 --- a/Scripts/Gumps/VendorRentalGumps.cs +++ b/Scripts/Gumps/VendorRentalGumps.cs @@ -284,14 +284,8 @@ namespace Server.Gumps int price; - try - { - price = Convert.ToInt32( text ); - } - catch - { - price = -1; - } + if ( !int.TryParse( text, out price ) ) + price = -1; if ( price < 0 ) { @@ -512,14 +506,8 @@ namespace Server.Gumps int price; - try - { - price = Convert.ToInt32( text ); - } - catch - { - price = -1; - } + if ( !int.TryParse( text, out price ) ) + price = -1; if ( price < 0 ) { diff --git a/Scripts/Items/Food/Beverage.cs b/Scripts/Items/Food/Beverage.cs index b6004cc78..8ccf718ef 100644 --- a/Scripts/Items/Food/Beverage.cs +++ b/Scripts/Items/Food/Beverage.cs @@ -476,9 +476,9 @@ namespace Server.Items public override void Deserialize( GenericReader reader ) { if ( CheckType( "PitcherWater" ) || CheckType( "GlassPitcher" ) ) - base.Deserialize( reader, false ); + base.InternalDeserialize( reader, false ); else - base.Deserialize( reader, true ); + base.InternalDeserialize( reader, true ); int version = reader.ReadInt(); @@ -1141,10 +1141,10 @@ namespace Server.Items public override void Deserialize( GenericReader reader ) { - Deserialize( reader, true ); + InternalDeserialize( reader, true ); } - public void Deserialize( GenericReader reader, bool read ) + protected void InternalDeserialize( GenericReader reader, bool read ) { base.Deserialize( reader ); diff --git a/Scripts/Items/Misc/Corpses/Corpse.cs b/Scripts/Items/Misc/Corpses/Corpse.cs index 987f33dbe..8781653b5 100644 --- a/Scripts/Items/Misc/Corpses/Corpse.cs +++ b/Scripts/Items/Misc/Corpses/Corpse.cs @@ -90,17 +90,160 @@ namespace Server.Items if ( !Core.SE ) return false; - return ( DateTime.Now > m_TimeOfDeath + InstancedCorpseTime ); + return ( DateTime.Now < (m_TimeOfDeath + InstancedCorpseTime) ); } } - public override bool IsDecoContainer + private Dictionary m_InstancedItems; + + private class InstancedItemInfo + { + private Mobile m_Mobile; + private Item m_Item; + + private bool m_Perpetual; //Needed for Rummaged stuff. CONTRARY to the Patchlog, cause a later FoF contradicts it. Verify on OSI. + public bool Perpetual { get { return m_Perpetual; } set { m_Perpetual = value; } } + + public InstancedItemInfo( Item i, Mobile m ) + { + m_Item = i; + m_Mobile = m; + } + + public bool IsOwner( Mobile m ) + { + if ( m_Item.LootType == LootType.Cursed ) //Cursed Items are part of everyone's instanced corpse... (?) + return true; + + if ( m == null ) + return false; //sanity + + if ( m_Mobile == m ) + return true; + + Party myParty = Party.Get( m_Mobile ); + + return (myParty != null && myParty == Party.Get( m )); + } + } + + public override bool IsChildVisibleTo( Mobile m, Item child ) + { + if ( !m.Player || m.AccessLevel > AccessLevel.Player ) //Staff and creatures not subject to instancing. + return true; + + if ( m_InstancedItems != null ) + { + InstancedItemInfo info; + + if ( m_InstancedItems.TryGetValue( child, out info ) && (InstancedCorpse || info.Perpetual) ) + { + return info.IsOwner( m ); //IsOwner checks Party stuff. + } + } + + return true; + } + + private void AssignInstancedLoot() + { + if ( m_Aggressors.Count == 0 || this.Items.Count == 0 ) + return; + + if ( m_InstancedItems == null ) + m_InstancedItems = new Dictionary(); + + List m_Stackables = new List(); + List m_Unstackables = new List(); + + for ( int i = 0; i < this.Items.Count; i++ ) + { + Item item = this.Items[i]; + + if ( item.LootType != LootType.Cursed ) //Don't have curesd items take up someone's item spot.. (?) + { + if ( item.Stackable ) + m_Stackables.Add( item ); + else + m_Unstackables.Add( item ); + } + } + + List attackers = new List( m_Aggressors ); + + for ( int i = 1; i < attackers.Count -1; i++ ) //randomize + { + int rand = Utility.Random( i + 1 ); + + Mobile temp = attackers[rand]; + attackers[rand] = attackers[i]; + attackers[i] = temp; + } + + //stackables first, for the remaining stackables, have those be randomly added after + + for ( int i = 0; i < m_Stackables.Count; i++ ) + { + Item item = m_Stackables[i]; + + if ( item.Amount >= attackers.Count ) + { + int amountPerAttacker = (item.Amount / attackers.Count); + int remainder = (item.Amount % attackers.Count); + + for ( int j = 0; j < ((remainder == 0) ? attackers.Count -1 : attackers.Count); j++ ) + { + Item splitItem = Mobile.LiftItemDupe( item, item.Amount - amountPerAttacker ); //LiftItemDupe automagically adds it as a child item to the corpse + + m_InstancedItems.Add( splitItem, new InstancedItemInfo( splitItem, attackers[j] ) ); + + //What happens to the remaining portion? TEMP FOR NOW UNTIL OSI VERIFICATION: Treat as Single Item. + } + + if ( remainder == 0 ) + { + m_InstancedItems.Add( item, new InstancedItemInfo( item, attackers[attackers.Count - 1] ) ); + //Add in the original item (which has an equal amount as the others) to the instance for the last attacker, cause it wasn't added above. + } + else + { + m_Unstackables.Add( item ); + } + } + else + { + //What happens in this case? TEMP FOR NOW UNTIL OSI VERIFICATION: Treat as Single Item. + m_Unstackables.Add( item ); + } + } + + for ( int i = 0; i < m_Unstackables.Count; i++ ) + { + Mobile m = attackers[i % attackers.Count]; + Item item = m_Unstackables[i]; + + m_InstancedItems.Add( item, new InstancedItemInfo( item, m ) ); + } + } + + public void AddCarvedItem( Item carved, Mobile carver ) + { + this.DropItem( carved ); + + if ( this.InstancedCorpse ) + { + if ( m_InstancedItems == null ) + m_InstancedItems = new Dictionary(); + + m_InstancedItems.Add( carved, new InstancedItemInfo( carved, carver ) ); + } + } + + public override bool IsDecoContainer { get{ return false; } } - private Dictionary> m_InstancedItems; - [CommandProperty( AccessLevel.GameMaster )] public DateTime TimeOfDeath { @@ -310,6 +453,9 @@ namespace Server.Items if ( owner.Player && Core.AOS ) c.SetRestoreInfo( item, item.Location ); } + + if ( !owner.Player ) + c.AssignInstancedLoot(); } else { @@ -371,7 +517,9 @@ namespace Server.Items m_EquipItems = equipItems; m_Aggressors = new List( owner.Aggressors.Count + owner.Aggressed.Count ); - bool addToAggressors = !( owner is BaseCreature ); + //bool addToAggressors = !( owner is BaseCreature ); + + bool isBaseCreature = (owner is BaseCreature); TimeSpan lastTime = TimeSpan.MaxValue; @@ -385,7 +533,7 @@ namespace Server.Items lastTime = (DateTime.Now - info.LastCombatTime); } - if ( addToAggressors && !info.CriminalAggression ) + if ( !isBaseCreature && !info.CriminalAggression ) m_Aggressors.Add( info.Attacker ); } @@ -399,11 +547,11 @@ namespace Server.Items lastTime = (DateTime.Now - info.LastCombatTime); } - if ( addToAggressors ) + if ( !isBaseCreature ) m_Aggressors.Add( info.Defender ); } - if ( !addToAggressors ) + if ( isBaseCreature ) { BaseCreature bc = (BaseCreature)owner; @@ -426,12 +574,6 @@ namespace Server.Items DevourCorpse(); } - private void AssignInstancedLoot() - { - if ( m_InstancedItems == null ) - m_InstancedItems = new Dictionary>(); - } - public Corpse( Serial serial ) : base( serial ) { } @@ -713,6 +855,9 @@ namespace Server.Items if ( !m_Looters.Contains( from ) ) m_Looters.Add( from ); + + if ( m_InstancedItems != null && m_InstancedItems.ContainsKey( item ) ) + m_InstancedItems.Remove( item ); } public override void OnItemLifted( Mobile from, Item item ) @@ -727,6 +872,9 @@ namespace Server.Items if ( !m_Looters.Contains( from ) ) m_Looters.Add( from ); + + if ( m_InstancedItems != null && m_InstancedItems.ContainsKey( item ) ) + m_InstancedItems.Remove( item ); } private class OpenCorpseEntry : ContextMenuEntry diff --git a/Scripts/Items/Skill Items/Carpenter Items/TaxidermyKit.cs b/Scripts/Items/Skill Items/Carpenter Items/TaxidermyKit.cs index e48ccc31e..9ef6e9274 100644 --- a/Scripts/Items/Skill Items/Carpenter Items/TaxidermyKit.cs +++ b/Scripts/Items/Skill Items/Carpenter Items/TaxidermyKit.cs @@ -52,16 +52,38 @@ namespace Server.Items } } - private static object[,] m_Table = new object[,] - { - { typeof( BrownBear ), 0x1E60, 1041093, 1041107 }, - { typeof( GreatHart ), 0x1E61, 1041095, 1041109 }, - { typeof( BigFish ), 0x1E62, 1041096, 1041110 }, - { typeof( Gorilla ), 0x1E63, 1041091, 1041105 }, - { typeof( Orc ), 0x1E64, 1041090, 1041104 }, - { typeof( PolarBear ), 0x1E65, 1041094, 1041108 }, - { typeof( Troll ), 0x1E66, 1041092, 1041106 } - }; + private static TrophyInfo[] m_Table = new TrophyInfo[] + { + new TrophyInfo( typeof( BrownBear ), 0x1E60, 1041093, 1041107 ), + new TrophyInfo( typeof( GreatHart ), 0x1E61, 1041095, 1041109 ), + new TrophyInfo( typeof( BigFish ), 0x1E62, 1041096, 1041110 ), + new TrophyInfo( typeof( Gorilla ), 0x1E63, 1041091, 1041105 ), + new TrophyInfo( typeof( Orc ), 0x1E64, 1041090, 1041104 ), + new TrophyInfo( typeof( PolarBear ), 0x1E65, 1041094, 1041108 ), + new TrophyInfo( typeof( Troll ), 0x1E66, 1041092, 1041106 ) + }; + + public class TrophyInfo + { + public TrophyInfo( Type type, int id, int deedNum, int addonNum ) + { + m_CreatureType = type; + m_NorthID = id; + m_DeedNumber = deedNum; + m_AddonNumber = addonNum; + } + + private Type m_CreatureType; + private int m_NorthID; + private int m_DeedNumber; + private int m_AddonNumber; + + public Type CreatureType { get { return m_CreatureType; } } + public int NorthID { get { return m_NorthID; } } + public int DeedNumber { get { return m_DeedNumber; } } + public int AddonNumber { get { return m_AddonNumber; } } + } + private class CorpseTarget : Target { @@ -100,43 +122,49 @@ namespace Server.Items if ( obj is Corpse ) obj = ((Corpse)obj).Owner; - for ( int i = 0; obj != null && i < m_Table.GetLength( 0 ); ++i ) - { - if ( m_Table[i, 0] == obj.GetType() ) - { - Container pack = from.Backpack; + if ( obj != null ) + { + for ( int i = 0; i < m_Table.Length; i++ ) + { + if ( m_Table[i].CreatureType == obj.GetType() ) + { + Container pack = from.Backpack; - if ( pack != null && pack.ConsumeTotal( typeof( Board ), 10 ) ) - { - from.SendLocalizedMessage( 1042278 ); // You review the corpse and find it worthy of a trophy. - from.SendLocalizedMessage( 1042602 ); // You use your kit up making the trophy. + if ( pack != null && pack.ConsumeTotal( typeof( Board ), 10 ) ) + { + from.SendLocalizedMessage( 1042278 ); // You review the corpse and find it worthy of a trophy. + from.SendLocalizedMessage( 1042602 ); // You use your kit up making the trophy. - Mobile hunter = null; - int weight = 0; + Mobile hunter = null; + int weight = 0; - if ( targeted is BigFish ) - { - hunter = ((BigFish)targeted).Fisher; - weight = (int) ((BigFish)targeted).Weight; - } + if ( targeted is BigFish ) + { + BigFish fish = targeted as BigFish; - from.AddToBackpack( new TrophyDeed( (int)m_Table[i, 1] + 7, (int)m_Table[i, 1], (int)m_Table[i, 2], (int)m_Table[i, 3], hunter, weight ) ); + hunter = fish.Fisher; + weight = (int)fish.Weight; - if ( targeted is Corpse ) - ((Corpse)targeted).VisitedByTaxidermist = true; - else if ( targeted is BigFish ) - ((BigFish)targeted).Consume(); + fish.Consume(); + } - m_Kit.Delete(); - return; - } - else - { - from.SendLocalizedMessage( 1042598 ); // You do not have enough boards. - return; - } - } - } + + from.AddToBackpack( new TrophyDeed( m_Table[i], hunter, weight ) ); + + if ( targeted is Corpse ) + ((Corpse)targeted).VisitedByTaxidermist = true; + + m_Kit.Delete(); + return; + } + else + { + from.SendLocalizedMessage( 1042598 ); // You do not have enough boards. + return; + } + } + } + } from.SendLocalizedMessage( 1042599 ); // That does not look like something you want hanging on a wall. } @@ -144,6 +172,8 @@ namespace Server.Items } } + + public class TrophyAddon : Item, IAddon { public override bool ForceShowProperties { get { return ObjectPropertyList.Enabled; } } @@ -353,6 +383,11 @@ namespace Server.Items m_AnimalWeight = animalWeight; } + public TrophyDeed( TaxidermyKit.TrophyInfo info, Mobile hunter, int animalWeight ) + : this( info.NorthID + 7, info.NorthID, info.DeedNumber, info.AddonNumber ) + { + } + public TrophyDeed( Serial serial ) : base( serial ) { } diff --git a/Scripts/Items/Special/Veteran Rewards/MiningCart.cs b/Scripts/Items/Special/Veteran Rewards/MiningCart.cs index cf0746e72..bb561c5ca 100644 --- a/Scripts/Items/Special/Veteran Rewards/MiningCart.cs +++ b/Scripts/Items/Special/Veteran Rewards/MiningCart.cs @@ -191,7 +191,7 @@ namespace Server.Items { Item gems = null; - switch ( Utility.Random( 17 ) ) + switch ( Utility.Random( 15 ) ) { case 0: gems = new Amber(); break; case 1: gems = new Amethyst(); break; @@ -208,10 +208,8 @@ namespace Server.Items case 10: gems = new DarkSapphire(); break; case 11: gems = new Turquoise(); break; case 12: gems = new EcruCitrine(); break; - case 13: gems = new WhitePearl(); break; - case 14: gems = new FireRuby(); break; - case 15: gems = new BlueDiamond(); break; - case 16: gems = new BrilliantAmber(); break; + case 13: gems = new FireRuby(); break; + case 14: gems = new BlueDiamond(); break; } int amount = Math.Min( 5, m_Gems ); diff --git a/Scripts/Misc/DataPath.cs b/Scripts/Misc/DataPath.cs index 2e3dc9267..502818c79 100644 --- a/Scripts/Misc/DataPath.cs +++ b/Scripts/Misc/DataPath.cs @@ -36,6 +36,8 @@ namespace Server.Misc string pathReg = GetExePath( "Ultima Online" ); string pathTD = GetExePath( "Ultima Online Third Dawn" ); //These refer to 2D & 3D, not the Third Dawn expansion + string newPath = GetExePath("Ultima Online", "KR Legacy Beta"); //After KR, This is the new registry key for the 2D client + if ( CustomPath != null ) Core.DataDirectories.Add( CustomPath ); @@ -43,7 +45,10 @@ namespace Server.Misc Core.DataDirectories.Add( pathReg ); if ( pathTD != null ) - Core.DataDirectories.Add( pathTD ); + Core.DataDirectories.Add( pathTD ); + + if ( newPath != null ) + Core.DataDirectories.Add( newPath ); if ( Core.DataDirectories.Count == 0 && !Core.Service ) { @@ -54,18 +59,23 @@ namespace Server.Misc } } - private static string GetExePath( string subName ) + private static string GetExePath( string subName ) + { + return GetExePath( subName, "1.0" ); + } + + private static string GetExePath( string subName, string version ) { try { String keyString; if( Core.Is64Bit ) - keyString = @"SOFTWARE\Wow6432Node\Origin Worlds Online\{0}\1.0"; + keyString = @"SOFTWARE\Wow6432Node\Origin Worlds Online\{0}\{1}"; else - keyString = @"SOFTWARE\Origin Worlds Online\{0}\1.0"; + keyString = @"SOFTWARE\Origin Worlds Online\{0}\{1}"; - using( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( keyString, subName ) ) ) + using( RegistryKey key = Registry.LocalMachine.OpenSubKey( String.Format( keyString, subName, version ) ) ) { if( key == null ) return null; diff --git a/Scripts/Misc/Guild.cs b/Scripts/Misc/Guild.cs index d00544961..f358a8721 100644 --- a/Scripts/Misc/Guild.cs +++ b/Scripts/Misc/Guild.cs @@ -603,9 +603,10 @@ namespace Server.Guilds { Guild g = null; - int id = Utility.GetInt32( arg, -1 ); - if( id != -1 ) - g = Guild.Find( id ) as Guild; + int id; + + if( int.TryParse( arg, out id ) ) + g = Guild.Find( id ) as Guild; if( g == null ) { @@ -615,11 +616,13 @@ namespace Server.Guilds g = Guild.FindByName( arg ) as Guild; } - if( g != null ) + if ( g != null ) + { from.SendGump( new PropertiesGump( from, g ) ); - if( NewGuildSystem && from.AccessLevel >= AccessLevel.GameMaster && from is PlayerMobile ) - from.SendGump( new GuildInfoGump( (PlayerMobile)from, g ) ); + if ( NewGuildSystem && from.AccessLevel >= AccessLevel.GameMaster && from is PlayerMobile ) + from.SendGump( new GuildInfoGump( (PlayerMobile)from, g ) ); + } } } @@ -1607,7 +1610,6 @@ namespace Server.Guilds public void CalculateGuildmaster() { - //Hashtable votes = new Hashtable(); Dictionary votes = new Dictionary(); int votingMembers = 0; @@ -1621,7 +1623,6 @@ namespace Server.Guilds Mobile m = memb.GuildFealty; - //if ( m == null || m.Deleted || m.Guild != this ) if( !CanBeVotedFor( m ) ) { if ( m_Leader != null && !m_Leader.Deleted && m_Leader.Guild == this ) @@ -1639,13 +1640,6 @@ namespace Server.Guilds votes[m] = 1; else votes[m] = v + 1; - - /* - if ( votes[m] == null ) - votes[m] = (int)1; - else - votes[m] = (int)(votes[m]) + 1; - * */ votingMembers++; } diff --git a/Scripts/Misc/HardwareInfo.cs b/Scripts/Misc/HardwareInfo.cs index 8e2df65a8..53e537d1f 100644 --- a/Scripts/Misc/HardwareInfo.cs +++ b/Scripts/Misc/HardwareInfo.cs @@ -20,6 +20,7 @@ namespace Server private string m_VCDescription; private string m_Language; private string m_Unknown; + private DateTime m_TimeReceived; [CommandProperty( AccessLevel.GameMaster )] public int CpuModel{ get{ return m_CpuModel; } } @@ -96,6 +97,9 @@ namespace Server [CommandProperty( AccessLevel.GameMaster )] public string Unknown{ get{ return m_Unknown; } } + [CommandProperty( AccessLevel.GameMaster )] + public DateTime TimeReceived { get { return m_TimeReceived; } } + public static void Initialize() { PacketHandlers.Register( 0xD9, 0x10C, false, new OnPacketReceive( OnReceive ) ); @@ -174,6 +178,8 @@ namespace Server info.m_Language = pvSrc.ReadUnicodeStringLESafe( 4 ); info.m_Unknown = pvSrc.ReadStringSafe( 64 ); + info.m_TimeReceived = DateTime.Now; + Account acct = state.Account as Account; if ( acct != null ) diff --git a/Scripts/Misc/Notoriety.cs b/Scripts/Misc/Notoriety.cs index 1c3bf0af0..e6ae6cf74 100644 --- a/Scripts/Misc/Notoriety.cs +++ b/Scripts/Misc/Notoriety.cs @@ -295,7 +295,7 @@ namespace Server.Misc return Notoriety.Enemy; } - if ( target.Kills >= 5 || ( target.Body.IsMonster && IsSummoned( target as BaseCreature ) && !( target is BaseFamiliar ) && !( target is ArcaneFey ) && !( target is Golem ) ) || ( target is BaseCreature && ( ( (BaseCreature)target ).AlwaysMurderer || ( (BaseCreature)target ).IsAnimatedDead ) ) ) + if ( target.Kills >= 5 || ( target.Body.IsMonster && IsSummoned( target as BaseCreature ) && !( target is BaseFamiliar ) && !( target is ArcaneFey ) && !( target is Golem ) ) || ( target is BaseCreature && ( ( (BaseCreature)target ).AlwaysMurderer || ( (BaseCreature)target ).IsAnimatedDead ) ) ) return Notoriety.Murderer; if( target.Criminal ) @@ -327,7 +327,7 @@ namespace Server.Misc if( CheckHouseFlag( source, target, target.Location, target.Map ) ) return Notoriety.CanBeAttacked; - if( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) ) + if( !(target is BaseCreature && ((BaseCreature)target).InitialInnocent) ) //If Target is NOT A baseCreature, OR it's a BC and the BC is initial innocent... { if( !target.Body.IsHuman && !target.Body.IsGhost && !IsPet( target as BaseCreature ) && !(target is PlayerMobile) || !Core.ML && !target.CanBeginAction( typeof( Server.Spells.Seventh.PolymorphSpell ) ) ) return Notoriety.CanBeAttacked; diff --git a/Scripts/Misc/SkillCheck.cs b/Scripts/Misc/SkillCheck.cs index 67ac9b3bf..cf10ed556 100644 --- a/Scripts/Misc/SkillCheck.cs +++ b/Scripts/Misc/SkillCheck.cs @@ -1,6 +1,7 @@ using System; using Server; using Server.Mobiles; +using Server.Factions; namespace Server.Misc { @@ -179,6 +180,9 @@ namespace Server.Misc private static bool AllowGain( Mobile from, Skill skill, object obj ) { + if ( Core.AOS && Faction.InSkillLoss( from ) ) //Changed some time between the introduction of AoS and SE. + return false; + if ( AntiMacroCode && from is PlayerMobile && UseAntiMacro[skill.Info.SkillID] ) return ((PlayerMobile)from).AntiMacroCheck( skill, obj ); else diff --git a/Scripts/Misc/Titles.cs b/Scripts/Misc/Titles.cs index 751576a95..96c917519 100644 --- a/Scripts/Misc/Titles.cs +++ b/Scripts/Misc/Titles.cs @@ -127,7 +127,7 @@ namespace Server.Misc } } - public static string[] HarrowerTitles = new string[] { "Spite", "Opponent", "Hunter", "Venom", "Executioner", "Annihilator", "Champion" }; + public static string[] HarrowerTitles = new string[] { "Spite", "Opponent", "Hunter", "Venom", "Executioner", "Annihilator", "Champion", "Assailant", "Purifier", "Nullifier" }; public static string ComputeTitle( Mobile beholder, Mobile beheld ) { diff --git a/Scripts/Misc/TreasureMapProtection.cs b/Scripts/Misc/TreasureMapProtection.cs index af4a018dd..279d05344 100644 --- a/Scripts/Misc/TreasureMapProtection.cs +++ b/Scripts/Misc/TreasureMapProtection.cs @@ -51,6 +51,7 @@ namespace Server } catch { + Console.WriteLine( "Warning: Error in Line '{0}' of Data/treasure.cfg", line ); } } } diff --git a/Scripts/Mobiles/AI/Creature/BaseCreature.cs b/Scripts/Mobiles/AI/Creature/BaseCreature.cs index a61c8da5c..d33827a7c 100644 --- a/Scripts/Mobiles/AI/Creature/BaseCreature.cs +++ b/Scripts/Mobiles/AI/Creature/BaseCreature.cs @@ -1359,24 +1359,24 @@ namespace Server.Mobiles if ( feathers != 0 ) { - corpse.DropItem( new Feather( feathers ) ); + corpse.AddCarvedItem( new Feather( feathers ), from ); from.SendLocalizedMessage( 500479 ); // You pluck the bird. The feathers are now on the corpse. } if ( wool != 0 ) { - corpse.DropItem( new Wool( wool ) ); + corpse.AddCarvedItem( new Wool( wool ), from ); from.SendLocalizedMessage( 500483 ); // You shear it, and the wool is now on the corpse. } if ( meat != 0 ) { if ( MeatType == MeatType.Ribs ) - corpse.DropItem( new RawRibs( meat ) ); + corpse.AddCarvedItem( new RawRibs( meat ), from ); else if ( MeatType == MeatType.Bird ) - corpse.DropItem( new RawBird( meat ) ); + corpse.AddCarvedItem( new RawBird( meat ), from ); else if ( MeatType == MeatType.LambLeg ) - corpse.DropItem( new RawLambLeg( meat ) ); + corpse.AddCarvedItem( new RawLambLeg( meat ), from ); from.SendLocalizedMessage( 500467 ); // You carve some meat, which remains on the corpse. } @@ -1428,20 +1428,20 @@ namespace Server.Mobiles switch ( sc ) { - case ScaleType.Red: corpse.DropItem( new RedScales( scales ) ); break; - case ScaleType.Yellow: corpse.DropItem( new YellowScales( scales ) ); break; - case ScaleType.Black: corpse.DropItem( new BlackScales( scales ) ); break; - case ScaleType.Green: corpse.DropItem( new GreenScales( scales ) ); break; - case ScaleType.White: corpse.DropItem( new WhiteScales( scales ) ); break; - case ScaleType.Blue: corpse.DropItem( new BlueScales( scales ) ); break; + case ScaleType.Red: corpse.AddCarvedItem( new RedScales( scales ), from ); break; + case ScaleType.Yellow: corpse.AddCarvedItem( new YellowScales( scales ), from ); break; + case ScaleType.Black: corpse.AddCarvedItem( new BlackScales( scales ), from ); break; + case ScaleType.Green: corpse.AddCarvedItem( new GreenScales( scales ), from ); break; + case ScaleType.White: corpse.AddCarvedItem( new WhiteScales( scales ), from ); break; + case ScaleType.Blue: corpse.AddCarvedItem( new BlueScales( scales ), from ); break; case ScaleType.All: { - corpse.DropItem( new RedScales( scales ) ); - corpse.DropItem( new YellowScales( scales ) ); - corpse.DropItem( new BlackScales( scales ) ); - corpse.DropItem( new GreenScales( scales ) ); - corpse.DropItem( new WhiteScales( scales ) ); - corpse.DropItem( new BlueScales( scales ) ); + corpse.AddCarvedItem( new RedScales( scales ), from ); + corpse.AddCarvedItem( new YellowScales( scales ), from ); + corpse.AddCarvedItem( new BlackScales( scales ), from ); + corpse.AddCarvedItem( new GreenScales( scales ), from ); + corpse.AddCarvedItem( new WhiteScales( scales ), from ); + corpse.AddCarvedItem( new BlueScales( scales ), from ); break; } } @@ -2456,7 +2456,7 @@ namespace Server.Mobiles } set { - if ( m_ControlMaster == value ) + if ( m_ControlMaster == value || this == value ) return; RemoveFollowers(); @@ -2478,7 +2478,7 @@ namespace Server.Mobiles } set { - if ( m_SummonMaster == value ) + if ( m_SummonMaster == value || this == value ) return; RemoveFollowers(); @@ -4260,11 +4260,6 @@ namespace Server.Mobiles } public static List GetLootingRights( List damageEntries, int hitsMax ) - { - return GetLootingRights( damageEntries, hitsMax, false ); - } - - public static List GetLootingRights( List damageEntries, int hitsMax, bool partyAsIndividual ) { List rights = new List(); @@ -4960,6 +4955,7 @@ namespace Server.Mobiles { // *rummages through a corpse and takes an item* PublicOverheadMessage( MessageType.Emote, 0x3B2, 1008086 ); + //TODO: Instancing of Rummaged stuff. return true; } } diff --git a/Scripts/Mobiles/AI/Team/Team.cs b/Scripts/Mobiles/AI/Team/Team.cs deleted file mode 100644 index 61cb1b90c..000000000 --- a/Scripts/Mobiles/AI/Team/Team.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections; -using Server.Targeting; -using Server.Network; -/* - * NPC could use a team objets.. - * - * -List of members - * -List of ennemy teams - * -List of ally team - * -Team could be set automaticaly at mobile creation by the region system - * -Team could be the owner of a common timer instead of one by creature - * - * - * - */ - -namespace Server.Mobiles -{ - public class Team - { - //private ArrayList m_arAlly; - //private ArrayList m_arFoe; - - //private ArrayList m_arMember; - - public static void Initialize() - { - - } - } -} \ No newline at end of file diff --git a/Scripts/Mobiles/AI/Team/TeamRegistry.cs b/Scripts/Mobiles/AI/Team/TeamRegistry.cs deleted file mode 100644 index 3b74f4ab0..000000000 --- a/Scripts/Mobiles/AI/Team/TeamRegistry.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System; -using System.Collections; -using Server.Targeting; -using Server.Network; -/* - * NPC could use a faction objets.. - * - * -List of members - * -List of ennemy factions - * -List of neutral factions - * -List of ally faction - * -Team could be set automaticaly at mobile creation by the region system - * -Team could be the owner of a common timer instead of one by creature - * - * - * - */ - -namespace Server.Mobiles -{ - public class TeamRegistry - { - //private ArrayList m_arTeam; - - public static void Initialize() - { - } - } -} \ No newline at end of file diff --git a/Scripts/Mobiles/Healers/BaseHealer.cs b/Scripts/Mobiles/Healers/BaseHealer.cs index 44292cc4c..54cae0520 100644 --- a/Scripts/Mobiles/Healers/BaseHealer.cs +++ b/Scripts/Mobiles/Healers/BaseHealer.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Misc; using Server.Items; @@ -9,8 +9,8 @@ namespace Server.Mobiles { public abstract class BaseHealer : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override bool IsActiveVendor{ get{ return false; } } public override bool IsInvulnerable{ get{ return false; } } diff --git a/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/InterredGrizzle .cs b/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/InterredGrizzle .cs index 459020c23..300d0c4b1 100644 --- a/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/InterredGrizzle .cs +++ b/Scripts/Mobiles/Monsters/ML/Humanoid/Magic/InterredGrizzle .cs @@ -108,20 +108,5 @@ namespace Server.Mobiles base.Deserialize( reader ); int version = reader.ReadInt(); } - - private class InternalTimer : Timer - { - private Mobile m_From; - private Mobile m_Mobile; - private int m_Count; - - public InternalTimer( Mobile from, Mobile m ) : base( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 1.0 ) ) - { - m_From = from; - m_Mobile = m; - Priority = TimerPriority.TwoFiftyMS; - } - - } } } diff --git a/Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs b/Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs index feaa0ebcd..2b738888d 100644 --- a/Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs +++ b/Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs @@ -25,7 +25,7 @@ namespace Server.Mobiles { Name = "an energy vortex"; - if( Core.SE && 0.02 > Utility.RandomDouble() ) // Tested on OSI, but is this right? Who knows. + if( Core.SE && 0.002 > Utility.RandomDouble() ) // Per OSI FoF, it's a 1/500 chance. { // Llama vortex! Body = 0xDC; diff --git a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs index 13fbd8457..d49e481dd 100644 --- a/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs +++ b/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs @@ -229,7 +229,10 @@ namespace Server.Mobiles private void IncreaseHits( int hp ) { - int maxhits = (int)(2000 * (IsParagon ? Paragon.HitsBuff : 1)); + int maxhits = 2000; + + if ( this.IsParagon ) + maxhits = (int)(maxhits * Paragon.HitsBuff); if( hp < 1000 && !Core.AOS ) hp = (hp * 100) / 60; @@ -237,7 +240,10 @@ namespace Server.Mobiles if( HitsMaxSeed >= maxhits ) { HitsMaxSeed = maxhits; - Hits += hp + Utility.RandomMinMax( 10, 20 ); // increase the hp until it hits if it goes over it'll max at 2000 + + int newHits = this.Hits + hp + Utility.RandomMinMax( 10, 20 ); // increase the hp until it hits if it goes over it'll max at 2000 + + this.Hits = Math.Min( maxhits, newHits ); // Also provide heal for each devour on top of the hp increase } else diff --git a/Scripts/Mobiles/PlayerMobile.cs b/Scripts/Mobiles/PlayerMobile.cs index da2a7f5a1..0827cd0f7 100644 --- a/Scripts/Mobiles/PlayerMobile.cs +++ b/Scripts/Mobiles/PlayerMobile.cs @@ -31,25 +31,21 @@ namespace Server.Mobiles [Flags] public enum PlayerFlag // First 16 bits are reserved for default-distro use, start custom flags at 0x00010000 { - None = 0x00000000, + None = 0x00000000, Glassblowing = 0x00000001, - Masonry = 0x00000002, - SandMining = 0x00000004, - StoneMining = 0x00000008, + Masonry = 0x00000002, + SandMining = 0x00000004, + StoneMining = 0x00000008, ToggleMiningStone = 0x00000010, - KarmaLocked = 0x00000020, + KarmaLocked = 0x00000020, AutoRenewInsurance = 0x00000040, UseOwnFilter = 0x00000080, PublicMyRunUO = 0x00000100, PagingSquelched = 0x00000200, - Young = 0x00000400, + Young = 0x00000400, AcceptGuildInvites = 0x00000800, - DisplayChampionTitle = 0x00001000, - HasStatReward = 0x00002000, - - #region Scroll of Alacrity - AcceleratedSkill = 0x00080000, - #endregion + DisplayChampionTitle = 0x00001000, + HasStatReward = 0x00002000 } public enum NpcGuild diff --git a/Scripts/Mobiles/Townfolk/Banker.cs b/Scripts/Mobiles/Townfolk/Banker.cs index b73337f3d..8130aecb5 100644 --- a/Scripts/Mobiles/Townfolk/Banker.cs +++ b/Scripts/Mobiles/Townfolk/Banker.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using Server.Items; using Server.ContextMenus; @@ -10,8 +9,8 @@ namespace Server.Mobiles { public class Banker : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.MerchantsGuild; } } @@ -250,14 +249,8 @@ namespace Server.Mobiles { int amount; - try - { - amount = Convert.ToInt32( split[1] ); - } - catch - { - break; - } + if ( !int.TryParse( split[1], out amount ) ) + break; if ( amount > 5000 ) { @@ -331,14 +324,8 @@ namespace Server.Mobiles { int amount; - try - { - amount = Convert.ToInt32( split[1] ); - } - catch - { - break; - } + if ( !int.TryParse( split[1], out amount ) ) + break; if ( amount < 5000 ) { diff --git a/Scripts/Mobiles/Vendors/BaseVendor.cs b/Scripts/Mobiles/Vendors/BaseVendor.cs index 83bfed8be..53e04149b 100644 --- a/Scripts/Mobiles/Vendors/BaseVendor.cs +++ b/Scripts/Mobiles/Vendors/BaseVendor.cs @@ -25,7 +25,7 @@ namespace Server.Mobiles { private const int MaxSell = 500; - protected abstract ArrayList SBInfos { get; } + protected abstract List SBInfos { get; } private ArrayList m_ArmorBuyInfo = new ArrayList(); private ArrayList m_ArmorSellInfo = new ArrayList(); @@ -547,11 +547,11 @@ namespace Server.Mobiles UpdateBuyInfo(); int count = 0; - ArrayList list; + List list; IBuyItemInfo[] buyInfo = this.GetBuyInfo(); IShopSellInfo[] sellInfo = this.GetSellInfo(); - list = new ArrayList( buyInfo.Length ); + list = new List( buyInfo.Length ); Container cont = this.BuyPack; List opls = null; @@ -798,7 +798,7 @@ namespace Server.Mobiles return null; } - private void ProcessSinglePurchase( BuyItemResponse buy, IBuyItemInfo bii, ArrayList validBuy, ref int controlSlots, ref bool fullPurchase, ref int totalCost ) + private void ProcessSinglePurchase( BuyItemResponse buy, IBuyItemInfo bii, List validBuy, ref int controlSlots, ref bool fullPurchase, ref int totalCost ) { int amount = buy.Amount; @@ -895,7 +895,7 @@ namespace Server.Mobiles } } - public virtual bool OnBuyItems( Mobile buyer, ArrayList list ) + public virtual bool OnBuyItems( Mobile buyer, List list ) { if ( !IsActiveSeller ) return false; @@ -914,7 +914,7 @@ namespace Server.Mobiles IBuyItemInfo[] buyInfo = this.GetBuyInfo(); IShopSellInfo[] info = GetSellInfo(); int totalCost = 0; - ArrayList validBuy = new ArrayList( list.Count ); + List validBuy = new List( list.Count ); Container cont; bool bought = false; bool fromBank = false; @@ -1125,7 +1125,7 @@ namespace Server.Mobiles return true; } - public virtual bool OnSellItems( Mobile seller, ArrayList list ) + public virtual bool OnSellItems( Mobile seller, List list ) { if ( !IsActiveBuyer ) return false; @@ -1146,8 +1146,6 @@ namespace Server.Mobiles int GiveGold = 0; int Sold = 0; Container cont; - ArrayList delete = new ArrayList(); - ArrayList drop = new ArrayList(); foreach ( SellItemResponse resp in list ) { @@ -1277,12 +1275,12 @@ namespace Server.Mobiles writer.Write( (int)1 ); // version - ArrayList sbInfos = this.SBInfos; + List sbInfos = this.SBInfos; for ( int i = 0; sbInfos != null && i < sbInfos.Count; ++i ) { - SBInfo sbInfo = (SBInfo)sbInfos[i]; - ArrayList buyInfo = sbInfo.BuyInfo; + SBInfo sbInfo = sbInfos[i]; + List buyInfo = sbInfo.BuyInfo; for ( int j = 0; buyInfo != null && j < buyInfo.Count; ++j ) { @@ -1320,7 +1318,7 @@ namespace Server.Mobiles LoadSBInfo(); - ArrayList sbInfos = this.SBInfos; + List sbInfos = this.SBInfos; switch ( version ) { @@ -1340,8 +1338,8 @@ namespace Server.Mobiles if ( sbInfoIndex >= 0 && sbInfoIndex < sbInfos.Count ) { - SBInfo sbInfo = (SBInfo)sbInfos[sbInfoIndex]; - ArrayList buyInfo = sbInfo.BuyInfo; + SBInfo sbInfo = sbInfos[sbInfoIndex]; + List buyInfo = sbInfo.BuyInfo; if ( buyInfo != null && buyInfoIndex >= 0 && buyInfoIndex < buyInfo.Count ) { diff --git a/Scripts/Mobiles/Vendors/NPC/Alchemist.cs b/Scripts/Mobiles/Vendors/NPC/Alchemist.cs index 373f3a1aa..6c8238837 100644 --- a/Scripts/Mobiles/Vendors/NPC/Alchemist.cs +++ b/Scripts/Mobiles/Vendors/NPC/Alchemist.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Alchemist : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs b/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs index 8be74a837..dc294acd4 100644 --- a/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs +++ b/Scripts/Mobiles/Vendors/NPC/AnimalTrainer.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using Server; using Server.ContextMenus; @@ -12,8 +11,8 @@ namespace Server.Mobiles { public class AnimalTrainer : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public AnimalTrainer() : base( "the animal trainer" ) @@ -217,19 +216,10 @@ namespace Server.Mobiles if ( pet == null || pet.Deleted || from.Map != this.Map || !from.InRange( this, 14 ) || !from.Stabled.Contains( pet ) || !from.CheckAlive() ) return; - if ( (from.Followers + pet.ControlSlots) <= from.FollowersMax ) + if ( CanClaim( from, pet ) ) { - pet.SetControlMaster( from ); + DoClaim( from, pet ); - if ( pet.Summoned ) - pet.SummonMaster = from; - - pet.ControlTarget = from; - pet.ControlOrder = OrderType.Follow; - - pet.MoveToWorld( from.Location, from.Map ); - - pet.IsStabled = false; from.Stabled.Remove( pet ); SayTo( from, 1042559 ); // Here you go... and good day to you! @@ -322,7 +312,12 @@ namespace Server.Mobiles } } - public void Claim( Mobile from ) + public void Claim( Mobile from ) + { + Claim( from, null ); + } + + public void Claim( Mobile from, string petName ) { if ( Deleted || !from.CheckAlive() ) return; @@ -344,22 +339,9 @@ namespace Server.Mobiles ++stabled; - if ( (from.Followers + pet.ControlSlots) <= from.FollowersMax ) + if ( CanClaim( from, pet ) ) { - pet.SetControlMaster( from ); - - if ( pet.Summoned ) - pet.SummonMaster = from; - - pet.ControlTarget = from; - pet.ControlOrder = OrderType.Follow; - - pet.MoveToWorld( from.Location, from.Map ); - - pet.IsStabled = false; - - if ( Core.SE ) - pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully Happy + DoClaim( from, pet ); from.Stabled.RemoveAt( i ); --i; @@ -378,6 +360,29 @@ namespace Server.Mobiles SayTo( from, 502671 ); // But I have no animals stabled with me at the moment! } + public bool CanClaim( Mobile from, BaseCreature pet ) + { + return ((from.Followers + pet.ControlSlots) <= from.FollowersMax); + } + + private void DoClaim( Mobile from, BaseCreature pet ) + { + pet.SetControlMaster( from ); + + if ( pet.Summoned ) + pet.SummonMaster = from; + + pet.ControlTarget = from; + pet.ControlOrder = OrderType.Follow; + + pet.MoveToWorld( from.Location, from.Map ); + + pet.IsStabled = false; + + if ( Core.SE ) + pet.Loyalty = BaseCreature.MaxLoyalty; // Wonderfully Happy + } + public override bool HandlesOnSpeech( Mobile from ) { return true; @@ -394,10 +399,34 @@ namespace Server.Mobiles { e.Handled = true; - if ( !Insensitive.Equals( e.Speech, "claim" ) ) - BeginClaimList( e.Mobile ); - else - Claim( e.Mobile ); + if (!Insensitive.Equals( e.Speech, "claim" )) + { + bool showList = true; + + if ( e.Speech.Length > 6 ) //sanity + { + string name = e.Speech.Substring( 6 ).Trim(); + + for ( int i = 0; i < e.Mobile.Stabled.Count; ++i ) + { + if ( Insensitive.Equals( e.Mobile.Stabled[i].Name, name ) ) //Similar names? + { + showList = false; + break; + } + } + + //What about pets with the same name, or 'similar' names, ie Fluffy 1, Fluffy 2?? - Similar names don't work.. what about identicals? + //What if you try and claim a pet that doesn't exist? -- GUMP + } + + if ( showList ) + BeginClaimList( e.Mobile ); + } + else + { + Claim( e.Mobile ); + } } else { diff --git a/Scripts/Mobiles/Vendors/NPC/Architect.cs b/Scripts/Mobiles/Vendors/NPC/Architect.cs index cae03ed6d..2f52f7cac 100644 --- a/Scripts/Mobiles/Vendors/NPC/Architect.cs +++ b/Scripts/Mobiles/Vendors/NPC/Architect.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Architect : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/Armorer.cs b/Scripts/Mobiles/Vendors/NPC/Armorer.cs index 8f8648c61..70b325542 100644 --- a/Scripts/Mobiles/Vendors/NPC/Armorer.cs +++ b/Scripts/Mobiles/Vendors/NPC/Armorer.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Armorer : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Armorer() : base( "the armorer" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Baker.cs b/Scripts/Mobiles/Vendors/NPC/Baker.cs index 76d0af6ba..9362e8793 100644 --- a/Scripts/Mobiles/Vendors/NPC/Baker.cs +++ b/Scripts/Mobiles/Vendors/NPC/Baker.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Baker : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Baker() : base( "the baker" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Bard.cs b/Scripts/Mobiles/Vendors/NPC/Bard.cs index 6b9289df8..5d922d505 100644 --- a/Scripts/Mobiles/Vendors/NPC/Bard.cs +++ b/Scripts/Mobiles/Vendors/NPC/Bard.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Bard : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.BardsGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/Barkeeper.cs b/Scripts/Mobiles/Vendors/NPC/Barkeeper.cs index 03450a09f..7386ca632 100644 --- a/Scripts/Mobiles/Vendors/NPC/Barkeeper.cs +++ b/Scripts/Mobiles/Vendors/NPC/Barkeeper.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; using Server.Gumps; @@ -11,8 +11,8 @@ namespace Server.Mobiles { public class Barkeeper : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override void InitSBInfo() { diff --git a/Scripts/Mobiles/Vendors/NPC/Beekeeper.cs b/Scripts/Mobiles/Vendors/NPC/Beekeeper.cs index 81a2f875e..190ad90a1 100644 --- a/Scripts/Mobiles/Vendors/NPC/Beekeeper.cs +++ b/Scripts/Mobiles/Vendors/NPC/Beekeeper.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Beekeeper : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Beekeeper() : base( "the beekeeper" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Blacksmith.cs b/Scripts/Mobiles/Vendors/NPC/Blacksmith.cs index 81b844da0..7808094b2 100644 --- a/Scripts/Mobiles/Vendors/NPC/Blacksmith.cs +++ b/Scripts/Mobiles/Vendors/NPC/Blacksmith.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Engines.BulkOrders; @@ -7,8 +7,8 @@ namespace Server.Mobiles { public class Blacksmith : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.BlacksmithsGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/Bowyer.cs b/Scripts/Mobiles/Vendors/NPC/Bowyer.cs index 8ccfb89db..6897d178f 100644 --- a/Scripts/Mobiles/Vendors/NPC/Bowyer.cs +++ b/Scripts/Mobiles/Vendors/NPC/Bowyer.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles @@ -7,8 +7,8 @@ namespace Server.Mobiles [TypeAlias( "Server.Mobiles.Bower" )] public class Bowyer : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Bowyer() : base( "the bowyer" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Butcher.cs b/Scripts/Mobiles/Vendors/NPC/Butcher.cs index 38715195e..8cad58b2d 100644 --- a/Scripts/Mobiles/Vendors/NPC/Butcher.cs +++ b/Scripts/Mobiles/Vendors/NPC/Butcher.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Butcher : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Butcher() : base( "the butcher" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Carpenter.cs b/Scripts/Mobiles/Vendors/NPC/Carpenter.cs index c93ec2b09..99edc0e89 100644 --- a/Scripts/Mobiles/Vendors/NPC/Carpenter.cs +++ b/Scripts/Mobiles/Vendors/NPC/Carpenter.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Carpenter : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/Cobbler.cs b/Scripts/Mobiles/Vendors/NPC/Cobbler.cs index f95c08912..40a487c55 100644 --- a/Scripts/Mobiles/Vendors/NPC/Cobbler.cs +++ b/Scripts/Mobiles/Vendors/NPC/Cobbler.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Cobbler : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Cobbler() : base( "the cobbler" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Cook.cs b/Scripts/Mobiles/Vendors/NPC/Cook.cs index 586e53404..621ab3745 100644 --- a/Scripts/Mobiles/Vendors/NPC/Cook.cs +++ b/Scripts/Mobiles/Vendors/NPC/Cook.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Cook : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Cook() : base( "the cook" ) diff --git a/Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs b/Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs index f75fd0cea..6d9fd8fa0 100644 --- a/Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs +++ b/Scripts/Mobiles/Vendors/NPC/CustomHairstylist.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; using Server.Gumps; @@ -9,15 +10,15 @@ namespace Server.Mobiles { public class CustomHairstylist : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override bool ClickTitle{ get{ return false; } } public override bool IsActiveBuyer{ get{ return false; } } public override bool IsActiveSeller{ get{ return true; } } - public override bool OnBuyItems( Mobile buyer, ArrayList list ) + public override bool OnBuyItems( Mobile buyer, List list ) { return false; } diff --git a/Scripts/Mobiles/Vendors/NPC/Farmer.cs b/Scripts/Mobiles/Vendors/NPC/Farmer.cs index e72bb25be..3d4bc1876 100644 --- a/Scripts/Mobiles/Vendors/NPC/Farmer.cs +++ b/Scripts/Mobiles/Vendors/NPC/Farmer.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Farmer : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Farmer() : base( "the farmer" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Fisherman.cs b/Scripts/Mobiles/Vendors/NPC/Fisherman.cs index ddfb0d1a8..1c8a6b631 100644 --- a/Scripts/Mobiles/Vendors/NPC/Fisherman.cs +++ b/Scripts/Mobiles/Vendors/NPC/Fisherman.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Fisherman : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.FishermensGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/Furtrader.cs b/Scripts/Mobiles/Vendors/NPC/Furtrader.cs index a7b524747..b1a153a73 100644 --- a/Scripts/Mobiles/Vendors/NPC/Furtrader.cs +++ b/Scripts/Mobiles/Vendors/NPC/Furtrader.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Furtrader : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Furtrader() : base( "the furtrader" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Glassblower.cs b/Scripts/Mobiles/Vendors/NPC/Glassblower.cs index 940ac1629..7b7338010 100644 --- a/Scripts/Mobiles/Vendors/NPC/Glassblower.cs +++ b/Scripts/Mobiles/Vendors/NPC/Glassblower.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles @@ -7,8 +7,8 @@ namespace Server.Mobiles [TypeAlias( "Server.Mobiles.GargoyleAlchemist" )] public class Glassblower : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs b/Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs index fe7706960..7891a2aeb 100644 --- a/Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs +++ b/Scripts/Mobiles/Vendors/NPC/GolemCrafter.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; @@ -7,8 +7,8 @@ namespace Server.Mobiles { public class GolemCrafter : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public GolemCrafter() : base( "the golem crafter" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Guildmasters/BaseGuildmaster.cs b/Scripts/Mobiles/Vendors/NPC/Guildmasters/BaseGuildmaster.cs index 76a2973a1..f4c9c3bd0 100644 --- a/Scripts/Mobiles/Vendors/NPC/Guildmasters/BaseGuildmaster.cs +++ b/Scripts/Mobiles/Vendors/NPC/Guildmasters/BaseGuildmaster.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; using Server.Network; @@ -8,8 +8,8 @@ namespace Server.Mobiles { public abstract class BaseGuildmaster : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override bool IsActiveVendor{ get{ return false; } } diff --git a/Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs b/Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs index bfe2a1180..c6a60080c 100644 --- a/Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs +++ b/Scripts/Mobiles/Vendors/NPC/GypsyMaiden.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Gumps; using Server.Items; @@ -11,8 +11,8 @@ namespace Server.Mobiles { public class GypsyMaiden : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public GypsyMaiden() : base( "the gypsy maiden" ) diff --git a/Scripts/Mobiles/Vendors/NPC/HairStylist.cs b/Scripts/Mobiles/Vendors/NPC/HairStylist.cs index 726c619dd..2e8bbfc7a 100644 --- a/Scripts/Mobiles/Vendors/NPC/HairStylist.cs +++ b/Scripts/Mobiles/Vendors/NPC/HairStylist.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class HairStylist : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public HairStylist() : base( "the hair stylist" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Herbalist.cs b/Scripts/Mobiles/Vendors/NPC/Herbalist.cs index 7213b0310..030b13a7e 100644 --- a/Scripts/Mobiles/Vendors/NPC/Herbalist.cs +++ b/Scripts/Mobiles/Vendors/NPC/Herbalist.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Herbalist : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/HolyMage.cs b/Scripts/Mobiles/Vendors/NPC/HolyMage.cs index 278118c48..c3dcedf01 100644 --- a/Scripts/Mobiles/Vendors/NPC/HolyMage.cs +++ b/Scripts/Mobiles/Vendors/NPC/HolyMage.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; @@ -7,8 +7,8 @@ namespace Server.Mobiles { public class HolyMage : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public HolyMage() : base( "the Holy Mage" ) diff --git a/Scripts/Mobiles/Vendors/NPC/InnKeeper.cs b/Scripts/Mobiles/Vendors/NPC/InnKeeper.cs index 31c66556d..39d731bf8 100644 --- a/Scripts/Mobiles/Vendors/NPC/InnKeeper.cs +++ b/Scripts/Mobiles/Vendors/NPC/InnKeeper.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class InnKeeper : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public InnKeeper() : base( "the innkeeper" ) diff --git a/Scripts/Mobiles/Vendors/NPC/IronWorker.cs b/Scripts/Mobiles/Vendors/NPC/IronWorker.cs index 43c7724c7..b75a65cd4 100644 --- a/Scripts/Mobiles/Vendors/NPC/IronWorker.cs +++ b/Scripts/Mobiles/Vendors/NPC/IronWorker.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; @@ -7,8 +7,8 @@ namespace Server.Mobiles { public class IronWorker : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public IronWorker() : base( "the iron worker" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Jeweler.cs b/Scripts/Mobiles/Vendors/NPC/Jeweler.cs index 4a1668998..a4fbd33e5 100644 --- a/Scripts/Mobiles/Vendors/NPC/Jeweler.cs +++ b/Scripts/Mobiles/Vendors/NPC/Jeweler.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Jeweler : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Jeweler() : base( "the jeweler" ) diff --git a/Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs b/Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs index ffcf608c0..20e96a43e 100644 --- a/Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs +++ b/Scripts/Mobiles/Vendors/NPC/KeeperOfChivalry.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; @@ -7,8 +7,8 @@ namespace Server.Mobiles { public class KeeperOfChivalry : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public KeeperOfChivalry() : base( "the Keeper of Chivalry" ) diff --git a/Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs b/Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs index 313268cfc..638f4ad0c 100644 --- a/Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs +++ b/Scripts/Mobiles/Vendors/NPC/LeatherWorker.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class LeatherWorker : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public LeatherWorker() : base( "the leather worker" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Mage.cs b/Scripts/Mobiles/Vendors/NPC/Mage.cs index 761f9dcb5..71dbb0c42 100644 --- a/Scripts/Mobiles/Vendors/NPC/Mage.cs +++ b/Scripts/Mobiles/Vendors/NPC/Mage.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Mage : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/Mapmaker.cs b/Scripts/Mobiles/Vendors/NPC/Mapmaker.cs index 7c86d763e..74217bc92 100644 --- a/Scripts/Mobiles/Vendors/NPC/Mapmaker.cs +++ b/Scripts/Mobiles/Vendors/NPC/Mapmaker.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Mapmaker : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Mapmaker() : base( "the mapmaker" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Miller.cs b/Scripts/Mobiles/Vendors/NPC/Miller.cs index 596778e01..6809814e5 100644 --- a/Scripts/Mobiles/Vendors/NPC/Miller.cs +++ b/Scripts/Mobiles/Vendors/NPC/Miller.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Miller : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Miller() : base( "the miller" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Miner.cs b/Scripts/Mobiles/Vendors/NPC/Miner.cs index a8fa81aad..ed6f4539a 100644 --- a/Scripts/Mobiles/Vendors/NPC/Miner.cs +++ b/Scripts/Mobiles/Vendors/NPC/Miner.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Miner : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Miner() : base( "the miner" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Monk.cs b/Scripts/Mobiles/Vendors/NPC/Monk.cs index 3ebc20a94..9cd29aefb 100644 --- a/Scripts/Mobiles/Vendors/NPC/Monk.cs +++ b/Scripts/Mobiles/Vendors/NPC/Monk.cs @@ -1,6 +1,6 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; @@ -8,8 +8,8 @@ namespace Server.Mobiles { public class Monk : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Monk() : base( "the Monk" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Provisioner.cs b/Scripts/Mobiles/Vendors/NPC/Provisioner.cs index dbece4d45..0a5e4a654 100644 --- a/Scripts/Mobiles/Vendors/NPC/Provisioner.cs +++ b/Scripts/Mobiles/Vendors/NPC/Provisioner.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Provisioner : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Provisioner() : base( "the provisioner" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Rancher.cs b/Scripts/Mobiles/Vendors/NPC/Rancher.cs index 7a3748ccd..6dd0d53d1 100644 --- a/Scripts/Mobiles/Vendors/NPC/Rancher.cs +++ b/Scripts/Mobiles/Vendors/NPC/Rancher.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Gumps; using Server.Items; @@ -11,8 +11,8 @@ namespace Server.Mobiles { public class Rancher : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Rancher() : base( "the rancher" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Ranger.cs b/Scripts/Mobiles/Vendors/NPC/Ranger.cs index bedf15ae2..0ef66b477 100644 --- a/Scripts/Mobiles/Vendors/NPC/Ranger.cs +++ b/Scripts/Mobiles/Vendors/NPC/Ranger.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Ranger : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Ranger() : base( "the ranger" ) diff --git a/Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs b/Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs index 2dae8b25c..53a7d3c3e 100644 --- a/Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs +++ b/Scripts/Mobiles/Vendors/NPC/RealEstateBroker.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; using Server.Multis; @@ -11,8 +11,8 @@ namespace Server.Mobiles { public class RealEstateBroker : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public RealEstateBroker() : base( "the real estate broker" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Scribe.cs b/Scripts/Mobiles/Vendors/NPC/Scribe.cs index 903b131ec..4745af5f7 100644 --- a/Scripts/Mobiles/Vendors/NPC/Scribe.cs +++ b/Scripts/Mobiles/Vendors/NPC/Scribe.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Scribe : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.MagesGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/Shipwright.cs b/Scripts/Mobiles/Vendors/NPC/Shipwright.cs index eacdc7ac5..7ca900562 100644 --- a/Scripts/Mobiles/Vendors/NPC/Shipwright.cs +++ b/Scripts/Mobiles/Vendors/NPC/Shipwright.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Shipwright : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Shipwright() : base( "the shipwright" ) diff --git a/Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs b/Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs index 09bea2b0e..34121b651 100644 --- a/Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs +++ b/Scripts/Mobiles/Vendors/NPC/StoneCrafter.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles @@ -7,8 +7,8 @@ namespace Server.Mobiles [TypeAlias( "Server.Mobiles.GargoyleStonecrafter" )] public class StoneCrafter : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/Tailor.cs b/Scripts/Mobiles/Vendors/NPC/Tailor.cs index 99b05aacb..407d9dc3f 100644 --- a/Scripts/Mobiles/Vendors/NPC/Tailor.cs +++ b/Scripts/Mobiles/Vendors/NPC/Tailor.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Engines.BulkOrders; @@ -7,8 +7,8 @@ namespace Server.Mobiles { public class Tailor : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.TailorsGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/Tanner.cs b/Scripts/Mobiles/Vendors/NPC/Tanner.cs index 6efcca6cb..b5831533d 100644 --- a/Scripts/Mobiles/Vendors/NPC/Tanner.cs +++ b/Scripts/Mobiles/Vendors/NPC/Tanner.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Tanner : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Tanner() : base( "the tanner" ) diff --git a/Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs b/Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs index 92d17f04b..a94bf4b85 100644 --- a/Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs +++ b/Scripts/Mobiles/Vendors/NPC/TavernKeeper.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class TavernKeeper : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public TavernKeeper() : base( "the tavern keeper" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Thief.cs b/Scripts/Mobiles/Vendors/NPC/Thief.cs index cc57fb5bf..215742625 100644 --- a/Scripts/Mobiles/Vendors/NPC/Thief.cs +++ b/Scripts/Mobiles/Vendors/NPC/Thief.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Thief : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Thief() : base( "the thief" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Tinker.cs b/Scripts/Mobiles/Vendors/NPC/Tinker.cs index 6d9d8b7a8..e0eafffb7 100644 --- a/Scripts/Mobiles/Vendors/NPC/Tinker.cs +++ b/Scripts/Mobiles/Vendors/NPC/Tinker.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Tinker : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.TinkersGuild; } } diff --git a/Scripts/Mobiles/Vendors/NPC/Vagabond.cs b/Scripts/Mobiles/Vendors/NPC/Vagabond.cs index 8f485445f..80b94cb65 100644 --- a/Scripts/Mobiles/Vendors/NPC/Vagabond.cs +++ b/Scripts/Mobiles/Vendors/NPC/Vagabond.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; @@ -7,8 +7,8 @@ namespace Server.Mobiles { public class Vagabond : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Vagabond() : base( "the vagabond" ) diff --git a/Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs b/Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs index 717589f70..b487eb4d8 100644 --- a/Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs +++ b/Scripts/Mobiles/Vendors/NPC/VarietyDealer.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class VarietyDealer : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public VarietyDealer() : base( "the variety dealer" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Veterinarian.cs b/Scripts/Mobiles/Vendors/NPC/Veterinarian.cs index 8fb2157a8..2b5e603bb 100644 --- a/Scripts/Mobiles/Vendors/NPC/Veterinarian.cs +++ b/Scripts/Mobiles/Vendors/NPC/Veterinarian.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Gumps; using Server.Items; @@ -11,8 +11,8 @@ namespace Server.Mobiles { public class Veterinarian : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Veterinarian() : base( "the vet" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Waiter.cs b/Scripts/Mobiles/Vendors/NPC/Waiter.cs index 99ff46cbb..f4bb3d7d0 100644 --- a/Scripts/Mobiles/Vendors/NPC/Waiter.cs +++ b/Scripts/Mobiles/Vendors/NPC/Waiter.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; namespace Server.Mobiles { public class Waiter : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Waiter() : base( "the waiter" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs b/Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs index 6f1ae0a09..fca112183 100644 --- a/Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs +++ b/Scripts/Mobiles/Vendors/NPC/Weaponsmith.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Engines.BulkOrders; @@ -7,8 +7,8 @@ namespace Server.Mobiles { public class Weaponsmith : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } [Constructable] public Weaponsmith() : base( "the weaponsmith" ) diff --git a/Scripts/Mobiles/Vendors/NPC/Weaver.cs b/Scripts/Mobiles/Vendors/NPC/Weaver.cs index 68596a089..95de05c98 100644 --- a/Scripts/Mobiles/Vendors/NPC/Weaver.cs +++ b/Scripts/Mobiles/Vendors/NPC/Weaver.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server; using Server.Engines.BulkOrders; @@ -7,8 +7,8 @@ namespace Server.Mobiles { public class Weaver : BaseVendor { - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override NpcGuild NpcGuild{ get{ return NpcGuild.TailorsGuild; } } diff --git a/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs b/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs index 26d6ccae9..c8cb86d4e 100644 --- a/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs +++ b/Scripts/Mobiles/Vendors/PlayerBarkeeper.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using Server; using Server.Items; @@ -486,8 +485,8 @@ namespace Server.Mobiles } } - private ArrayList m_SBInfos = new ArrayList(); - protected override ArrayList SBInfos{ get { return m_SBInfos; } } + private List m_SBInfos = new List(); + protected override List SBInfos{ get { return m_SBInfos; } } public override void InitSBInfo() { diff --git a/Scripts/Mobiles/Vendors/PlayerVendor.cs b/Scripts/Mobiles/Vendors/PlayerVendor.cs index c7b3aa015..d27c3dcf9 100644 --- a/Scripts/Mobiles/Vendors/PlayerVendor.cs +++ b/Scripts/Mobiles/Vendors/PlayerVendor.cs @@ -1468,20 +1468,18 @@ namespace Server.Mobiles int price; string description; - try - { - price = Convert.ToInt32( firstWord ); - - if ( sep >= 0 ) - description = text.Substring( sep + 1 ).Trim(); - else - description = ""; - } - catch - { - price = -1; - description = text.Trim(); - } + if ( int.TryParse( firstWord, out price ) ) + { + if ( sep >= 0 ) + description = text.Substring( sep + 1 ).Trim(); + else + description = ""; + } + else + { + price = -1; + description = text.Trim(); + } SetInfo( from, price, Utility.FixHtml( description ) ); } @@ -1561,14 +1559,9 @@ namespace Server.Mobiles text = text.Trim(); int amount; - try - { - amount = Convert.ToInt32( text ); - } - catch - { - amount = 0; - } + + if ( !int.TryParse( text, out amount ) ) + amount = 0; GiveGold( from, amount ); } diff --git a/Scripts/Mobiles/Vendors/RentedVendor.cs b/Scripts/Mobiles/Vendors/RentedVendor.cs index 0dc443787..6b72a6e34 100644 --- a/Scripts/Mobiles/Vendors/RentedVendor.cs +++ b/Scripts/Mobiles/Vendors/RentedVendor.cs @@ -318,14 +318,9 @@ namespace Server.Mobiles text = text.Trim(); int amount; - try - { - amount = Convert.ToInt32( text ); - } - catch - { - amount = -1; - } + + if ( !int.TryParse( text, out amount ) ) + amount = -1; Mobile owner = m_Vendor.Owner; if ( owner == null ) diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBChainmailArmor.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBChainmailArmor.cs index 2762d0e9e..dc84a65f4 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBChainmailArmor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBChainmailArmor.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBChainmailArmor: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBChainmailArmor() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBHelmetArmor.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBHelmetArmor.cs index cfa7247c1..3eb601e93 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBHelmetArmor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBHelmetArmor.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBHelmetArmor: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBHelmetArmor() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBLeatherArmor.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBLeatherArmor.cs index 77562a01f..8cadb5487 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBLeatherArmor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBLeatherArmor.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBLeatherArmor: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBLeatherArmor() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBMetalShields.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBMetalShields.cs index 9a2f4a070..cf043ef32 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBMetalShields.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBMetalShields.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBMetalShields : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBMetalShields() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBPlateArmor.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBPlateArmor.cs index 7b9dee0fa..158c2ea47 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBPlateArmor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBPlateArmor.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBPlateArmor: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBPlateArmor() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBRingmailArmor.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBRingmailArmor.cs index ed22bc20c..11a780eea 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBRingmailArmor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBRingmailArmor.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBRingmailArmor: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBRingmailArmor() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBStuddedArmor.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBStuddedArmor.cs index 2db40207b..2984cee67 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBStuddedArmor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBStuddedArmor.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBStuddedArmor: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBStuddedArmor() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBWoodenShields.cs b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBWoodenShields.cs index e9733eedf..2203753fc 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Armors/SBWoodenShields.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Armors/SBWoodenShields.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBWoodenShields: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBWoodenShields() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs b/Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs index 0f1240f94..58ac777b6 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBAlchemist.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBAlchemist : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBAlchemist() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs b/Scripts/Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs index 646d5318e..6beafe9a1 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBAnimalTrainer.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBAnimalTrainer : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBAnimalTrainer() @@ -15,9 +15,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBArchitect.cs b/Scripts/Mobiles/Vendors/SBInfo/SBArchitect.cs index 0b3b59ac7..40f6eb15b 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBArchitect.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBArchitect.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBArchitect : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBArchitect() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs b/Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs index e0fd55548..271796a3c 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBBaker.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBBaker : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBBaker() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBBanker.cs b/Scripts/Mobiles/Vendors/SBInfo/SBBanker.cs index 078bd5f10..a9846af0e 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBBanker.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBBanker.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBBanker : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBBanker() @@ -15,9 +15,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBBard.cs b/Scripts/Mobiles/Vendors/SBInfo/SBBard.cs index 2d5c85ddd..a201db382 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBBard.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBBard.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBBard: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBBard() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBBarkeeper.cs b/Scripts/Mobiles/Vendors/SBInfo/SBBarkeeper.cs index 8263cc6fe..59a3346e7 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBBarkeeper.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBBarkeeper.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBBarkeeper : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBBarkeeper() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBBeekeeper.cs b/Scripts/Mobiles/Vendors/SBInfo/SBBeekeeper.cs index e9ab151cc..18ba5ef6f 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBBeekeeper.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBBeekeeper.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBBeekeeper : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBBeekeeper() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBBlacksmith.cs b/Scripts/Mobiles/Vendors/SBInfo/SBBlacksmith.cs index 2bfa474b6..11327d14b 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBBlacksmith.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBBlacksmith.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBBlacksmith : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBBlacksmith() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBBowyer.cs b/Scripts/Mobiles/Vendors/SBInfo/SBBowyer.cs index 8db3f8033..d5238e0e8 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBBowyer.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBBowyer.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBBowyer : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBBowyer() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs b/Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs index 210de81e9..37ba20b6d 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBButcher.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBButcher : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBButcher() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBCarpenter.cs b/Scripts/Mobiles/Vendors/SBInfo/SBCarpenter.cs index 79875c59a..92dcbd123 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBCarpenter.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBCarpenter.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBCarpenter: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBCarpenter() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBCobbler.cs b/Scripts/Mobiles/Vendors/SBInfo/SBCobbler.cs index cb8bbe86f..5b3d18f93 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBCobbler.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBCobbler.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBCobbler : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBCobbler() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBCook.cs b/Scripts/Mobiles/Vendors/SBInfo/SBCook.cs index 51be7e255..5de7e60a3 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBCook.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBCook.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBCook : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBCook() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBFarmer.cs b/Scripts/Mobiles/Vendors/SBInfo/SBFarmer.cs index a923809bf..af2fd7110 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBFarmer.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBFarmer.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBFarmer : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBFarmer() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBFisherman.cs b/Scripts/Mobiles/Vendors/SBInfo/SBFisherman.cs index e2e869596..3b6a1d282 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBFisherman.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBFisherman.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBFisherman : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBFisherman() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBFortuneTeller.cs b/Scripts/Mobiles/Vendors/SBInfo/SBFortuneTeller.cs index c353d089c..0e301c0e7 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBFortuneTeller.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBFortuneTeller.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBFortuneTeller : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBFortuneTeller() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBFurtrader.cs b/Scripts/Mobiles/Vendors/SBInfo/SBFurtrader.cs index 169c2dbdb..90c3575f8 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBFurtrader.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBFurtrader.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBFurtrader : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBFurtrader() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBGlassblower.cs b/Scripts/Mobiles/Vendors/SBInfo/SBGlassblower.cs index 5fce85aaa..9b515e8f1 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBGlassblower.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBGlassblower.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBGlassblower : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBGlassblower() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBHairStylist.cs b/Scripts/Mobiles/Vendors/SBInfo/SBHairStylist.cs index 2c0b51910..78647e0a3 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBHairStylist.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBHairStylist.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBHairStylist : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBHairStylist() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBHealer.cs b/Scripts/Mobiles/Vendors/SBInfo/SBHealer.cs index fd8b29e0b..95846de1a 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBHealer.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBHealer.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBHealer : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBHealer() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBHerbalist.cs b/Scripts/Mobiles/Vendors/SBInfo/SBHerbalist.cs index f9dc4e075..55565a7c8 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBHerbalist.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBHerbalist.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBHerbalist : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBHerbalist() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBHolyMage.cs b/Scripts/Mobiles/Vendors/SBInfo/SBHolyMage.cs index 95f75e4e3..a53bdc8d2 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBHolyMage.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBHolyMage.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBHolyMage : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBHolyMage() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBHouseDeed.cs b/Scripts/Mobiles/Vendors/SBInfo/SBHouseDeed.cs index 0a2ebbb3e..6be76159c 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBHouseDeed.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBHouseDeed.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Multis.Deeds; namespace Server.Mobiles { public class SBHouseDeed: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBHouseDeed() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBInfo.cs b/Scripts/Mobiles/Vendors/SBInfo/SBInfo.cs index 9c5252479..5987a5b14 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBInfo.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBInfo.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles @@ -11,6 +11,6 @@ namespace Server.Mobiles } public abstract IShopSellInfo SellInfo { get; } - public abstract ArrayList BuyInfo { get; } + public abstract List BuyInfo { get; } } } \ No newline at end of file diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBInnKeeper.cs b/Scripts/Mobiles/Vendors/SBInfo/SBInnKeeper.cs index cd1397ac3..0a4e5eaa0 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBInnKeeper.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBInnKeeper.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBInnKeeper : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBInnKeeper() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBJewel.cs b/Scripts/Mobiles/Vendors/SBInfo/SBJewel.cs index a34d44ba0..eaf773f41 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBJewel.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBJewel.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBJewel: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBJewel() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBKeeperOfChivalry.cs b/Scripts/Mobiles/Vendors/SBInfo/SBKeeperOfChivalry.cs index 0e31ba9d3..b534666a4 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBKeeperOfChivalry.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBKeeperOfChivalry.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBKeeperOfChivalry : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBKeeperOfChivalry() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBLeatherWorker.cs b/Scripts/Mobiles/Vendors/SBInfo/SBLeatherWorker.cs index 299bbdfdf..678a8155e 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBLeatherWorker.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBLeatherWorker.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBLeatherWorker: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBLeatherWorker() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBMage.cs b/Scripts/Mobiles/Vendors/SBInfo/SBMage.cs index a783d49c5..d3c762f7c 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBMage.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBMage.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBMage : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBMage() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBMapmaker.cs b/Scripts/Mobiles/Vendors/SBInfo/SBMapmaker.cs index 1e5083596..11dd195ce 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBMapmaker.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBMapmaker.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBMapmaker : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBMapmaker() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBMiller.cs b/Scripts/Mobiles/Vendors/SBInfo/SBMiller.cs index 6289993db..2a1376d47 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBMiller.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBMiller.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBMiller : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBMiller() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBMiner.cs b/Scripts/Mobiles/Vendors/SBInfo/SBMiner.cs index 7cfa6da98..2f9c47051 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBMiner.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBMiner.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBMiner: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBMiner() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBMonk.cs b/Scripts/Mobiles/Vendors/SBInfo/SBMonk.cs index 254dfd9f8..0b814092c 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBMonk.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBMonk.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBMonk : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBMonk() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBPlayerBarkeeper.cs b/Scripts/Mobiles/Vendors/SBInfo/SBPlayerBarkeeper.cs index cc5b3eb6d..4ddb8a9ac 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBPlayerBarkeeper.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBPlayerBarkeeper.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBPlayerBarkeeper : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBPlayerBarkeeper() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBProvisioner.cs b/Scripts/Mobiles/Vendors/SBInfo/SBProvisioner.cs index bc7230fb2..182816e65 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBProvisioner.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBProvisioner.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; using Server.Guilds; @@ -7,7 +7,7 @@ namespace Server.Mobiles { public class SBProvisioner : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBProvisioner() @@ -15,9 +15,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBRancher.cs b/Scripts/Mobiles/Vendors/SBInfo/SBRancher.cs index 266383568..81e29a98d 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBRancher.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBRancher.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBRancher : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBRancher() @@ -15,9 +15,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBRanger.cs b/Scripts/Mobiles/Vendors/SBInfo/SBRanger.cs index c9e86eec9..c522cb702 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBRanger.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBRanger.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBRanger : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBRanger() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBRealEstateBroker.cs b/Scripts/Mobiles/Vendors/SBInfo/SBRealEstateBroker.cs index 2dbbc5313..41949067a 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBRealEstateBroker.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBRealEstateBroker.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBRealEstateBroker : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBRealEstateBroker() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBSECook.cs b/Scripts/Mobiles/Vendors/SBInfo/SBSECook.cs index f695e89d2..8ac713072 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBSECook.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBSECook.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSECook: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSECook() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBSEHats.cs b/Scripts/Mobiles/Vendors/SBInfo/SBSEHats.cs index 51680a696..bb3865ab6 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBSEHats.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBSEHats.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSEHats: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSEHats() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBScribe.cs b/Scripts/Mobiles/Vendors/SBInfo/SBScribe.cs index 9e150468b..ebdbf80a0 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBScribe.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBScribe.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBScribe: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBScribe() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBShipwright.cs b/Scripts/Mobiles/Vendors/SBInfo/SBShipwright.cs index 653808d42..d796d8c8c 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBShipwright.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBShipwright.cs @@ -1,5 +1,5 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; using Server.Multis; @@ -7,7 +7,7 @@ namespace Server.Mobiles { public class SBShipwright : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBShipwright() @@ -15,9 +15,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBSmithTools.cs b/Scripts/Mobiles/Vendors/SBInfo/SBSmithTools.cs index b617a961f..94983c3b6 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBSmithTools.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBSmithTools.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSmithTools: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSmithTools() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBStoneCrafter.cs b/Scripts/Mobiles/Vendors/SBInfo/SBStoneCrafter.cs index e068c7ee6..e75fd36fe 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBStoneCrafter.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBStoneCrafter.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBStoneCrafter : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBStoneCrafter() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBTailor.cs b/Scripts/Mobiles/Vendors/SBInfo/SBTailor.cs index 97f9447c7..2c6c3271b 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBTailor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBTailor.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBTailor: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBTailor() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBTanner.cs b/Scripts/Mobiles/Vendors/SBInfo/SBTanner.cs index db931222a..e6b783516 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBTanner.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBTanner.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBTanner : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBTanner() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBTavernKeeper.cs b/Scripts/Mobiles/Vendors/SBInfo/SBTavernKeeper.cs index 957e7e9da..2bec75103 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBTavernKeeper.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBTavernKeeper.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBTavernKeeper : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBTavernKeeper() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBThief.cs b/Scripts/Mobiles/Vendors/SBInfo/SBThief.cs index 1436f93be..fc5ddd9e6 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBThief.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBThief.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBThief : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBThief() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBTinker.cs b/Scripts/Mobiles/Vendors/SBInfo/SBTinker.cs index c710f56c4..aa4c72df4 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBTinker.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBTinker.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBTinker: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBTinker() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBVagabond.cs b/Scripts/Mobiles/Vendors/SBInfo/SBVagabond.cs index a4686dd77..1b321f5df 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBVagabond.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBVagabond.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBVagabond : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBVagabond() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBVarietyDealer.cs b/Scripts/Mobiles/Vendors/SBInfo/SBVarietyDealer.cs index 994e8e1b3..57bc93301 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBVarietyDealer.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBVarietyDealer.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBVarietyDealer : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBVarietyDealer() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBVeterinarian.cs b/Scripts/Mobiles/Vendors/SBInfo/SBVeterinarian.cs index fd3632d08..a6db48236 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBVeterinarian.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBVeterinarian.cs @@ -1,13 +1,13 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBVeterinarian : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBVeterinarian() @@ -15,9 +15,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBWaiter.cs b/Scripts/Mobiles/Vendors/SBInfo/SBWaiter.cs index 7d2a1333b..cd403a911 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBWaiter.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBWaiter.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBWaiter : SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBWaiter() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBWeaponSmith.cs b/Scripts/Mobiles/Vendors/SBInfo/SBWeaponSmith.cs index 6649e248d..f1916c47e 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBWeaponSmith.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBWeaponSmith.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBWeaponSmith: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBWeaponSmith() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SBWeaver.cs b/Scripts/Mobiles/Vendors/SBInfo/SBWeaver.cs index c5026a87b..05602c370 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SBWeaver.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SBWeaver.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBWeaver: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBWeaver() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEArmor.cs b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEArmor.cs index efdaff96b..c09e582ba 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEArmor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEArmor.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSEArmor: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSEArmor() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEBowyer.cs b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEBowyer.cs index 598d733f0..d8faae89d 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEBowyer.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEBowyer.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSEBowyer: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSEBowyer() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSECarpenter.cs b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSECarpenter.cs index c4ee27529..e8bcc015e 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSECarpenter.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSECarpenter.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSECarpenter: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSECarpenter() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEFood.cs b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEFood.cs index 511755c24..1b4605afb 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEFood.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEFood.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSEFood: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSEFood() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSELeatherArmor.cs b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSELeatherArmor.cs index 1781fcced..276831a39 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSELeatherArmor.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSELeatherArmor.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSELeatherArmor: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSELeatherArmor() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEWeapons.cs b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEWeapons.cs index 9b362ba9c..7673f0f29 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEWeapons.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/SE/SBSEWeapons.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSEWeapons: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSEWeapons() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBAxeWeapon.cs b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBAxeWeapon.cs index d36594e0d..99e9e2bad 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBAxeWeapon.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBAxeWeapon.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBAxeWeapon: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBAxeWeapon() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBKnifeWeapon.cs b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBKnifeWeapon.cs index 222c0bd08..3c9acf588 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBKnifeWeapon.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBKnifeWeapon.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBKnifeWeapon: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBKnifeWeapon() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBMaceWeapon.cs b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBMaceWeapon.cs index 2c4a939f3..b9d633ef2 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBMaceWeapon.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBMaceWeapon.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBMaceWeapon: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBMaceWeapon() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBPoleArmWeapon.cs b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBPoleArmWeapon.cs index 3b9eb56a8..3a43e4c23 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBPoleArmWeapon.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBPoleArmWeapon.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBPoleArmWeapon: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBPoleArmWeapon() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBRangedWeapon.cs b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBRangedWeapon.cs index 24ba26d68..acb304ee2 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBRangedWeapon.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBRangedWeapon.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBRangedWeapon: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBRangedWeapon() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBSpearForkWeapon.cs b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBSpearForkWeapon.cs index 489bee905..11115f741 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBSpearForkWeapon.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBSpearForkWeapon.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSpearForkWeapon: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSpearForkWeapon() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBStavesWeapon.cs b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBStavesWeapon.cs index 3acc18ed0..c8a93542e 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBStavesWeapon.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBStavesWeapon.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBStavesWeapon: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBStavesWeapon() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBSwordWeapon.cs b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBSwordWeapon.cs index 3ffe9609d..c6646d37e 100644 --- a/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBSwordWeapon.cs +++ b/Scripts/Mobiles/Vendors/SBInfo/Weapons/SBSwordWeapon.cs @@ -1,12 +1,12 @@ using System; -using System.Collections; +using System.Collections.Generic; using Server.Items; namespace Server.Mobiles { public class SBSwordWeapon: SBInfo { - private ArrayList m_BuyInfo = new InternalBuyInfo(); + private List m_BuyInfo = new InternalBuyInfo(); private IShopSellInfo m_SellInfo = new InternalSellInfo(); public SBSwordWeapon() @@ -14,9 +14,9 @@ namespace Server.Mobiles } public override IShopSellInfo SellInfo { get { return m_SellInfo; } } - public override ArrayList BuyInfo { get { return m_BuyInfo; } } + public override List BuyInfo { get { return m_BuyInfo; } } - public class InternalBuyInfo : ArrayList + public class InternalBuyInfo : List { public InternalBuyInfo() { diff --git a/Scripts/Multis/BaseHouse.cs b/Scripts/Multis/BaseHouse.cs index 5c2d963b5..2b758143c 100644 --- a/Scripts/Multis/BaseHouse.cs +++ b/Scripts/Multis/BaseHouse.cs @@ -2213,7 +2213,7 @@ namespace Server.Multis { c.IsLockedDown = false; c.IsSecure = false; - m_Secures.Remove( c ); + m_Secures.Remove( info ); c.Destroy(); break; } diff --git a/Scripts/Multis/Boats/BaseBoat.cs b/Scripts/Multis/Boats/BaseBoat.cs index a6f3e19de..2b8920b4d 100644 --- a/Scripts/Multis/Boats/BaseBoat.cs +++ b/Scripts/Multis/Boats/BaseBoat.cs @@ -891,14 +891,8 @@ namespace Server.Multis { string sNumber = navPoint.Substring( start ); - try - { - number = Convert.ToInt32( sNumber ); - } - catch - { - number = -1; - } + if ( !int.TryParse( sNumber, out number ) ) + number = -1; if ( number != -1 ) { diff --git a/Scripts/Skills/Discordance.cs b/Scripts/Skills/Discordance.cs index 55059a3a1..9931bdfc2 100644 --- a/Scripts/Skills/Discordance.cs +++ b/Scripts/Skills/Discordance.cs @@ -138,6 +138,10 @@ namespace Server.SkillHandlers { from.SendLocalizedMessage( 1049535 ); // A song of discord would have no effect on that. } + else if ( m_Table.Contains( targ ) ) //Already discorded + { + from.SendLocalizedMessage( 1049537 );// Your target is already in discord. + } else if ( !targ.Player ) { TimeSpan len = TimeSpan.FromSeconds( from.Skills[SkillName.Discordance].Value * 2 ); @@ -155,67 +159,60 @@ namespace Server.SkillHandlers } else if ( from.CheckTargetSkill( SkillName.Discordance, target, diff-25.0, diff+25.0 ) ) { - if ( !m_Table.Contains( targ ) ) + from.SendLocalizedMessage( 1049539 ); // You play the song surpressing your targets strength + m_Instrument.PlayInstrumentWell( from ); + m_Instrument.ConsumeUse( from ); + + ArrayList mods = new ArrayList(); + int effect; + double scalar; + + if ( Core.AOS ) { - from.SendLocalizedMessage( 1049539 ); // You play the song surpressing your targets strength - m_Instrument.PlayInstrumentWell( from ); - m_Instrument.ConsumeUse( from ); + double discord = from.Skills[SkillName.Discordance].Value; - ArrayList mods = new ArrayList(); - int effect; - double scalar; - - if ( Core.AOS ) - { - double discord = from.Skills[SkillName.Discordance].Value; - - if ( discord > 100.0 ) - effect = -20 + (int)((discord - 100.0) / -2.5); - else - effect = (int)(discord / -5.0); - - if ( Core.SE && BaseInstrument.GetBaseDifficulty( targ ) >= 160.0 ) - effect /= 2; - - scalar = effect * 0.01; - - mods.Add( new ResistanceMod( ResistanceType.Physical, effect ) ); - mods.Add( new ResistanceMod( ResistanceType.Fire, effect ) ); - mods.Add( new ResistanceMod( ResistanceType.Cold, effect ) ); - mods.Add( new ResistanceMod( ResistanceType.Poison, effect ) ); - mods.Add( new ResistanceMod( ResistanceType.Energy, effect ) ); - - for ( int i = 0; i < targ.Skills.Length; ++i ) - { - if ( targ.Skills[i].Value > 0 ) - mods.Add( new DefaultSkillMod( (SkillName)i, true, targ.Skills[i].Value * scalar ) ); - } - } + if ( discord > 100.0 ) + effect = -20 + (int)((discord - 100.0) / -2.5); else + effect = (int)(discord / -5.0); + + if ( Core.SE && BaseInstrument.GetBaseDifficulty( targ ) >= 160.0 ) + effect /= 2; + + scalar = effect * 0.01; + + mods.Add( new ResistanceMod( ResistanceType.Physical, effect ) ); + mods.Add( new ResistanceMod( ResistanceType.Fire, effect ) ); + mods.Add( new ResistanceMod( ResistanceType.Cold, effect ) ); + mods.Add( new ResistanceMod( ResistanceType.Poison, effect ) ); + mods.Add( new ResistanceMod( ResistanceType.Energy, effect ) ); + + for ( int i = 0; i < targ.Skills.Length; ++i ) { - effect = (int)( from.Skills[SkillName.Discordance].Value / -5.0 ); - scalar = effect * 0.01; - - mods.Add( new StatMod( StatType.Str, "DiscordanceStr", (int)(targ.RawStr * scalar), TimeSpan.Zero ) ); - mods.Add( new StatMod( StatType.Int, "DiscordanceInt", (int)(targ.RawInt * scalar), TimeSpan.Zero ) ); - mods.Add( new StatMod( StatType.Dex, "DiscordanceDex", (int)(targ.RawDex * scalar), TimeSpan.Zero ) ); - - for ( int i = 0; i < targ.Skills.Length; ++i ) - { - if ( targ.Skills[i].Value > 0 ) - mods.Add( new DefaultSkillMod( (SkillName)i, true, targ.Skills[i].Value * scalar ) ); - } + if ( targ.Skills[i].Value > 0 ) + mods.Add( new DefaultSkillMod( (SkillName)i, true, targ.Skills[i].Value * scalar ) ); } - - DiscordanceInfo info = new DiscordanceInfo( from, targ, len, Math.Abs( effect ), mods ); - info.m_Timer = Timer.DelayCall( TimeSpan.Zero, TimeSpan.FromSeconds( 1.25 ), new TimerStateCallback( ProcessDiscordance ), info ); - - m_Table[targ] = info; } else { - from.SendLocalizedMessage( 1049537 );// Your target is already in discord. + effect = (int)( from.Skills[SkillName.Discordance].Value / -5.0 ); + scalar = effect * 0.01; + + mods.Add( new StatMod( StatType.Str, "DiscordanceStr", (int)(targ.RawStr * scalar), TimeSpan.Zero ) ); + mods.Add( new StatMod( StatType.Int, "DiscordanceInt", (int)(targ.RawInt * scalar), TimeSpan.Zero ) ); + mods.Add( new StatMod( StatType.Dex, "DiscordanceDex", (int)(targ.RawDex * scalar), TimeSpan.Zero ) ); + + for ( int i = 0; i < targ.Skills.Length; ++i ) + { + if ( targ.Skills[i].Value > 0 ) + mods.Add( new DefaultSkillMod( (SkillName)i, true, targ.Skills[i].Value * scalar ) ); + } } + + DiscordanceInfo info = new DiscordanceInfo( from, targ, len, Math.Abs( effect ), mods ); + info.m_Timer = Timer.DelayCall( TimeSpan.Zero, TimeSpan.FromSeconds( 1.25 ), new TimerStateCallback( ProcessDiscordance ), info ); + + m_Table[targ] = info; } else { diff --git a/Server/BaseVendor.cs b/Server/BaseVendor.cs index f843d5e13..e85e2a6ea 100644 --- a/Server/BaseVendor.cs +++ b/Server/BaseVendor.cs @@ -24,18 +24,19 @@ using Server.Items; using Server.Network; using Server.ContextMenus; using Server.Mobiles; +using System.Collections.Generic; namespace Server.Mobiles { - public class BuyItemStateComparer : IComparer + public class BuyItemStateComparer : IComparer { - public int Compare( object l, object r ) + public int Compare( BuyItemState l, BuyItemState r ) { if ( l == null && r == null ) return 0; if ( l == null ) return -1; if ( r == null ) return 1; - return ((BuyItemState)l).MySerial.CompareTo( ((BuyItemState)r).MySerial ); + return l.MySerial.CompareTo( r.MySerial ); } } diff --git a/Server/Interfaces.cs b/Server/Interfaces.cs index dccd3bbff..d6830b17d 100644 --- a/Server/Interfaces.cs +++ b/Server/Interfaces.cs @@ -19,7 +19,8 @@ ***************************************************************************/ using System; -using System.Collections; +using System.Collections.Generic; +using Server.Mobiles; namespace Server.Mobiles { @@ -39,8 +40,8 @@ namespace Server { public interface IVendor { - bool OnBuyItems( Mobile from, ArrayList list ); - bool OnSellItems( Mobile from, ArrayList list ); + bool OnBuyItems( Mobile from, List list ); + bool OnSellItems( Mobile from, List list ); DateTime LastRestock{ get; set; } TimeSpan RestockDelay{ get; } diff --git a/Server/Item.cs b/Server/Item.cs index b7a5a97d5..a63e6b6a7 100644 --- a/Server/Item.cs +++ b/Server/Item.cs @@ -1119,6 +1119,11 @@ namespace Server ((Mobile)m_Parent).GetChildNameProperties( list, item ); } + public virtual bool IsChildVisibleTo( Mobile m, Item child ) + { + return true; + } + public void Bounce( Mobile from ) { if ( m_Parent is Item ) diff --git a/Server/Items/Container.cs b/Server/Items/Container.cs index 358d51c2b..9459663ad 100644 --- a/Server/Items/Container.cs +++ b/Server/Items/Container.cs @@ -1620,46 +1620,7 @@ namespace Server.Items public virtual void DisplayTo( Mobile to ) { - if ( !IsPublicContainer ) - { - bool contains = false; - - if ( m_Openers != null ) - { - Point3D worldLoc = GetWorldLocation(); - Map map = this.Map; - - for ( int i = 0; i < m_Openers.Count; ++i ) - { - Mobile mob = m_Openers[i]; - - if ( mob == to ) - { - contains = true; - } - else - { - int range = GetUpdateRange( mob ); - - if ( mob.Map != map || !mob.InRange( worldLoc, range ) ) - m_Openers.RemoveAt( i-- ); - } - } - } - - if ( !contains ) - { - if ( m_Openers == null ) { - m_Openers = new List(); - } - - m_Openers.Add( to ); - } - else if ( m_Openers != null && m_Openers.Count == 0 ) - { - m_Openers = null; - } - } + ProcessOpeners( to ); to.Send( new ContainerDisplay( this ) ); @@ -1677,6 +1638,51 @@ namespace Server.Items } } + public void ProcessOpeners( Mobile opener ) + { + if ( !IsPublicContainer ) + { + bool contains = false; + + if ( m_Openers != null ) + { + Point3D worldLoc = GetWorldLocation(); + Map map = this.Map; + + for ( int i = 0; i < m_Openers.Count; ++i ) + { + Mobile mob = m_Openers[i]; + + if ( mob == opener ) + { + contains = true; + } + else + { + int range = GetUpdateRange( mob ); + + if ( mob.Map != map || !mob.InRange( worldLoc, range ) ) + m_Openers.RemoveAt( i-- ); + } + } + } + + if ( !contains ) + { + if ( m_Openers == null ) + { + m_Openers = new List(); + } + + m_Openers.Add( opener ); + } + else if ( m_Openers != null && m_Openers.Count == 0 ) + { + m_Openers = null; + } + } + } + public override void GetProperties( ObjectPropertyList list ) { base.GetProperties( list ); diff --git a/Server/Main.cs b/Server/Main.cs index 427b0f90d..0127ad8b8 100644 --- a/Server/Main.cs +++ b/Server/Main.cs @@ -32,12 +32,13 @@ using Server; using Server.Accounting; using Server.Gumps; using Server.Network; +using System.Runtime; namespace Server { public delegate void Slice(); - public class Core + public static class Core { private static bool m_Crashed; private static Thread timerThread; @@ -102,11 +103,13 @@ namespace Server internal static bool VBdotNet { get { return m_VBdotNET; } } public static List DataDirectories { get { return m_DataDirectories; } } public static Assembly Assembly { get { return m_Assembly; } set { m_Assembly = value; } } + public static Version Version { get { return m_Assembly.GetName().Version; } } public static Process Process { get { return m_Process; } } public static Thread Thread { get { return m_Thread; } } public static MultiTextWriter MultiConsoleOut { get { return m_MultiConOut; } } public static readonly bool Is64Bit = (IntPtr.Size == 8); + //TODO: Upon public release of .NET 4.0, use Environment.Is64BitOperatingSystem/Process private static bool m_MultiProcessor; private static int m_ProcessorCount; @@ -287,12 +290,12 @@ namespace Server private static bool m_Closing; public static bool Closing { get { return m_Closing; } } - private static uint m_CycleIndex; + private static long m_CycleIndex; private static float[] m_CyclesPerSecond = new float[100]; public static float CyclesPerSecond { - get { return m_CyclesPerSecond[((uint)(m_CycleIndex - 1)) % m_CyclesPerSecond.Length]; } + get { return m_CyclesPerSecond[(m_CycleIndex - 1) % m_CyclesPerSecond.Length]; } } public static float AverageCPS @@ -429,6 +432,9 @@ namespace Server SetConsoleCtrlHandler( m_ConsoleEventHandler, true ); } + if ( GCSettings.IsServerGC ) + Console.WriteLine("Core: Server garbage collection mode enabled"); + while( !ScriptCompiler.Compile( m_Debug, m_Cache ) ) { Console.WriteLine( "Scripts: One or more scripts failed to compile or no script files were found." ); @@ -467,7 +473,7 @@ namespace Server const int sampleInterval = 100; const float ticksPerSecond = (float)(TimeSpan.TicksPerSecond * sampleInterval); - int sample = 0; + long sample = 0; while( m_Signal.WaitOne() ) { @@ -620,6 +626,7 @@ namespace Server } catch { + Console.WriteLine( "Warning: Exception in serialization verification of type {0}", t ); } } } diff --git a/Server/Mobile.cs b/Server/Mobile.cs index 353cdfe45..c8210f01e 100644 --- a/Server/Mobile.cs +++ b/Server/Mobile.cs @@ -4378,7 +4378,7 @@ namespace Server item.Layer = oldItem.Layer; item.Name = oldItem.Name; item.Weight = oldItem.Weight; - //item.Amount = oldItem.amount; + item.Amount = oldItem.Amount - amount; item.Map = oldItem.Map; @@ -8060,8 +8060,10 @@ namespace Server { if( item.Parent is Item ) { - if( !CanSee( (Item)item.Parent ) ) - return false; + Item parent = item.Parent as Item; + + if ( !(CanSee( parent ) && parent.IsChildVisibleTo( this, item )) ) + return false; } else if( item.Parent is Mobile ) { diff --git a/Server/Network/PacketHandlers.cs b/Server/Network/PacketHandlers.cs index 31005b2df..73f40ca8e 100644 --- a/Server/Network/PacketHandlers.cs +++ b/Server/Network/PacketHandlers.cs @@ -400,7 +400,7 @@ namespace Server.Network if ( (msgSize / 7) > 100 ) return; - ArrayList buyList = new ArrayList( msgSize/7 ); + List buyList = new List( msgSize / 7 ); for ( ;msgSize>0;msgSize-=7) { byte layer = pvSrc.ReadByte(); @@ -442,7 +442,7 @@ namespace Server.Network int count = pvSrc.ReadUInt16(); if ( count < 100 && pvSrc.Size == (1+2+4+2+(count*6)) ) { - ArrayList sellList = new ArrayList( count ); + List sellList = new List( count ); for (int i=0;i list ) + : base( 0x3c ) { this.EnsureCapacity( list.Count*19 + 5 ); @@ -277,9 +278,9 @@ namespace Server.Network } } - public sealed class VendorBuyContent6017 : Packet + public sealed class VendorBuyContent6017 : Packet { - public VendorBuyContent6017( ArrayList list ) : base( 0x3c ) + public VendorBuyContent6017( List list ) : base( 0x3c ) { this.EnsureCapacity( list.Count*20 + 5 ); @@ -317,7 +318,8 @@ namespace Server.Network public sealed class VendorBuyList : Packet { - public VendorBuyList( Mobile vendor, ArrayList list ) : base( 0x74 ) + public VendorBuyList( Mobile vendor, List list ) + : base( 0x74 ) { this.EnsureCapacity( 256 ); @@ -328,7 +330,7 @@ namespace Server.Network for ( int i = 0; i < list.Count; ++i ) { - BuyItemState bis = (BuyItemState)list[i]; + BuyItemState bis = list[i]; m_Stream.Write( (int) bis.Price ); @@ -1607,7 +1609,7 @@ namespace Server.Network } } - public sealed class ContainerContentUpdate6017 : Packet + public sealed class ContainerContentUpdate6017 : Packet { public ContainerContentUpdate6017( Item item ) : base( 0x25, 21 ) { @@ -1686,7 +1688,7 @@ namespace Server.Network } } - public sealed class ContainerContent6017 : Packet + public sealed class ContainerContent6017 : Packet { public ContainerContent6017( Mobile beholder, Item beheld ) : base( 0x3C ) { diff --git a/Server/Poison.cs b/Server/Poison.cs index 87de1c2dc..cf08db167 100644 --- a/Server/Poison.cs +++ b/Server/Poison.cs @@ -20,127 +20,125 @@ using System; using System.Collections; +using System.Collections.Generic; namespace Server { - [Parsable] - public abstract class Poison - { - /*public abstract TimeSpan Interval{ get; } - public abstract TimeSpan Duration{ get; }*/ - public abstract string Name{ get; } - public abstract int Level{ get; } - public abstract Timer ConstructTimer( Mobile m ); - /*public abstract void OnDamage( Mobile m, ref object state );*/ + [Parsable] + public abstract class Poison + { + /*public abstract TimeSpan Interval{ get; } + public abstract TimeSpan Duration{ get; }*/ + public abstract string Name { get; } + public abstract int Level { get; } + public abstract Timer ConstructTimer( Mobile m ); + /*public abstract void OnDamage( Mobile m, ref object state );*/ - public override string ToString() - { - return this.Name; - } + public override string ToString() + { + return this.Name; + } - private static ArrayList m_Poisons = new ArrayList(); + private static List m_Poisons = new List(); - public static void Register( Poison reg ) - { - string regName = reg.Name.ToLower(); + public static void Register( Poison reg ) + { + string regName = reg.Name.ToLower(); - for(int i=0;i Poisons + { + get + { + return m_Poisons; + } + } - public static Poison Parse( string value ) - { - Poison p = null; + public static Poison Parse( string value ) + { + Poison p = null; - try - { - p = GetPoison( Convert.ToInt32( value ) ); - } - catch - { - } + int plevel; - if ( p == null ) - p = GetPoison( value ); + if ( int.TryParse( value, out plevel ) ) + p = GetPoison( plevel ); - return p; - } + if ( p == null ) + p = GetPoison( value ); - public static Poison GetPoison( int level ) - { - for ( int i = 0; i < m_Poisons.Count; ++i ) - { - Poison p = (Poison)m_Poisons[i]; + return p; + } - if ( p.Level == level ) - return p; - } + public static Poison GetPoison( int level ) + { + for ( int i = 0; i < m_Poisons.Count; ++i ) + { + Poison p = m_Poisons[i]; - return null; - } + if ( p.Level == level ) + return p; + } - public static Poison GetPoison( string name ) - { - for ( int i = 0; i < m_Poisons.Count; ++i ) - { - Poison p = (Poison)m_Poisons[i]; + return null; + } - if ( Utility.InsensitiveCompare( p.Name, name ) == 0 ) - return p; - } + public static Poison GetPoison( string name ) + { + for ( int i = 0; i < m_Poisons.Count; ++i ) + { + Poison p = m_Poisons[i]; - return null; - } + if ( Utility.InsensitiveCompare( p.Name, name ) == 0 ) + return p; + } - public static void Serialize( Poison p, GenericWriter writer ) - { - if ( p == null ) - { - writer.Write( (byte)0 ); - } - else - { - writer.Write( (byte)1 ); - writer.Write( (byte)p.Level ); - } - } + return null; + } - public static Poison Deserialize( GenericReader reader ) - { - switch ( reader.ReadByte() ) - { - case 1: return GetPoison( reader.ReadByte() ); - case 2: - //no longer used, safe to remove? - reader.ReadInt(); - reader.ReadDouble(); - reader.ReadInt(); - reader.ReadTimeSpan(); - break; - } - return null; - } - } + public static void Serialize( Poison p, GenericWriter writer ) + { + if ( p == null ) + { + writer.Write( (byte)0 ); + } + else + { + writer.Write( (byte)1 ); + writer.Write( (byte)p.Level ); + } + } + + public static Poison Deserialize( GenericReader reader ) + { + switch ( reader.ReadByte() ) + { + case 1: return GetPoison( reader.ReadByte() ); + case 2: + //no longer used, safe to remove? + reader.ReadInt(); + reader.ReadDouble(); + reader.ReadInt(); + reader.ReadTimeSpan(); + break; + } + return null; + } + } } diff --git a/Server/ScriptCompiler.cs b/Server/ScriptCompiler.cs index 163aaa146..50f27f61a 100644 --- a/Server/ScriptCompiler.cs +++ b/Server/ScriptCompiler.cs @@ -126,6 +126,7 @@ namespace Server } bin.Write( debug ); + bin.Write( Core.Version.ToString() ); ms.Position = 0; diff --git a/Server/Skills.cs b/Server/Skills.cs index d992a19a8..b81cc8117 100644 --- a/Server/Skills.cs +++ b/Server/Skills.cs @@ -23,7 +23,6 @@ using System.Collections; using System.Collections.Generic; using System.IO; using Server.Network; -using System.Xml; namespace Server { diff --git a/Server/Utility.cs b/Server/Utility.cs index ff4126501..ba8da5be3 100644 --- a/Server/Utility.cs +++ b/Server/Utility.cs @@ -148,7 +148,7 @@ namespace Server public static bool IPMatchCIDR( string cidr, IPAddress ip ) { - if ( ip.AddressFamily == AddressFamily.InterNetworkV6 ) + if ( ip == null || ip.AddressFamily == AddressFamily.InterNetworkV6 ) return false; //Just worry about IPv4 for now @@ -522,7 +522,7 @@ namespace Server #endregion #region Get[Something] - public static int GetInt32( string intString, int defaultValue ) + public static int GetXMLInt32( string intString, int defaultValue ) { try { @@ -530,18 +530,15 @@ namespace Server } catch { - try - { - return Convert.ToInt32( intString ); - } - catch - { - return defaultValue; - } + int val; + if ( int.TryParse( intString, out val ) ) + return val; + + return defaultValue; } } - public static DateTime GetDateTime( string dateTimeString, DateTime defaultValue ) + public static DateTime GetXMLDateTime( string dateTimeString, DateTime defaultValue ) { try { @@ -558,7 +555,7 @@ namespace Server } } - public static TimeSpan GetTimeSpan( string timeSpanString, TimeSpan defaultValue ) + public static TimeSpan GetXMLTimeSpan( string timeSpanString, TimeSpan defaultValue ) { try {