Beispiel #1
0
 private void AddResPatchDownload(UpdateManager.PatchFileType fileType, UpdateManager.ResPathDir dir, string version, UpdateManager.FileBaseInfo fbi)
 {
     UpdateManager.DownloadFileInfo info = new UpdateManager.DownloadFileInfo
     {
         FileType       = fileType,
         Url            = this.GetResPatchUrl(dir, version),
         LocalPath      = this.GetResPatchPath(dir, version),
         TargetBaseInfo = fbi
     };
     this.UpdateInfo.AddDownloadFile(info);
 }
Beispiel #2
0
    private string GetResPatchRelPath(UpdateManager.ResPathDir type, string version)
    {
        string result = string.Empty;

        switch (type)
        {
        case UpdateManager.ResPathDir.corePatch:
        case UpdateManager.ResPathDir.extendPatch:
            result = string.Format("{0}/{1}/{2}.zip", type, GameManager.Instance.ResVersion, version);
            break;

        case UpdateManager.ResPathDir.extend:
            result = string.Format("{0}/{1}.zip", type, version);
            break;

        case UpdateManager.ResPathDir.config:
            result = string.Format("config/{0}.json", GameManager.Instance.ResVersion);
            break;
        }
        return(result);
    }
Beispiel #3
0
    private string GetResPatchUrl(UpdateManager.ResPathDir type, string version)
    {
        string resPatchRelPath = this.GetResPatchRelPath(type, version);

        return(GameManager.Instance.GetResPatchUrl(resPatchRelPath));
    }
Beispiel #4
0
 private string GetResPatchPath(UpdateManager.ResPathDir type, string version)
 {
     return(PathSystem.GetPath(PathType.ResPatch, this.GetResPatchRelPath(type, version)));
 }
Beispiel #5
0
 private string GetResPatchDir(UpdateManager.ResPathDir type)
 {
     return(PathSystem.GetPath(PathType.ResPatch, type.ToString()));
 }