some more generics, working on addon chop fix

This commit is contained in:
mark 2006-06-22 02:09:38 +00:00
parent 965275cb19
commit 5c64e18f9c
2 changed files with 7 additions and 7 deletions

View file

@ -65,7 +65,7 @@ namespace Server.Items
{ {
for ( int i = 0; hue == 0 && i < m_Components.Count; ++i ) for ( int i = 0; hue == 0 && i < m_Components.Count; ++i )
{ {
AddonComponent c = (AddonComponent)m_Components[i]; AddonComponent c = m_Components[i];
if ( c.Hue != 0 ) if ( c.Hue != 0 )
hue = c.Hue; hue = c.Hue;
@ -109,17 +109,17 @@ namespace Server.Items
public bool CouldFit( IPoint3D p, Map map ) public bool CouldFit( IPoint3D p, Map map )
{ {
ArrayList houses = null; List<BaseHouse> houses = null;
return ( CouldFit( p, map, null, ref houses ) == AddonFitResult.Valid ); return ( CouldFit( p, map, null, ref houses ) == AddonFitResult.Valid );
} }
public AddonFitResult CouldFit( IPoint3D p, Map map, Mobile from, ref ArrayList houseList ) public AddonFitResult CouldFit( IPoint3D p, Map map, Mobile from, ref List<BaseHouse> houseList )
{ {
if ( Deleted ) if ( Deleted )
return AddonFitResult.Blocked; return AddonFitResult.Blocked;
ArrayList houses = new ArrayList(); List<BaseHouse> houses = new List<BaseHouse>();
foreach ( AddonComponent c in m_Components ) foreach ( AddonComponent c in m_Components )
{ {
@ -168,7 +168,7 @@ namespace Server.Items
return AddonFitResult.Valid; return AddonFitResult.Valid;
} }
public static bool CheckHouse( Mobile from, Point3D p, Map map, int height, ArrayList list ) public static bool CheckHouse( Mobile from, Point3D p, Map map, int height, List<BaseHouse> list )
{ {
if ( from == null || from.AccessLevel >= AccessLevel.GameMaster ) if ( from == null || from.AccessLevel >= AccessLevel.GameMaster )
return true; return true;

View file

@ -1,5 +1,5 @@
using System; using System;
using System.Collections; using System.Collections.Generic;
using Server; using Server;
using Server.Targeting; using Server.Targeting;
@ -72,7 +72,7 @@ namespace Server.Items
Server.Spells.SpellHelper.GetSurfaceTop( ref p ); Server.Spells.SpellHelper.GetSurfaceTop( ref p );
ArrayList houses = null; List<BaseHouse> houses = null;
AddonFitResult res = addon.CouldFit( p, map, from, ref houses ); AddonFitResult res = addon.CouldFit( p, map, from, ref houses );