#W# Added: Added some custom regions. And started region work.
This commit is contained in:
parent
2f81086157
commit
be200eac7c
6 changed files with 108 additions and 4197 deletions
30
Projects/UOContent/Regions/Custom/GreetingBusinessRegion.cs
Normal file
30
Projects/UOContent/Regions/Custom/GreetingBusinessRegion.cs
Normal 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}.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Projects/UOContent/Regions/Custom/GreetingDungeonRegion.cs
Normal file
31
Projects/UOContent/Regions/Custom/GreetingDungeonRegion.cs
Normal 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}.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Projects/UOContent/Regions/Custom/GreetingTownRegion.cs
Normal file
33
Projects/UOContent/Regions/Custom/GreetingTownRegion.cs
Normal 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}.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -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>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue