private static void CheckGuarded_OnCommand(CommandEventArgs e) { Mobile from = e.Mobile; GuardedRegion reg = (GuardedRegion)from.Region.GetRegion(typeof(GuardedRegion)); if (reg == null) { from.SendMessage("You are not in a guardable region."); } else if (reg.Disabled) { from.SendMessage("The guards in this region have been disabled."); } else { from.SendMessage("This region is actively guarded."); } }
public static GuardedRegion Disable(GuardedRegion reg) { reg.Disabled = true; return(reg); }