generic town criers, misc generics, region cleanups, container generic, yadda yadda

This commit is contained in:
mark 2006-06-24 17:56:49 +00:00
parent 03adafb13e
commit 90c2233e4c
16 changed files with 114 additions and 167 deletions

View file

@ -1,5 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Network;
using Server.Items;
using Server.Engines.CannedEvil;
@ -67,13 +67,11 @@ namespace Server.Spells.Necromancy
if( map != null )
{
ArrayList targets = new ArrayList();
List<Mobile> targets = new List<Mobile>();
foreach( Mobile m in r.ChampionSpawn.GetMobilesInRange( Range ) )
{
if( IsValidTarget( m ) )
targets.Add( m );
}
//Effects.PlaySound( Caster.Location, map, 0x1FB );
//Effects.PlaySound( Caster.Location, map, 0x10B );
@ -81,7 +79,7 @@ namespace Server.Spells.Necromancy
for( int i = 0; i < targets.Count; ++i )
{
Mobile m = (Mobile)targets[i];
Mobile m = targets[i];
//m.FixedParticles( 0x374A, 1, 15, 9502, 97, 3, (EffectLayer)255 );

View file

@ -1,5 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Network;
using Server.Items;
using Server.Targeting;
@ -52,17 +52,15 @@ namespace Server.Spells.Necromancy
if ( map != null )
{
ArrayList targets = new ArrayList();
List<Mobile> targets = new List<Mobile>();
foreach ( Mobile targ in m.GetMobilesInRange( 2 ) )
{
if ( (Caster == targ || SpellHelper.ValidIndirectTarget( Caster, targ )) && Caster.CanBeHarmful( targ, false ) )
targets.Add( targ );
}
for ( int i = 0; i < targets.Count; ++i )
{
Mobile targ = (Mobile)targets[i];
Mobile targ = targets[i];
int num;

View file

@ -1,5 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Network;
using Server.Items;
using Server.Targeting;
@ -39,13 +39,11 @@ namespace Server.Spells.Necromancy
if ( map != null )
{
ArrayList targets = new ArrayList();
List<Mobile> targets = new List<Mobile>();
foreach ( Mobile m in Caster.GetMobilesInRange( 5 ) )
{
if ( Caster != m && Caster.InLOS( m ) && SpellHelper.ValidIndirectTarget( Caster, m ) && Caster.CanBeHarmful( m, false ) )
targets.Add( m );
}
Effects.PlaySound( Caster.Location, map, 0x1FB );
Effects.PlaySound( Caster.Location, map, 0x10B );
@ -53,7 +51,7 @@ namespace Server.Spells.Necromancy
for ( int i = 0; i < targets.Count; ++i )
{
Mobile m = (Mobile)targets[i];
Mobile m = targets[i];
Caster.DoHarmful( m );
m.FixedParticles( 0x374A, 1, 15, 9502, 97, 3, (EffectLayer)255 );

View file

@ -1,5 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Network;
using Server.Items;
using Server.Targeting;
@ -44,7 +44,7 @@ namespace Server.Spells.Seventh
if ( p is Item )
p = ((Item)p).GetWorldLocation();
ArrayList targets = new ArrayList();
List<Mobile> targets = new List<Mobile>();
Map map = Caster.Map;
@ -90,7 +90,7 @@ namespace Server.Spells.Seventh
for ( int i = 0; i < targets.Count; ++i )
{
Mobile m = (Mobile)targets[i];
Mobile m = targets[i];
double toDeal = damage;

View file

@ -1,5 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Misc;
using Server.Network;
using Server.Items;
@ -42,7 +42,7 @@ namespace Server.Spells.Seventh
SpellHelper.GetSurfaceTop( ref p );
ArrayList targets = new ArrayList();
List<Mobile> targets = new List<Mobile>();
Map map = Caster.Map;
@ -51,17 +51,15 @@ namespace Server.Spells.Seventh
IPooledEnumerable eable = map.GetMobilesInRange( new Point3D( p ), 8 );
foreach ( Mobile m in eable )
{
if ( m is BaseCreature && (m as BaseCreature).IsDispellable && Caster.CanBeHarmful( m, false ) )
targets.Add( m );
}
eable.Free();
}
for ( int i = 0; i < targets.Count; ++i )
{
Mobile m = (Mobile)targets[i];
Mobile m = targets[i];
BaseCreature bc = m as BaseCreature;

View file

@ -1,5 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.Network;
using Server.Items;
using Server.Targeting;
@ -44,7 +44,7 @@ namespace Server.Spells.Seventh
if ( p is Item )
p = ((Item)p).GetWorldLocation();
ArrayList targets = new ArrayList();
List<Mobile> targets = new List<Mobile>();
Map map = Caster.Map;
@ -89,7 +89,7 @@ namespace Server.Spells.Seventh
for ( int i = 0; i < targets.Count; ++i )
{
Mobile m = (Mobile)targets[i];
Mobile m = targets[i];
double toDeal = damage;