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); }
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); }
private string GetResPatchUrl(UpdateManager.ResPathDir type, string version) { string resPatchRelPath = this.GetResPatchRelPath(type, version); return(GameManager.Instance.GetResPatchUrl(resPatchRelPath)); }
private string GetResPatchPath(UpdateManager.ResPathDir type, string version) { return(PathSystem.GetPath(PathType.ResPatch, this.GetResPatchRelPath(type, version))); }
private string GetResPatchDir(UpdateManager.ResPathDir type) { return(PathSystem.GetPath(PathType.ResPatch, type.ToString())); }