#W# Region: Added a new NewbieDungeonRegion. Accelerated skill gain upto 80.0
This commit is contained in:
parent
e337ca20bc
commit
11b620b0dc
3 changed files with 57 additions and 0 deletions
44
Projects/UOContent/Regions/Custom/NewbieDungeonRegion.cs
Normal file
44
Projects/UOContent/Regions/Custom/NewbieDungeonRegion.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Regions
|
||||
{
|
||||
public class NewbieDungeonRegion : DungeonRegion
|
||||
{
|
||||
public NewbieDungeonRegion(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>.");
|
||||
m.SendMessage($"Skill gains are accelerated but stop at 80.0 points.");
|
||||
}
|
||||
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 Dungeon.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnExit(Mobile m)
|
||||
{
|
||||
base.OnExit(m);
|
||||
if ( m is PlayerMobile player )
|
||||
{
|
||||
Server.Custom.AutoStable.RestoreMount(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -66,5 +66,6 @@ public static class RegionJsonRegistration
|
|||
RegionJsonSerializer.Register<GreetingDungeonRegion>();
|
||||
RegionJsonSerializer.Register<MountlessTownRegion>();
|
||||
RegionJsonSerializer.Register<GreetingOverworldSpawnRegion>();
|
||||
RegionJsonSerializer.Register<NewbieDungeonRegion>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue