private void PrepareDlcIfNecessary(bool directDownload) { if (!(this.gclass30_0 is GClass32)) { return; } GClass32 gclass300 = (GClass32)this.gclass30_0; if (!gclass300.Boolean_2 || GClass3.smethod_3((GClass30)gclass300.Dlc) || gclass300.Dlc.GEnum2_0 != GEnum2.const_2 && !directDownload) { return; } try { GClass31 dlc = gclass300.Dlc; string str1 = System.IO.Path.Combine(this.DlcPath, "tmd"); string str2 = System.IO.Path.Combine(gclass300.Dlc.OutputPath, "title.tmd"); if (System.IO.Directory.Exists(this.DlcPath) && System.IO.File.Exists(str1) && System.IO.File.ReadAllBytes(str1).smethod_5(System.IO.File.ReadAllBytes(str2))) { return; } System.IO.Directory.CreateDirectory(this.DlcPath); dlc.method_16(this.DlcPath, false, directDownload, (IEnumerable <GClass12>)null, false); System.IO.File.Copy(str2, str1, true); } catch { } }
private void PrepareDlcIfNecessary(bool directDownload) { if (!(this.gclass30_0 is GClass32) || directDownload) { return; } GClass32 gclass300 = (GClass32)this.gclass30_0; if (!gclass300.Boolean_2 || GClass3.smethod_3((GClass30)gclass300.Dlc) || this.DlcIsInstalled()) { return; } gclass300.Dlc.method_2(this.DlcPath); }
private void PrepareUpdateIfNecessary(bool directDownload) { if (!(this.gclass30_0 is GClass32)) { return; } GClass32 gclass300 = (GClass32)this.gclass30_0; if (!gclass300.AreThereUpdates || GClass3.smethod_3((GClass30)gclass300.Updates[0])) { return; } bool flag = false; try { if (!System.IO.Directory.Exists(this.UpdatePath)) { System.IO.Directory.CreateDirectory(this.UpdatePath); } else { string str = System.IO.Path.Combine(this.UpdatePath, "meta", "meta.xml"); if (System.IO.File.Exists(str)) { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.Load(str); flag = xmlDocument.SelectSingleNode("/menu[@type=\"complex\"]/title_version[@type=\"unsignedInt\"]/text()").Value == gclass300.Updates.Last <GClass33>((Func <GClass33, bool>)(x => x.GEnum2_0 == GEnum2.const_2)).Version; } } if (flag) { return; } if (!directDownload) { gclass300.Updates.Last <GClass33>((Func <GClass33, bool>)(x => x.GEnum2_0 == GEnum2.const_2)).method_16(this.UpdatePath, false, false, (IEnumerable <GClass12>)null, false); } else { gclass300.Updates.Last <GClass33>().method_16(this.UpdatePath, false, true, (IEnumerable <GClass12>)null, false); } } catch { } }
private void PrepareUpdateIfNecessary(bool directDownload) { if (!(this.gclass30_0 is GClass32) || directDownload) { return; } GClass32 gclass300 = (GClass32)this.gclass30_0; if (!gclass300.Boolean_3 || GClass3.smethod_3((GClass30)gclass300.Updates[0])) { return; } bool flag = false; try { GClass33 gclass33 = gclass300.Updates.Last <GClass33>((Func <GClass33, bool>)(x => x.GEnum2_0 == GEnum2.const_2)); if (!Directory.Exists(this.UpdatePath)) { Directory.CreateDirectory(this.UpdatePath); } else if (this.UpdateIsInstalled() && System.IO.File.Exists(this.UpdateVersionFilePath)) { flag = System.IO.File.ReadAllText(this.UpdateVersionFilePath) == gclass33.Version; } if (flag || directDownload) { return; } gclass33.method_3(this.UpdatePath, false); FileSystem.RenameFile(Path.Combine(this.UpdatePath, "game.cxi"), "00000000.app"); System.IO.File.WriteAllText(this.UpdateVersionFilePath, gclass33.Version); } catch { } }