## Possible Breaking Change * Reverted regions.json back to RunUO until newer regions are implemented and proper expansion checks are added. ### Other Changes - [X] Adds `Region.IsPartOf<T1, T2>()` to check for multiple types. - [X] Fixes regions.json being wrong - [X] Adds lots of missing regions. **They are not implemented properly yet** - [X] Adds regions.xml -> regions.json (check ModernUO Discord) - [X] Adds expansion specific regions.
26 lines
595 B
C#
26 lines
595 B
C#
namespace Server.Regions;
|
|
|
|
public class TownRegionJsonDto<TRegion> : BaseRegionJsonDto<TRegion> where TRegion : TownRegion
|
|
{
|
|
public Point3D Entrance { get; set; }
|
|
|
|
public override void FromRegion(Region region)
|
|
{
|
|
base.FromRegion(region);
|
|
|
|
if (region is TownRegion townRegion)
|
|
{
|
|
Entrance = townRegion.Entrance;
|
|
}
|
|
}
|
|
|
|
protected override void HydrateRegion(Region region)
|
|
{
|
|
base.HydrateRegion(region);
|
|
|
|
if (region is TownRegion townRegion)
|
|
{
|
|
townRegion.Entrance = Entrance;
|
|
}
|
|
}
|
|
}
|