#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
|
|
@ -2963,5 +2963,15 @@
|
|||
"Area": [
|
||||
{ "x1": 441, "y1": 1189, "x2": 498, "y2": 1225 }
|
||||
]
|
||||
},
|
||||
{
|
||||
"$type": "GreetingCaveRegion",
|
||||
"Map": "Underworld",
|
||||
"Name": "Cave System",
|
||||
"Priority": 55,
|
||||
"Area": [
|
||||
{ "x1": 56, "y1": 527, "x2": 643, "y2": 756 },
|
||||
{ "x1": 56, "y1": 761, "x2": 1996, "y2": 1301 }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
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