Exemplo n.º 1
0
        public void ReadCache(BinaryReader rd)
        {
            // Determine cache type
            rd.BaseStream.Seek(0, SeekOrigin.Begin);
            var magicBuf = rd.ReadBytes(4);

            Array.Reverse(magicBuf);
            string magic = Encoding.ASCII.GetString(magicBuf);

            // Populate cache of proper type
            switch (magic)
            {
            case "WMOB":
                CreatureCacheReader = new CacheReader <CreatureCache>(rd);
                break;

            case "WGOB":
                GameObjectCacheReader = new CacheReader <GameObjectCache>(rd);
                break;

            case "WQST":
                QuestCacheReader = new CacheReader <QuestCache>(rd);
                break;

            default:
                return;
            }
        }
Exemplo n.º 2
0
 public MultiCacheReader()
 {
     CreatureCacheReader   = null;
     GameObjectCacheReader = null;
     QuestCacheReader      = null;
 }