Convert Regions/Spawns to JSON (#138)

This commit is contained in:
Kamron Batman 2020-05-26 00:34:29 -07:00 • committed by GitHub
parent b8316e9202
commit 390f30e706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
117 changed files with 97306 additions and 4848 deletions

View file

@ -9,6 +9,7 @@ using Server.Engines.PartySystem;
using Server.Engines.Quests;
using Server.Engines.Quests.Doom;
using Server.Engines.Quests.Haven;
using Server.Engines.Spawners;
using Server.Ethics;
using Server.Factions;
using Server.Items;
@ -2688,7 +2689,7 @@ namespace Server.Mobiles
}
public override bool CanBeRenamedBy(Mobile from) =>
(Controlled && from == ControlMaster && !from.Region.IsPartOf<Jail>()) ||
(Controlled && from == ControlMaster && !from.Region.IsPartOf<JailRegion>()) ||
base.CanBeRenamedBy(from);
public bool SetControlMaster(Mobile m)
@ -2746,7 +2747,7 @@ namespace Server.Mobiles
{
base.OnRegionChange(Old, New);
if (Controlled && Spawner is SpawnEntry se && !se.UnlinkOnTaming && New?.AcceptsSpawnsFrom(se.Region) != true)
if (Controlled && Spawner?.UnlinkOnTaming == false && New?.AcceptsSpawnsFrom(Spawner.Region) != true)
{
Spawner.Remove(this);
Spawner = null;