mirror of
https://github.com/ServUO/ServUO
synced 2026-08-11 20:23:04 -04:00
- Fixed Wrong Revamped typo in world generation - Added Spawn Count support to each Spawner line. Its a very simple rip off of house XmlSpawner does it. Each spawner line will now have a max spawn, which will coincide with the spawners max count. - Added Security gump support for lockdowns - house friends can now lock down items in houses - Mud Puppies and Red Herring now derive from BigFish - Fixed so you cannot parry with balanced Weapons - Fixed Conversion to Spawners. Each spawner line will now convert to the proper amount - Fixed PVP System crash if you have system Disabled - Removed redundant New Depise Spawners - Certain revamped dungeon spawners no longer load on create world. They instead load when that dungeon is enabled. This will maintain old spawners for older era'd servers - Added delay to Bombard paralyze - Added proper buff info to Enchant Spell - Clones (mirror image) no longer block movement - Fixed Injected Strike buff info
66 lines
No EOL
1.6 KiB
C#
66 lines
No EOL
1.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Server.Mobiles
|
|
{
|
|
public class SpawnObject
|
|
{
|
|
public string SpawnName { get; set; }
|
|
public int MaxCount { get; set; }
|
|
|
|
public int CurrentCount { get { return SpawnedObjects.Count; } }
|
|
|
|
public List<ISpawnable> SpawnedObjects { get; set; }
|
|
|
|
public SpawnObject(string name)
|
|
: this(name, 1)
|
|
{
|
|
}
|
|
|
|
public SpawnObject(string name, int count)
|
|
{
|
|
SpawnName = name;
|
|
MaxCount = count;
|
|
|
|
SpawnedObjects = new List<ISpawnable>();
|
|
}
|
|
|
|
public SpawnObject(GenericReader reader)
|
|
{
|
|
int version = reader.ReadInt();
|
|
|
|
SpawnedObjects = new List<ISpawnable>();
|
|
|
|
int count = reader.ReadInt();
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
ISpawnable e = World.FindEntity(reader.ReadInt()) as ISpawnable;
|
|
|
|
if (e != null)
|
|
SpawnedObjects.Add(e);
|
|
}
|
|
|
|
SpawnName = reader.ReadString();
|
|
MaxCount = reader.ReadInt();
|
|
}
|
|
|
|
public void Serialize(GenericWriter writer)
|
|
{
|
|
writer.Write(0);
|
|
|
|
writer.Write(SpawnedObjects.Count);
|
|
foreach (var sp in SpawnedObjects)
|
|
{
|
|
if (sp is Item)
|
|
writer.Write((Item)sp);
|
|
else if (sp is Mobile)
|
|
writer.Write((Mobile)sp);
|
|
else
|
|
writer.Write(Serial.MinusOne);
|
|
}
|
|
|
|
writer.Write(SpawnName);
|
|
writer.Write(MaxCount);
|
|
}
|
|
}
|
|
} |