#W# Region: Added a new Cave Region.
This commit is contained in:
parent
162af7b68a
commit
11cf73428d
3 changed files with 50 additions and 0 deletions
39
Projects/UOContent/Regions/Custom/GreetingCaveRegion.cs
Normal file
39
Projects/UOContent/Regions/Custom/GreetingCaveRegion.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Custom;
|
||||
|
||||
namespace Server.Regions
|
||||
{
|
||||
public class GreetingCaveRegion : BaseRegion
|
||||
{
|
||||
public GreetingCaveRegion(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 have entered a dark cave system.");
|
||||
}
|
||||
if (m is PlayerMobile player )
|
||||
{
|
||||
if ( player.Mounted )
|
||||
{
|
||||
Server.Custom.AutoStable.StoreMount(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnExit(Mobile m)
|
||||
{
|
||||
base.OnExit(m);
|
||||
if ( m is PlayerMobile player )
|
||||
{
|
||||
Server.Custom.AutoStable.RestoreMount(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -68,5 +68,6 @@ public static class RegionJsonRegistration
|
|||
RegionJsonSerializer.Register<GreetingOverworldSpawnRegion>();
|
||||
RegionJsonSerializer.Register<NewbieDungeonRegion>();
|
||||
RegionJsonSerializer.Register<GreetingInnRegion>();
|
||||
RegionJsonSerializer.Register<GreetingCaveRegion>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue