Initial commit

This commit is contained in:
Ubuntu
2026-06-19 00:00:16 -04:00
commit 73701ff86e
7100 changed files with 1952988 additions and 0 deletions
+58
View File
@@ -0,0 +1,58 @@
using System;
namespace Server.Engines.Craft
{
public class CraftItemCol : System.Collections.CollectionBase
{
public CraftItemCol()
{
}
public int Add(CraftItem craftItem)
{
return this.List.Add(craftItem);
}
public void Remove(int index)
{
if (index > this.Count - 1 || index < 0)
{
}
else
{
this.List.RemoveAt(index);
}
}
public CraftItem GetAt(int index)
{
return (CraftItem)this.List[index];
}
public CraftItem SearchForSubclass(Type type)
{
for (int i = 0; i < this.List.Count; i++)
{
CraftItem craftItem = (CraftItem)this.List[i];
if (craftItem.ItemType == type || type.IsSubclassOf(craftItem.ItemType))
return craftItem;
}
return null;
}
public CraftItem SearchFor(Type type)
{
for (int i = 0; i < this.List.Count; i++)
{
CraftItem craftItem = (CraftItem)this.List[i];
if (craftItem.ItemType == type)
{
return craftItem;
}
}
return null;
}
}
}