public bool Validate() { object root = RootParent; Mobile from = root as Mobile; if (from != null) { PlayerMobile pm = from as PlayerMobile; AccessLevel level = from.AccessLevel; if (pm != null) { AccessLevelMod mod = AccessLevelToggler.GetMod(pm); if (mod != null) { level = mod.Level; } } if (level < m_AccessLevel) { Delete(); return(false); } } return(true); }
public override bool VerifyMove(Mobile from) { PlayerMobile pm = from as PlayerMobile; AccessLevel level = from.AccessLevel; if (pm != null) { AccessLevelMod mod = AccessLevelToggler.GetMod(pm); if (mod != null) { level = mod.Level; } } return(level >= m_AccessLevel); }
public override bool OnEquip(Mobile from) { PlayerMobile pm = from as PlayerMobile; AccessLevel level = from.AccessLevel; if (pm != null) { AccessLevelMod mod = AccessLevelToggler.GetMod(pm); if (mod != null) { level = mod.Level; } } if (level < m_AccessLevel) { from.SendMessage("You may not wear this."); return(false); } return(true); }