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
|
|
@ -1,69 +1,70 @@
|
|||
using Server.Factions;
|
||||
using Server.Mobiles;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Engines.ConPVP
|
||||
{
|
||||
public class SafeZone : GuardedRegion
|
||||
{
|
||||
public static readonly int SafeZonePriority = HouseRegion.HousePriority + 1;
|
||||
public class SafeZone : GuardedRegion
|
||||
{
|
||||
public static readonly int SafeZonePriority = HouseRegion.HousePriority + 1;
|
||||
|
||||
/*public override bool AllowReds => true;*/
|
||||
/*public override bool AllowReds => true;*/
|
||||
|
||||
public SafeZone( Rectangle2D area, Point3D goloc, Map map, bool isGuarded ) : base( null, map, SafeZonePriority, area )
|
||||
{
|
||||
GoLocation = goloc;
|
||||
public SafeZone(Rectangle2D area, Point3D goloc, Map map, bool isGuarded) : base(null, map, SafeZonePriority, area)
|
||||
{
|
||||
GoLocation = goloc;
|
||||
|
||||
Disabled = !isGuarded;
|
||||
Disabled = !isGuarded;
|
||||
|
||||
Register();
|
||||
}
|
||||
Register();
|
||||
}
|
||||
|
||||
public override bool AllowHousing( Mobile from, Point3D p )
|
||||
{
|
||||
if ( from.AccessLevel < AccessLevel.GameMaster )
|
||||
return false;
|
||||
public override bool AllowHousing(Mobile from, Point3D p)
|
||||
{
|
||||
if (from.AccessLevel < AccessLevel.GameMaster)
|
||||
return false;
|
||||
|
||||
return base.AllowHousing( from, p );
|
||||
}
|
||||
return base.AllowHousing(from, p);
|
||||
}
|
||||
|
||||
public override bool OnMoveInto( Mobile m, Direction d, Point3D newLocation, Point3D oldLocation )
|
||||
{
|
||||
if ( m.Player && Factions.Sigil.ExistsOn( m ) )
|
||||
{
|
||||
m.SendMessage( 0x22, "You are holding a sigil and cannot enter this zone." );
|
||||
return false;
|
||||
}
|
||||
public override bool OnMoveInto(Mobile m, Direction d, Point3D newLocation, Point3D oldLocation)
|
||||
{
|
||||
if (m.Player && Sigil.ExistsOn(m))
|
||||
{
|
||||
m.SendMessage(0x22, "You are holding a sigil and cannot enter this zone.");
|
||||
return false;
|
||||
}
|
||||
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
|
||||
if ( pm == null && m is BaseCreature bc && bc.Summoned )
|
||||
pm = bc.SummonMaster as PlayerMobile;
|
||||
if (pm == null && m is BaseCreature bc && bc.Summoned)
|
||||
pm = bc.SummonMaster as PlayerMobile;
|
||||
|
||||
if ( pm?.DuelContext != null && pm.DuelContext.StartedBeginCountdown )
|
||||
return true;
|
||||
if (pm?.DuelContext != null && pm.DuelContext.StartedBeginCountdown)
|
||||
return true;
|
||||
|
||||
if ( DuelContext.CheckCombat( m ) )
|
||||
{
|
||||
m.SendMessage( 0x22, "You have recently been in combat and cannot enter this zone." );
|
||||
return false;
|
||||
}
|
||||
if (DuelContext.CheckCombat(m))
|
||||
{
|
||||
m.SendMessage(0x22, "You have recently been in combat and cannot enter this zone.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.OnMoveInto( m, d, newLocation, oldLocation );
|
||||
}
|
||||
return base.OnMoveInto(m, d, newLocation, oldLocation);
|
||||
}
|
||||
|
||||
public override void OnEnter( Mobile m )
|
||||
{
|
||||
m.SendMessage( "You have entered a dueling safezone. No combat other than duels are allowed in this zone." );
|
||||
}
|
||||
public override void OnEnter(Mobile m)
|
||||
{
|
||||
m.SendMessage("You have entered a dueling safezone. No combat other than duels are allowed in this zone.");
|
||||
}
|
||||
|
||||
public override void OnExit( Mobile m )
|
||||
{
|
||||
m.SendMessage( "You have left a dueling safezone. Combat is now unrestricted." );
|
||||
}
|
||||
public override void OnExit(Mobile m)
|
||||
{
|
||||
m.SendMessage("You have left a dueling safezone. Combat is now unrestricted.");
|
||||
}
|
||||
|
||||
public override bool CanUseStuckMenu( Mobile m )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
public override bool CanUseStuckMenu(Mobile m)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue