mirror of
https://github.com/ServUO/ServUO
synced 2026-08-11 20:23:04 -04:00
Added removed mobiles to Spawner Persistence to remove them from spawners. Re-Added harful effects for aura effect, reduced range to 3. Various code cleanup. Co-authored-by: TrueUO <knight.daniel.r@gmail.com>
42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
namespace Server.Engines.Craft
|
|
{
|
|
public class CraftGroupCol : System.Collections.CollectionBase
|
|
{
|
|
public int Add(CraftGroup craftGroup)
|
|
{
|
|
return List.Add(craftGroup);
|
|
}
|
|
|
|
public void Remove(int index)
|
|
{
|
|
if (index > Count - 1 || index < 0)
|
|
{
|
|
}
|
|
else
|
|
{
|
|
List.RemoveAt(index);
|
|
}
|
|
}
|
|
|
|
public CraftGroup GetAt(int index)
|
|
{
|
|
return index >= 0 && index < List.Count ? (CraftGroup)List[index] : null;
|
|
}
|
|
|
|
public int SearchFor(TextDefinition groupName)
|
|
{
|
|
for (int i = 0; i < List.Count; i++)
|
|
{
|
|
CraftGroup craftGroup = (CraftGroup)List[i];
|
|
|
|
int nameNumber = craftGroup.NameNumber;
|
|
string nameString = craftGroup.NameString;
|
|
|
|
if ((nameNumber != 0 && nameNumber == groupName.Number) || (nameString != null && nameString == groupName.String))
|
|
return i;
|
|
}
|
|
|
|
return -1;
|
|
}
|
|
}
|
|
}
|