using Server;
using Server.Mobiles;
using Server.Spells;
using Server.Spells.First;
using Server.Spells.Third;
using Server.Spells.Fourth;
using Server.Spells.Fifth;
using Server.Spells.Sixth;
using Server.Spells.Seventh;
using Server.Spells.Eighth;
using Server.Spells.Chivalry;
using Server.SkillHandlers;
namespace Server.Regions
{
public class CemetaryRegion : BaseRegion
{
public CemetaryRegion(XmlElement xml, Map map, Region parent)
: base(xml, map, parent)
{
}
public override void OnEnter(Mobile m)
{
m.SendMessage("You enter the cemetary.");
//m.SendLocalizedMessage(1077179); // You are infused with the intense energy of this area.
//Effects.PlaySound(m.Location, m.Map, 0x0F7);
base.OnEnter(m);
}
public override void OnExit(Mobile m)
{
m.SendMessage("You exit the cemetary.");
//m.SendMessage("The intense energy dissipates.");
//Effects.PlaySound(m.Location, m.Map, 0x0F8);
base.OnExit(m);
}
public override bool AllowHousing(Mobile from, Point3D p)
{
if (from.AccessLevel == AccessLevel.Player)
return false;
else
return base.AllowHousing(from, p);
}
//==Cemetary is always NightLevel...see LightCycle.cs==//
public override void AlterLightLevel(Mobile m, ref int global, ref int personal)
{
global = LightCycle.NightLevel;
personal = 1;//Adjust Light Level [Darkest = 0]
}
public override bool OnBeginSpellCast(Mobile m, ISpell s)
{
if ((s is NightSightSpell) && m.AccessLevel == AccessLevel.Player)
{
m.SendMessage("That spell does not seem to work in this place.");
return false;
}
else
{
return base.OnBeginSpellCast(m, s);
}
/*public override bool OnBeginSpellCast( Mobile m, ISpell s )
{
if ((s is RecallSpell || s is MarkSpell || s is GateTravelSpell || s is SacredJourneySpell) && m.AccessLevel == AccessLevel.Player)
{ m.SendMessage( "That spell does not seem to work in this place." );
return false;
}
else
{
return base.OnBeginSpellCast( m, s );
}
}*/
}
}
}