private void InitMpq() { var version = FileVersionInfo.GetVersionInfo(Path.Combine(DataPath, "Wow.exe")); if (version.FilePrivatePart > 13000 || version.FilePrivatePart < 9000) { throw new NotImplementedException("MPQ is only implemented for WOTLK (builds 9000 - 13000)"); } Files.Terrain.AdtFactory.Instance.Version = FileDataVersion.Lichking; Files.Models.ModelFactory.Instance.Version = FileDataVersion.Lichking; Files.Sky.SkyManager.InitVersion(FileDataVersion.Lichking); Version = FileDataVersion.Lichking; var mgr = new MPQ.FileManager(); mgr.LoadComplete += () => { Storage.DbcStorage.Initialize(); Storage.DbcStorage.BuildCache(); if (LoadComplete != null) { LoadComplete(); } }; Provider = mgr; mgr.InitFromPath(DataPath); }
private void InitMpq() { var version = FileVersionInfo.GetVersionInfo(Path.Combine(DataPath, "Wow.exe")); if (version.FilePrivatePart > 13000 || version.FilePrivatePart < 9000) throw new NotImplementedException("MPQ is only implemented for WOTLK (builds 9000 - 13000)"); Files.Terrain.AdtFactory.Instance.Version = FileDataVersion.Lichking; Files.Models.ModelFactory.Instance.Version = FileDataVersion.Lichking; Files.Sky.SkyManager.InitVersion(FileDataVersion.Lichking); Version = FileDataVersion.Lichking; var mgr = new MPQ.FileManager(); mgr.LoadComplete += () => { Initialized = true; if (LoadComplete != null) LoadComplete(); }; Provider = mgr; mgr.InitFromPath(DataPath); }