Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
40
Projects/Scripts/Engines/Factions/Core/StrongholdRegion.cs
Normal file
40
Projects/Scripts/Engines/Factions/Core/StrongholdRegion.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using Server.Mobiles;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Factions
|
||||
{
|
||||
public class StrongholdRegion : BaseRegion
|
||||
{
|
||||
public StrongholdRegion(Faction faction) : base(faction.Definition.FriendlyName, Faction.Facet, DefaultPriority,
|
||||
faction.Definition.Stronghold.Area)
|
||||
{
|
||||
Faction = faction;
|
||||
|
||||
Register();
|
||||
}
|
||||
|
||||
public Faction Faction{ get; set; }
|
||||
|
||||
public override bool OnMoveInto(Mobile m, Direction d, Point3D newLocation, Point3D oldLocation)
|
||||
{
|
||||
if (!base.OnMoveInto(m, d, newLocation, oldLocation))
|
||||
return false;
|
||||
|
||||
if (m.AccessLevel >= AccessLevel.Counselor || Contains(oldLocation))
|
||||
return true;
|
||||
|
||||
if (m is PlayerMobile pm && pm.DuelContext != null)
|
||||
{
|
||||
pm.SendMessage("You may not enter this area while participating in a duel or a tournament.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return Faction.Find(m, true, true) != null;
|
||||
}
|
||||
|
||||
public override bool AllowHousing(Mobile from, Point3D p)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue