This commit is contained in:
asayre 2006-06-15 10:45:30 +00:00
parent b0208aa906
commit 71923713d4
9 changed files with 401 additions and 411 deletions

File diff suppressed because it is too large Load diff

View file

@ -66,11 +66,11 @@ namespace Server.Commands.Generic
{
m_AllCommands.Add( command );
ArrayList impls = BaseCommandImplementor.Implementors;
List<BaseCommandImplementor> impls = BaseCommandImplementor.Implementors;
for ( int i = 0; i < impls.Count; ++i )
{
BaseCommandImplementor impl = (BaseCommandImplementor)impls[i];
BaseCommandImplementor impl = impls[i];
if ( (command.Supports & impl.SupportRequirement) != 0 )
impl.Register( command );

View file

@ -2,6 +2,7 @@ using System;
using System.Text;
using System.Collections;
using Server;
using System.Collections.Generic;
namespace Server.Commands.Generic
{
@ -317,15 +318,15 @@ namespace Server.Commands.Generic
impl.Register();
}
private static ArrayList m_Implementors;
private static List<BaseCommandImplementor> m_Implementors;
public static ArrayList Implementors
public static List<BaseCommandImplementor> Implementors
{
get
{
if ( m_Implementors == null )
{
m_Implementors = new ArrayList();
m_Implementors = new List<BaseCommandImplementor>();
RegisterImplementors();
}

View file

@ -2,6 +2,7 @@ using System;
using System.Collections;
using Server;
using Server.Items;
using System.Collections.Generic;
namespace Server.Engines.BulkOrders
{
@ -39,7 +40,7 @@ namespace Server.Engines.BulkOrders
}
}
public abstract ArrayList ComputeRewards( bool full );
public abstract List<Item> ComputeRewards( bool full );
public abstract int ComputeGold();
public abstract int ComputeFame();
@ -49,16 +50,16 @@ namespace Server.Engines.BulkOrders
gold = ComputeGold();
fame = ComputeFame();
ArrayList rewards = ComputeRewards( false );
List<Item> rewards = ComputeRewards( false );
if ( rewards.Count > 0 )
{
reward = (Item)rewards[Utility.Random( rewards.Count )];
reward = rewards[Utility.Random( rewards.Count )];
for ( int i = 0; i < rewards.Count; ++i )
{
if ( rewards[i] != reward )
((Item)rewards[i]).Delete();
rewards[i].Delete();
}
}
}

View file

@ -3,6 +3,7 @@ using System.Collections;
using Server;
using Server.Items;
using Mat = Server.Engines.BulkOrders.BulkMaterialType;
using System.Collections.Generic;
namespace Server.Engines.BulkOrders
{
@ -83,9 +84,9 @@ namespace Server.Engines.BulkOrders
this.Material = mat;
}
public override ArrayList ComputeRewards( bool full )
public override List<Item> ComputeRewards( bool full )
{
ArrayList list = new ArrayList();
List<Item> list = new List<Item>();
RewardGroup rewardGroup = SmithRewardCalculator.Instance.LookupRewards( SmithRewardCalculator.Instance.ComputePoints( this ) );

View file

@ -3,6 +3,7 @@ using System.Collections;
using Server;
using Server.Items;
using Mat = Server.Engines.BulkOrders.BulkMaterialType;
using System.Collections.Generic;
namespace Server.Engines.BulkOrders
{
@ -78,9 +79,9 @@ namespace Server.Engines.BulkOrders
this.Material = mat;
}
public override ArrayList ComputeRewards( bool full )
public override List<Item> ComputeRewards( bool full )
{
ArrayList list = new ArrayList();
List<Item> list = new List<Item>();
RewardGroup rewardGroup = TailorRewardCalculator.Instance.LookupRewards( TailorRewardCalculator.Instance.ComputePoints( this ) );

View file

@ -2,6 +2,7 @@ using System;
using System.Collections;
using Server;
using Server.Items;
using System.Collections.Generic;
namespace Server.Engines.BulkOrders
{
@ -109,7 +110,7 @@ namespace Server.Engines.BulkOrders
from.SendLocalizedMessage( 1045166 ); // The maximum amount of requested items have already been combined to this deed.
}
public abstract ArrayList ComputeRewards( bool full );
public abstract List<Item> ComputeRewards( bool full );
public abstract int ComputeGold();
public abstract int ComputeFame();
@ -119,16 +120,16 @@ namespace Server.Engines.BulkOrders
gold = ComputeGold();
fame = ComputeFame();
ArrayList rewards = ComputeRewards( false );
List<Item> rewards = ComputeRewards( false );
if ( rewards.Count > 0 )
{
reward = (Item)rewards[Utility.Random( rewards.Count )];
reward = rewards[Utility.Random( rewards.Count )];
for ( int i = 0; i < rewards.Count; ++i )
{
if ( rewards[i] != reward )
((Item)rewards[i]).Delete();
rewards[i].Delete();
}
}
}

View file

@ -4,6 +4,7 @@ using Server;
using Server.Items;
using Server.Engines.Craft;
using Mat = Server.Engines.BulkOrders.BulkMaterialType;
using System.Collections.Generic;
namespace Server.Engines.BulkOrders
{
@ -33,9 +34,9 @@ namespace Server.Engines.BulkOrders
return SmithRewardCalculator.Instance.ComputeGold( this );
}
public override ArrayList ComputeRewards( bool full )
public override List<Item> ComputeRewards( bool full )
{
ArrayList list = new ArrayList();
List<Item> list = new List<Item>();
RewardGroup rewardGroup = SmithRewardCalculator.Instance.LookupRewards( SmithRewardCalculator.Instance.ComputePoints( this ) );

View file

@ -3,6 +3,7 @@ using System.Collections;
using Server;
using Server.Items;
using Server.Engines.Craft;
using System.Collections.Generic;
namespace Server.Engines.BulkOrders
{
@ -26,9 +27,9 @@ namespace Server.Engines.BulkOrders
return TailorRewardCalculator.Instance.ComputeGold( this );
}
public override ArrayList ComputeRewards( bool full )
public override List<Item> ComputeRewards( bool full )
{
ArrayList list = new ArrayList();
List<Item> list = new List<Item>();
RewardGroup rewardGroup = TailorRewardCalculator.Instance.LookupRewards( TailorRewardCalculator.Instance.ComputePoints( this ) );