#W# Added: Added an Overworld dungeon region. Tweaked overworld animal spawn.
This commit is contained in:
parent
6213604bb1
commit
292cd625c5
10 changed files with 435 additions and 322 deletions
|
|
@ -0,0 +1,43 @@
|
|||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Regions
|
||||
{
|
||||
public class GreetingOverworldSpawnRegion : DungeonRegion
|
||||
{
|
||||
public GreetingOverworldSpawnRegion(string name, Map map, int priority, params Rectangle3D[] area)
|
||||
: base(name, map, priority, area)
|
||||
{
|
||||
}
|
||||
public override bool MountsAllowed => false;
|
||||
public override void OnEnter(Mobile m)
|
||||
{
|
||||
base.OnEnter(m);
|
||||
if (m.Player)
|
||||
{
|
||||
m.SendMessage($"You entered <BASEFONT COLOR='#FF0000'>{this.Name}</BASEFONT>.");
|
||||
}
|
||||
if (m is PlayerMobile player && player.Mounted )
|
||||
{
|
||||
if ( player.Mount is BaseMount )
|
||||
{
|
||||
Server.Custom.AutoStable.StoreMount(player);
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseMount.Dismount(player);
|
||||
player.SendMessage("Mounts are not permitted in this area.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnExit(Mobile m)
|
||||
{
|
||||
base.OnExit(m);
|
||||
if ( m is PlayerMobile player )
|
||||
{
|
||||
Server.Custom.AutoStable.RestoreMount(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -65,5 +65,6 @@ public static class RegionJsonRegistration
|
|||
RegionJsonSerializer.Register<GreetingTownRegion>();
|
||||
RegionJsonSerializer.Register<GreetingDungeonRegion>();
|
||||
RegionJsonSerializer.Register<MountlessTownRegion>();
|
||||
RegionJsonSerializer.Register<GreetingOverworldSpawnRegion>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue