#W# Spawn: Added low tier mobs to the dynamic spawner.

This commit is contained in:
WarrentyExpired 2026-09-26 20:15:54 -04:00
parent 3578b6c1a8
commit accb38d7d2
3 changed files with 70 additions and 2 deletions

View file

@ -233,7 +233,12 @@ namespace Server.Custom.DynamicSpawns
private static readonly Type[] SwampAnimals = [typeof(Alligator), typeof(GiantToad), typeof(GiantSerpent), typeof(Mongbat), typeof(SwampDragon), typeof(CorrosiveSlime)];
private static readonly Type[] SnowAnimals = [typeof(PolarBear), typeof(SnowLeopard), typeof(WhiteWolf), typeof(Walrus), typeof(IceSnake), typeof(FrostSpider), typeof(Walrus)];
private static readonly Type[] WaterCreatures = [typeof(Dolphin), typeof(SeaHorse)];
private static readonly Type[] ForestMobs = [typeof(Reaper), typeof(Gazer), typeof(Imp), typeof(Troll), typeof(Wisp)];
private static readonly Type[] GrassMobs = [typeof(Corpser), typeof(Orc), typeof(Ettin), typeof(SkitteringHopper), typeof(HeadlessOne)];
private static readonly Type[] JungleMobs = [typeof(Ogre), typeof(Orc), typeof(Bogle), typeof(VampireBat), typeof(Corpser)];
private static readonly Type[] SandMobs = [typeof(Skeleton), typeof(Mummy), typeof(Shade), typeof(HellHound), typeof(SandVortex)];
private static readonly Type[] SnowMobs = [typeof(IceElemental), typeof(FrostTroll), typeof(Ogre), typeof(Orc)];
private static readonly Type[] SwampMobs = [typeof(Savage), typeof(SwampTentacle), typeof(WhippingVine), typeof(Lizardman), typeof(DarkWisp)];
public static Terrain GetTerrain(Map map, Point3D location, int x, int y)
{
if (map == Map.Internal || x < 0 || y < 0 || x >= map.Width || y >= map.Height)
@ -340,6 +345,20 @@ namespace Server.Custom.DynamicSpawns
Terrain.Snow => Construct(SnowAnimals),
_ => null
},
SpawnMobs => terrain switch
{
Terrain.Water => null,
Terrain.Cave => null,
Terrain.Dirt => null,
Terrain.Forest => Construct(ForestMobs),
Terrain.Grass => Construct(GrassMobs),
Terrain.Jungle => Construct(JungleMobs),
Terrain.Rock => null,
Terrain.Sand => Construct(SandMobs),
Terrain.Swamp => Construct(SwampMobs),
Terrain.Snow => Construct(SnowMobs),
_ => null
},
};
}

View file

@ -111,7 +111,7 @@ namespace Server.Items
}
// Set this to how far you want the animal to drift from the proxy's location.
int proxyScatterRange = 20;
int proxyScatterRange = 0;
Point3D spawnPoint = savedLocation;
@ -162,4 +162,12 @@ namespace Server.Items
public override void Serialize(IGenericWriter writer) { base.Serialize(writer); writer.Write(0); }
public override void Deserialize(IGenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); }
}
public class SpawnMobs : BaseProxySpawner
{
[Constructible] public SpawnMobs() {}
public SpawnMobs(Serial serial) : base(serial) {}
public override void Serialize(IGenericWriter writer) { base.Serialize(writer); writer.Write(0); }
public override void Deserialize(IGenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); }
}
}