public override bool OnSkillUse(Mobile m, int skill) { bool bReturn = true; try { if (m.AccessLevel == AccessLevel.Player) { bool restricted = m_Controller.IsRestrictedSkill(skill, m); if (restricted) { m.SendMessage("You cannot use that skill here."); return(false); } } bReturn = base.OnSkillUse(m, skill); } catch (Exception e) { LogHelper.LogException(e); Console.WriteLine("Caught error in CustomRegion.OnSkillUse({0}, {1})", m.Name, skill); Console.WriteLine("Error is: {0}", e.Message); Console.WriteLine(e.StackTrace.ToString()); } return(bReturn); }
public override bool OnSkillUse(Mobile m, int skill) { bool restricted = m_Controller.IsRestrictedSkill(skill); if (!restricted || m.AccessLevel >= AccessLevel.Counselor) { return(base.OnSkillUse(m, skill)); } m.SendMessage("Thou canst not use thy skill here."); return(false); }
public override bool OnSkillUse(Mobile m, int skill) { bool restricted = m_Controller.IsRestrictedSkill(skill); if (restricted && m.AccessLevel == AccessLevel.Player) { m.SendMessage("You cannot use that skill here."); return(false); } return(base.OnSkillUse(m, skill)); }