Lots of generics, gm+ can see weapon/armor props without identification
This commit is contained in:
parent
d1a8a6d75e
commit
b0208aa906
7 changed files with 31 additions and 29 deletions
|
|
@ -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<Mobile> 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<Mobile> killers = new List<Mobile>();
|
||||
List<Mobile> toGive = new List<Mobile>();
|
||||
|
||||
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<Mobile> m_Killers;
|
||||
|
||||
public GumpTimer( Mobile victim, ArrayList killers ) : base( TimeSpan.FromSeconds( 4.0 ) )
|
||||
public GumpTimer( Mobile victim, List<Mobile> 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<Mobile> killers ) : this( victum, killers, 0 )
|
||||
{
|
||||
}
|
||||
|
||||
private ReportMurdererGump( Mobile victum, ArrayList killers, int idx ) : base( 0, 0 )
|
||||
private ReportMurdererGump( Mobile victum, List<Mobile> 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++;
|
||||
|
|
|
|||
|
|
@ -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<EquipInfoAttribute> attrs = new List<EquipInfoAttribute>();
|
||||
|
||||
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 ) );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 ) );
|
||||
|
|
|
|||
|
|
@ -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<Item> m_Components;
|
||||
private Timer m_Timer;
|
||||
|
||||
public PreviewHouse( int multiID ) : base( multiID | 0x4000 )
|
||||
{
|
||||
m_Components = new ArrayList();
|
||||
m_Components = new List<Item>();
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<Mobile> targets = new List<Mobile>();
|
||||
|
||||
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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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<Mobile> targets = new List<Mobile>();
|
||||
|
||||
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 );
|
||||
|
||||
|
|
|
|||
|
|
@ -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<Mobile> targets = new List<Mobile>();
|
||||
|
||||
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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue