예제 #1
0
        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.");
            }
        }
예제 #2
0
 public static GuardedRegion Disable(GuardedRegion reg)
 {
     reg.Disabled = true;
     return(reg);
 }