示例#1
0
        public RemnantSave(string path)
        {
            if (!Directory.Exists(path))
            {
                throw new Exception(path + " does not exist.");
            }

            if (File.Exists(path + "\\profile.sav"))
            {
                this.saveType    = RemnantSaveType.Normal;
                this.profileFile = "profile.sav";
            }
            else
            {
                var winFiles = Directory.GetFiles(path, "container.*");
                if (winFiles.Length > 0)
                {
                    this.winSave  = new WindowsSave(winFiles[0]);
                    this.saveType = RemnantSaveType.WindowsStore;
                    profileFile   = winSave.Profile;
                }
                else
                {
                    throw new Exception(path + " is not a valid save.");
                }
            }
            this.savePath  = path;
            saveCharacters = RemnantCharacter.GetCharactersFromSave(this, RemnantCharacter.CharacterProcessingMode.NoEvents);
        }
示例#2
0
 public RemnantSave(string saveProfilePath)
 {
     if (!saveProfilePath.EndsWith("profile.sav"))
     {
         if (File.Exists(saveProfilePath + "\\profile.sav"))
         {
             saveProfilePath += "\\profile.sav";
         }
         else
         {
             throw new Exception(saveProfilePath + " is not a valid save.");
         }
     }
     else if (!File.Exists(saveProfilePath))
     {
         throw new Exception(saveProfilePath + " does not exist.");
     }
     this.profilePath = saveProfilePath;
     saveCharacters   = RemnantCharacter.GetCharactersFromSave(this.SaveFolderPath, RemnantCharacter.CharacterProcessingMode.NoEvents);
 }
示例#3
0
 public void UpdateCharacters(RemnantCharacter.CharacterProcessingMode mode)
 {
     saveCharacters = RemnantCharacter.GetCharactersFromSave(this.SaveFolderPath, mode);
 }
示例#4
0
 public void UpdateCharacters()
 {
     saveCharacters = RemnantCharacter.GetCharactersFromSave(this.SaveFolderPath);
 }
示例#5
0
 public void UpdateCharacters()
 {
     saveCharacters = RemnantCharacter.GetCharactersFromSave(this);
 }