#W# Added: Added some custom regions. And started region work.

This commit is contained in:
WarrentyExpired 2026-09-02 11:51:05 -04:00
parent 2f81086157
commit be200eac7c
6 changed files with 108 additions and 4197 deletions

View file

@ -0,0 +1,30 @@
using Server;
using Server.Mobiles;
namespace Server.Regions
{
public class GreetingBusinessRegion : TownRegion
{
public GreetingBusinessRegion(string name, Map map, int priority, params Rectangle3D[] area)
: base(name, map, priority, area)
{
}
public override void OnEnter(Mobile m)
{
base.OnEnter(m);
if (m.Player)
{
m.SendMessage(0x35, $"Welcome to <BASEFONT COLOR='#FFD700'>{this.Name}</BASEFONT>.");
}
}
public override void OnExit(Mobile m)
{
base.OnExit(m);
if (m.Player)
{
m.SendMessage(0x35, $"You have left {this.Name}.");
}
}
}
}

View file

@ -0,0 +1,31 @@
using Server;
using Server.Mobiles;
namespace Server.Regions
{
public class GreetingDungeonRegion : DungeonRegion
{
public GreetingDungeonRegion(string name, Map map, int priority, params Rectangle3D[] area)
: base(name, map, priority, area)
{
}
public override void OnEnter(Mobile m)
{
base.OnEnter(m);
if (m.Player)
{
m.SendMessage(0x47F, $"You entered <BASEFONT COLOR='#FF0000'>{this.Name}</BASEFONT>.");
}
}
public override void OnExit(Mobile m)
{
base.OnExit(m);
if (m.Player)
{
m.SendMessage(0x47F, $"You have left {this.Name}.");
}
}
}
}

View file

@ -0,0 +1,33 @@
using Server;
using Server.Mobiles;
namespace Server.Regions
{
public class GreetingTownRegion : TownRegion
{
public GreetingTownRegion(string name, Map map, int priority, params Rectangle3D[] area)
: base(name, map, priority, area)
{
}
public override void OnEnter(Mobile m)
{
base.OnEnter(m);
if (m.Player)
{
m.SendMessage(0x35, $"Welcome to <BASEFONT COLOR='#3BB143'>{this.Name}</BASEFONT>.");
}
}
public override void OnExit(Mobile m)
{
base.OnExit(m);
if (m.Player)
{
m.SendMessage(0x35, $"You have left {this.Name}.");
}
}
}
}

View file

@ -1,4 +1,4 @@
namespace Server.Regions;
namespace Server.Regions;
public static class RegionJsonRegistration
{
@ -59,5 +59,10 @@ public static class RegionJsonRegistration
// Myrmidex
RegionJsonSerializer.Register<BattleRegion>();
// Custom
RegionJsonSerializer.Register<GreetingBusinessRegion>();
RegionJsonSerializer.Register<GreetingTownRegion>();
RegionJsonSerializer.Register<GreetingDungeonRegion>();
}
}