Пример #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);
        }
Пример #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);
        }
Пример #3
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;
		}
Пример #4
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;
		}