#W# Adding water creatures to the dynamic spawner.

This commit is contained in:
WarrentyExpired 2026-08-11 12:35:24 -04:00
parent 2b8c1a88ea
commit 533790b9dc
2 changed files with 24 additions and 1 deletions

View file

@ -133,6 +133,13 @@ namespace Server
typeof( Boar ), typeof( BlackBear ), typeof( BrownBear ), typeof( GreyWolf )
};
//-------------------------------------- WaterCreatures ------------------------------------------------
private static Type[] WaterCreatures = new Type[]
{
typeof( WaterElemental ), typeof( Dolphin ), typeof( DeepSeaSerpent ),
typeof( Leviathan ), typeof( SeaSerpent ), typeof( Kraken )
};
//-------------------------------------- Tier A------------------------------------------------
private static Type[] Dirt_A = new Type[]
@ -474,6 +481,11 @@ namespace Server
else if ( terrain == Terrain.Dirt )
m = Construct( DirtAnimals ) as Mobile;
}
else if ( spawn is SpawnWater )
{
if ( terrain == Terrain.Water )
m = Construct( WaterCreatures ) as Mobile;
}
else if ( spawn is Spawn_A )
{
if ( terrain == Terrain.Forest )

View file

@ -69,7 +69,13 @@ namespace Server.Items
{
Point3D savedLocation = this.Location;
Map savedMap = this.Map;
Region reg = Region.Find( savedLocation, savedMap );
if ( reg is Server.Regions.TownRegion ||
reg is Server.Regions.GuardedRegion )
{
this.Delete();
return;
}
m_TrackedMobile = Server.SpawnList.RandomSpawn( this, savedLocation, savedMap );
if ( m_TrackedMobile != null )
@ -143,4 +149,9 @@ namespace Server.Items
[Constructable]
public Spawn_E(){} public Spawn_E( Serial serial ) : base( serial ){} public override void Serialize( GenericWriter writer ){ base.Serialize( writer ); writer.Write( (int) 0 ); } public override void Deserialize( GenericReader reader ){ base.Deserialize( reader ); int version = reader.ReadInt(); }
}
public class SpawnWater : BaseSpawner
{
[Constructable]
public SpawnWater(){} public SpawnWater( Serial serial ) : base( serial ){} public override void Serialize( GenericWriter writer ){ base.Serialize( writer ); writer.Write( (int) 0 ); } public override void Deserialize( GenericReader reader ){ base.Deserialize( reader ); int version = reader.ReadInt(); }
}
}