Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

View File

@@ -0,0 +1,45 @@
using System;
using Server;
using Server.Mobiles;
using Server.Regions;
using System.Xml;
using System.Collections.Generic;
namespace Server.Engines.NewMagincia
{
public class NewMaginciaRegion : TownRegion
{
public NewMaginciaRegion(XmlElement xml, Map map, Region parent) : base(xml, map, parent)
{
}
public override bool AllowHousing(Mobile from, Point3D p)
{
MaginciaLottoSystem system = MaginciaLottoSystem.Instance;
if (system != null && system.Enabled && from.Backpack != null)
{
List<Item> items = new List<Item>();
Item[] packItems = from.Backpack.FindItemsByType(typeof(WritOfLease));
Item[] bankItems = from.BankBox.FindItemsByType(typeof(WritOfLease));
if (packItems != null && packItems.Length > 0)
items.AddRange(packItems);
if (bankItems != null && bankItems.Length > 0)
items.AddRange(bankItems);
foreach (Item item in items)
{
WritOfLease lease = item as WritOfLease;
if (lease != null && !lease.Expired && lease.Plot != null && lease.Plot.Bounds.Contains(p) && from.Map == lease.Plot.Map)
return true;
}
}
return MaginciaLottoSystem.IsFreeHousingZone(p, this.Map);
}
}
}