Exemplo n.º 1
0
        public override bool CheckLocked(Mobile from)
        {
            if (from.AccessLevel > AccessLevel.Player)
            {
                return(false);
            }

            if (!TreasureMapInfo.NewSystem && Level == 0)
            {
                if (Guardians.Any(g => g.Alive))
                {
                    from.SendLocalizedMessage(1046448); // You must first kill the guardians before you may open this chest.
                    return(true);
                }

                LockPick(from);
                return(false);
            }
            else if (CanOpen(from))
            {
                return(base.CheckLocked(from));
            }

            return(true);
        }
Exemplo n.º 2
0
        public bool CheckReset()
        {
            if (GetPlayerCount() == 0 || Guardians == null || Guardians.Count == 0 || !Guardians.Any(x => !x.Deleted))
            {
                Reset();
                return(true);
            }

            return(false);
        }