Exemplo n.º 1
0
        private ObjectTypeFlags ConvertObjectTypeFlags(ObjectTypeFlags data, GameCacheContextHaloOnline srcCacheContext, GameCacheContextHaloOnline destCacheContext)
        {
            if (destCacheContext.Version < CacheVersion.HaloOnline449175)
            {
                if (!Enum.TryParse(data.HaloOnline.ToString(), out data.Halo3ODST))
                {
                    throw new FormatException(destCacheContext.Version.ToString());
                }
            }

            return(data);
        }
Exemplo n.º 2
0
        //----------------------------------------------------------------------------------------------------------------

        public static bool IsCodeReviewExportable(IKBObject obj)
        {
            string          name  = obj.TypeDescriptor.Name;
            ObjectTypeFlags flags = obj.TypeDescriptor.Flags;

            if ((flags & ObjectTypeFlags.Internal) != ObjectTypeFlags.Internal)
            {
                // export all non internal types
                return(true);
            }

            // exclude all internal types, except for a few
            if (
                obj.Type == ObjClass.Table ||
                obj.Type == ObjClass.Attribute ||
                obj.Type == ObjClass.Index ||
                false
                )
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 3
0
 public bool IsA(ObjectTypeFlags flags)
 {
     return((GetValue <int>(CGObjectData.Type) & (int)flags) != 0);
 }