young player protection is ignored in champ spawns
Changed default restart time to 10 minutes.
This commit is contained in:
parent
c1a0fa6dcb
commit
5fc2c7cbf9
4 changed files with 22 additions and 8 deletions
|
|
@ -4,6 +4,9 @@ using System.Collections.Generic;
|
|||
using System.Xml;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Gumps;
|
||||
|
||||
|
||||
namespace Server.Regions
|
||||
{
|
||||
|
|
@ -16,6 +19,8 @@ namespace Server.Regions
|
|||
|
||||
public class BaseRegion : Region
|
||||
{
|
||||
public virtual bool YoungProtected { get { return true; } }
|
||||
|
||||
public static void Configure()
|
||||
{
|
||||
Region.DefaultRegionType = typeof( BaseRegion );
|
||||
|
|
@ -116,6 +121,17 @@ namespace Server.Regions
|
|||
return false;
|
||||
}
|
||||
|
||||
public override void OnEnter(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile && ((PlayerMobile)m).Young)
|
||||
{
|
||||
if(!this.YoungProtected)
|
||||
{
|
||||
m.SendGump(new YoungDungeonWarning());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool AcceptsSpawnsFrom( Region region )
|
||||
{
|
||||
if ( region == this || !m_ExcludeFromParentSpawns )
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ namespace Server.Regions
|
|||
{
|
||||
public class DungeonRegion : BaseRegion
|
||||
{
|
||||
public override bool YoungProtected { get { return false; } }
|
||||
|
||||
private Point3D m_EntranceLocation;
|
||||
private Map m_EntranceMap;
|
||||
|
||||
|
|
@ -30,12 +32,6 @@ namespace Server.Regions
|
|||
return false;
|
||||
}
|
||||
|
||||
public override void OnEnter( Mobile m )
|
||||
{
|
||||
if ( m is PlayerMobile && ((PlayerMobile)m).Young )
|
||||
m.SendGump( new YoungDungeonWarning() );
|
||||
}
|
||||
|
||||
public override void AlterLightLevel( Mobile m, ref int global, ref int personal )
|
||||
{
|
||||
global = LightCycle.DungeonLevel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue