예제 #1
0
        public unsafe static void Initialize()
        {
            if (_initialized)
            {
                return;
            }

            _initialized = true;

            var cacheptr = new IntPtr(*(int *)new IntPtr(0x00837bac).ToPointer());

            _DBCache    = Portaled.Interop.DBCache.__CreateInstance(cacheptr);
            _AsyncCache = _DBCache.AsyncCache;

            var caches     = new Dictionary <uint, Portaled.Interop.DBOCache>();
            var cachesList = new List <DBCache>();

            for (uint i = 0; i < 200; i++)
            {
                var qdid1  = new Portaled.Interop.QualifiedDataID(0, i);
                var ocache = _AsyncCache.GetDBOCache(qdid1);
                if (ocache != null)
                {
                    SetupCache(i, ocache);
                }
            }

            StringBuilder sb = new StringBuilder();

            foreach (var cache in cachesList)
            {
                sb.AppendLine($"{cache.DBType},{cache.Allocator.ToInt32().ToString("X4")}");
            }
            var s = sb.ToString();
        }
예제 #2
0
        public unsafe static void Initialize()
        {
            if (_initialized)
            {
                return;
            }

            _initialized = true;

            dataTypesLoadedAsyncCache = new List <uint>()
            {
                1, 2, 3, 6, 7, 8, 10, 11, 12, 14, 26, 27, 34, 35, 36, 37, 38, 40, 42, 43, 44, 46, 49,
                0x10000002, 0x10000003, 0x10000004, 0x10000005, 0x10000006, 0x10000009, 0x1000000c, 0x10000010, 0x1000001d
            };

            var cacheptr = new IntPtr(*(int *)new IntPtr(0x00837bac).ToPointer());

            _DBCache    = Portaled.Interop.DBCache.__CreateInstance(cacheptr);
            _AsyncCache = _DBCache.AsyncCache;

            var caches     = new Dictionary <uint, Portaled.Interop.DBOCache>();
            var cachesList = new List <DBCache>();

            for (uint i = 0; i < 200; i++)
            {
                var qdid1  = new Portaled.Interop.QualifiedDataID(0, i);
                var ocache = _AsyncCache.GetDBOCache(qdid1);
                if (ocache != null)
                {
                    SetupCache(i, ocache);
                }
            }

            StringBuilder sb = new StringBuilder();

            foreach (var cache in cachesList)
            {
                sb.AppendLine($"{cache.DBType},{cache.Allocator.ToInt32().ToString("X4")}");
            }
            var s = sb.ToString();
        }