fix: Fixes region priority and resolution. (#1254)

- [X] Fixes world location JSON deserializer.
- [X] Fixes region resolver and priorities.
- [X] Removes DynamicJson from regions.
- [X] Adds missing region music.
This commit is contained in:
Kamron Batman 2022-11-21 10:38:20 -08:00 • committed by GitHub
parent 139be1bc23
commit 18c4459e6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 3809 additions and 3677 deletions

View file

@ -1,24 +1,27 @@
using System.Text.Json;
using Server.Json;
using Server.Spells.Sixth;
namespace Server.Regions
namespace Server.Regions;
public class MondainRegion : NoTravelSpellsAllowedRegion
{
public class MondainRegion : NoTravelSpellsAllowedRegion
public MondainRegion(string name, Map map, Region parent, params Rectangle3D[] area)
: base(name, map, parent, area)
{
public MondainRegion(DynamicJson json, JsonSerializerOptions options) : base(json, options)
}
public MondainRegion(string name, Map map, Region parent, int priority, params Rectangle3D[] area)
: base(name, map, parent, priority, area)
{
}
public override bool OnBeginSpellCast(Mobile m, ISpell s)
{
if (m.Player && s is MarkSpell)
{
m.SendLocalizedMessage(501802); // Thy spell doth not appear to work...
return false;
}
public override bool OnBeginSpellCast(Mobile m, ISpell s)
{
if (m.Player && s is MarkSpell)
{
m.SendLocalizedMessage(501802); // Thy spell doth not appear to work...
return false;
}
return base.OnBeginSpellCast(m, s);
}
return base.OnBeginSpellCast(m, s);
}
}