Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -3,36 +3,38 @@ using Server.Regions;
|
|||
|
||||
namespace Server.Factions
|
||||
{
|
||||
public class StrongholdRegion : BaseRegion
|
||||
{
|
||||
public Faction Faction { get; set; }
|
||||
public class StrongholdRegion : BaseRegion
|
||||
{
|
||||
public StrongholdRegion(Faction faction) : base(faction.Definition.FriendlyName, Faction.Facet, DefaultPriority,
|
||||
faction.Definition.Stronghold.Area)
|
||||
{
|
||||
Faction = faction;
|
||||
|
||||
public StrongholdRegion( Faction faction ) : base( faction.Definition.FriendlyName, Faction.Facet, DefaultPriority, faction.Definition.Stronghold.Area )
|
||||
{
|
||||
Faction = faction;
|
||||
Register();
|
||||
}
|
||||
|
||||
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;
|
||||
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.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;
|
||||
}
|
||||
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 );
|
||||
}
|
||||
return Faction.Find(m, true, true) != null;
|
||||
}
|
||||
|
||||
public override bool AllowHousing( Mobile from, Point3D p )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
public override bool AllowHousing(Mobile from, Point3D p)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue