Esempio n. 1
0
        public GhostReplay(string file, string gameversion, bool usecache, string tempdir, byte[] cert, string pass)
        {
            PlayerInfos    = new BasicInfo();
            Header         = new ReplayHeader();
            UseCache       = usecache;
            CacheDirectory = tempdir + @"\" + Path.GetFileNameWithoutExtension(file);
            GameVersion    = gameversion;
            Signer         = new ReplaySignature(cert, pass);
            Keys           = new List <GameData>();
            Chunks         = new List <GameData>();

            FileName = file;
            if (UseCache)
            {
                if (!Directory.Exists(CacheDirectory))
                {
                    Directory.CreateDirectory(CacheDirectory);
                }
                RestoreFromCache();
            }
        }
Esempio n. 2
0
        public GhostReplay(string file, string gameversion, bool usecache, string tempdir)
        {
            IsPBE = File.Exists(tempdir + @"\ISPBE");

            PlayerInfos    = new BasicInfo();
            Header         = new ReplayHeader();
            UseCache       = usecache;
            CacheDirectory = tempdir + @"\" + Path.GetFileNameWithoutExtension(file);
            GameVersion    = gameversion;

            Keys   = new List <GameData>();
            Chunks = new List <GameData>();

            FileName = file;
            if (UseCache)
            {
                if (!Directory.Exists(CacheDirectory))
                {
                    Directory.CreateDirectory(CacheDirectory);
                }
                RestoreFromCache();
            }
        }