Beispiel #1
0
        public bool RegisterGuard(BaseFactionGuard guard)
        {
            if (guard == null)
            {
                return(false);
            }

            GuardList guardList = FindGuardList(guard.GetType());

            if (guardList == null)
            {
                return(false);
            }

            guardList.Guards.Add(guard);
            return(true);
        }
Beispiel #2
0
        public bool UnregisterGuard(BaseFactionGuard guard)
        {
            if (guard == null)
            {
                return(false);
            }

            GuardList guardList = FindGuardList(guard.GetType());

            if (guardList == null)
            {
                return(false);
            }

            if (!guardList.Guards.Contains(guard))
            {
                return(false);
            }

            guardList.Guards.Remove(guard);
            return(true);
        }