#W# Adding water creatures to the dynamic spawner.
This commit is contained in:
parent
2b8c1a88ea
commit
533790b9dc
2 changed files with 24 additions and 1 deletions
|
|
@ -133,6 +133,13 @@ namespace Server
|
||||||
typeof( Boar ), typeof( BlackBear ), typeof( BrownBear ), typeof( GreyWolf )
|
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------------------------------------------------
|
//-------------------------------------- Tier A------------------------------------------------
|
||||||
|
|
||||||
private static Type[] Dirt_A = new Type[]
|
private static Type[] Dirt_A = new Type[]
|
||||||
|
|
@ -474,6 +481,11 @@ namespace Server
|
||||||
else if ( terrain == Terrain.Dirt )
|
else if ( terrain == Terrain.Dirt )
|
||||||
m = Construct( DirtAnimals ) as Mobile;
|
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 )
|
else if ( spawn is Spawn_A )
|
||||||
{
|
{
|
||||||
if ( terrain == Terrain.Forest )
|
if ( terrain == Terrain.Forest )
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,13 @@ namespace Server.Items
|
||||||
{
|
{
|
||||||
Point3D savedLocation = this.Location;
|
Point3D savedLocation = this.Location;
|
||||||
Map savedMap = this.Map;
|
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 );
|
m_TrackedMobile = Server.SpawnList.RandomSpawn( this, savedLocation, savedMap );
|
||||||
|
|
||||||
if ( m_TrackedMobile != null )
|
if ( m_TrackedMobile != null )
|
||||||
|
|
@ -143,4 +149,9 @@ namespace Server.Items
|
||||||
[Constructable]
|
[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 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(); }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue