diff --git a/Scripts/Gumps/ReportMurderer.cs b/Scripts/Gumps/ReportMurderer.cs index 99c03dbe8..4cbc57965 100644 --- a/Scripts/Gumps/ReportMurderer.cs +++ b/Scripts/Gumps/ReportMurderer.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using Server; using Server.Misc; using Server.Gumps; @@ -11,7 +12,7 @@ namespace Server.Gumps public class ReportMurdererGump : Gump { private int m_Idx; - private ArrayList m_Killers; + private List m_Killers; private Mobile m_Victum; public static void Initialize() @@ -23,8 +24,8 @@ namespace Server.Gumps { Mobile m = e.Mobile; - ArrayList killers = new ArrayList(); - ArrayList toGive = new ArrayList(); + List killers = new List(); + List toGive = new List(); foreach ( AggressorInfo ai in m.Aggressors ) { @@ -74,9 +75,9 @@ namespace Server.Gumps private class GumpTimer : Timer { private Mobile m_Victim; - private ArrayList m_Killers; + private List m_Killers; - public GumpTimer( Mobile victim, ArrayList killers ) : base( TimeSpan.FromSeconds( 4.0 ) ) + public GumpTimer( Mobile victim, List killers ) : base( TimeSpan.FromSeconds( 4.0 ) ) { m_Victim = victim; m_Killers = killers; @@ -88,11 +89,11 @@ namespace Server.Gumps } } - public ReportMurdererGump( Mobile victum, ArrayList killers ) : this( victum, killers, 0 ) + public ReportMurdererGump( Mobile victum, List killers ) : this( victum, killers, 0 ) { } - private ReportMurdererGump( Mobile victum, ArrayList killers, int idx ) : base( 0, 0 ) + private ReportMurdererGump( Mobile victum, List killers, int idx ) : base( 0, 0 ) { m_Killers = killers; m_Victum = victum; @@ -137,7 +138,7 @@ namespace Server.Gumps { case 1: { - Mobile killer = (Mobile)m_Killers[m_Idx]; + Mobile killer = m_Killers[m_Idx]; if ( killer != null && !killer.Deleted ) { killer.Kills++; diff --git a/Scripts/Items/Armor/BaseArmor.cs b/Scripts/Items/Armor/BaseArmor.cs index b92758a19..09854bbbf 100644 --- a/Scripts/Items/Armor/BaseArmor.cs +++ b/Scripts/Items/Armor/BaseArmor.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using Server.Network; using Server.Engines.Craft; using Server.Factions; @@ -1520,7 +1521,7 @@ namespace Server.Items public override void OnSingleClick( Mobile from ) { - ArrayList attrs = new ArrayList(); + List attrs = new List(); if ( DisplayLootType ) { @@ -1538,7 +1539,7 @@ namespace Server.Items if ( m_Quality == ArmorQuality.Exceptional ) attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) ); - if ( m_Identified ) + if ( m_Identified || from.AccessLevel >= AccessLevel.GameMaster) { if ( m_Durability != ArmorDurabilityLevel.Regular ) attrs.Add( new EquipInfoAttribute( 1038000 + (int)m_Durability ) ); @@ -1547,9 +1548,7 @@ namespace Server.Items attrs.Add( new EquipInfoAttribute( 1038005 + (int)m_Protection ) ); } else if ( m_Durability != ArmorDurabilityLevel.Regular || (m_Protection > ArmorProtectionLevel.Regular && m_Protection <= ArmorProtectionLevel.Invulnerability) ) - { attrs.Add( new EquipInfoAttribute( 1038000 ) ); // Unidentified - } int number; @@ -1566,7 +1565,7 @@ namespace Server.Items if ( attrs.Count == 0 && Crafter == null && Name != null ) return; - EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, (EquipInfoAttribute[])attrs.ToArray( typeof( EquipInfoAttribute ) ) ); + EquipmentInfo eqInfo = new EquipmentInfo( number, m_Crafter, false, attrs.ToArray() ); from.Send( new DisplayEquipmentInfo( this, eqInfo ) ); } diff --git a/Scripts/Items/Weapons/BaseWeapon.cs b/Scripts/Items/Weapons/BaseWeapon.cs index 138c4c38c..7c5364191 100644 --- a/Scripts/Items/Weapons/BaseWeapon.cs +++ b/Scripts/Items/Weapons/BaseWeapon.cs @@ -3264,7 +3264,7 @@ namespace Server.Items if ( m_Quality == WeaponQuality.Exceptional ) attrs.Add( new EquipInfoAttribute( 1018305 - (int)m_Quality ) ); - if ( m_Identified ) + if ( m_Identified || from.AccessLevel >= AccessLevel.GameMaster ) { if( m_Slayer != SlayerName.None ) { @@ -3290,9 +3290,7 @@ namespace Server.Items attrs.Add( new EquipInfoAttribute( 1038010 + (int)m_AccuracyLevel ) ); } else if( m_Slayer != SlayerName.None || m_Slayer2 != SlayerName.None || m_DurabilityLevel != WeaponDurabilityLevel.Regular || m_DamageLevel != WeaponDamageLevel.Regular || m_AccuracyLevel != WeaponAccuracyLevel.Regular ) - { attrs.Add( new EquipInfoAttribute( 1038000 ) ); // Unidentified - } if ( m_Poison != null && m_PoisonCharges > 0 ) attrs.Add( new EquipInfoAttribute( 1017383, m_PoisonCharges ) ); diff --git a/Scripts/Multis/PreviewHouse.cs b/Scripts/Multis/PreviewHouse.cs index 36adcdf3f..d4956b656 100644 --- a/Scripts/Multis/PreviewHouse.cs +++ b/Scripts/Multis/PreviewHouse.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using Server; using Server.Items; @@ -7,12 +8,12 @@ namespace Server.Multis { public class PreviewHouse : BaseMulti { - private ArrayList m_Components; + private List m_Components; private Timer m_Timer; public PreviewHouse( int multiID ) : base( multiID | 0x4000 ) { - m_Components = new ArrayList(); + m_Components = new List(); MultiComponentList mcl = this.Components; @@ -47,7 +48,7 @@ namespace Server.Multis for ( int i = 0; i < m_Components.Count; ++i ) { - Item item = (Item)m_Components[i]; + Item item = m_Components[i]; item.MoveToWorld( new Point3D( item.X + xOffset, item.Y + yOffset, item.Z + zOffset ), this.Map ); } @@ -62,7 +63,7 @@ namespace Server.Multis for ( int i = 0; i < m_Components.Count; ++i ) { - Item item = (Item)m_Components[i]; + Item item = m_Components[i]; item.Map = this.Map; } @@ -77,7 +78,7 @@ namespace Server.Multis for ( int i = 0; i < m_Components.Count; ++i ) { - Item item = (Item)m_Components[i]; + Item item = m_Components[i]; item.Delete(); } @@ -103,7 +104,7 @@ namespace Server.Multis writer.Write( (int) 0 ); // version - writer.WriteItemList( m_Components ); + writer.Write( m_Components ); } public override void Deserialize( GenericReader reader ) @@ -116,7 +117,7 @@ namespace Server.Multis { case 0: { - m_Components = reader.ReadItemList(); + m_Components = reader.ReadStrongItemList(); break; } diff --git a/Scripts/Spells/Chivalry/NobleSacrifice.cs b/Scripts/Spells/Chivalry/NobleSacrifice.cs index dd852e8b6..13f3ce143 100644 --- a/Scripts/Spells/Chivalry/NobleSacrifice.cs +++ b/Scripts/Spells/Chivalry/NobleSacrifice.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using Server; using Server.Mobiles; using Server.Network; @@ -34,7 +35,7 @@ namespace Server.Spells.Chivalry { if ( CheckSequence() ) { - ArrayList targets = new ArrayList(); + List targets = new List(); foreach ( Mobile m in Caster.GetMobilesInRange( 3 ) ) // TODO: Validate range { @@ -62,7 +63,7 @@ namespace Server.Spells.Chivalry for ( int i = 0; i < targets.Count; ++i ) { - Mobile m = (Mobile)targets[i]; + Mobile m = targets[i]; if ( !m.Alive ) { diff --git a/Scripts/Spells/Sixth/MassCurse.cs b/Scripts/Spells/Sixth/MassCurse.cs index bd824d697..4f1909200 100644 --- a/Scripts/Spells/Sixth/MassCurse.cs +++ b/Scripts/Spells/Sixth/MassCurse.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using Server.Misc; using Server.Targeting; using Server.Network; @@ -41,7 +42,7 @@ namespace Server.Spells.Sixth SpellHelper.GetSurfaceTop( ref p ); - ArrayList targets = new ArrayList(); + List targets = new List(); Map map = Caster.Map; @@ -63,7 +64,7 @@ namespace Server.Spells.Sixth for ( int i = 0; i < targets.Count; ++i ) { - Mobile m = (Mobile)targets[i]; + Mobile m = targets[i]; Caster.DoHarmful( m ); diff --git a/Scripts/Spells/Sixth/Reveal.cs b/Scripts/Spells/Sixth/Reveal.cs index c96d0c444..ac0b7146b 100644 --- a/Scripts/Spells/Sixth/Reveal.cs +++ b/Scripts/Spells/Sixth/Reveal.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using Server.Misc; using Server.Targeting; using Server.Network; @@ -38,7 +39,7 @@ namespace Server.Spells.Sixth SpellHelper.GetSurfaceTop( ref p ); - ArrayList targets = new ArrayList(); + List targets = new List(); Map map = Caster.Map; @@ -60,7 +61,7 @@ namespace Server.Spells.Sixth for ( int i = 0; i < targets.Count; ++i ) { - Mobile m = (Mobile)targets[i]; + Mobile m = targets[i]; m.RevealingAction();