static FileManager() { Tracer.Debug("Initializing UOData. Is64Bit = {0}", Is64Bit); Tracer.Debug("Looking for UO Installation:"); if (Settings.UltimaOnline.DataDirectory != null && Directory.Exists(Settings.UltimaOnline.DataDirectory)) { Tracer.Debug("Settings: {0}", Settings.UltimaOnline.DataDirectory); m_FileDirectory = Settings.UltimaOnline.DataDirectory; m_isDataPresent = true; } else { for (int i = 0; i < m_knownRegkeys.Length; i++) { string exePath = GetExePath(Is64Bit ? $"Wow6432Node\\{m_knownRegkeys[i]}" : m_knownRegkeys[i]); if (exePath != null && Directory.Exists(exePath)) { if (IsClientIsCompatible(exePath)) { Tracer.Debug($"Compatible: {exePath}"); Settings.UltimaOnline.DataDirectory = exePath; m_FileDirectory = exePath; m_isDataPresent = true; } else { Tracer.Debug($"Incompatible: {exePath}"); } } } } if (m_FileDirectory == null) { m_isDataPresent = false; } else { Tracer.Debug(string.Empty); Tracer.Debug($"Selected: {m_FileDirectory}"); string clientVersion = string.Join(".", ClientVersion.ClientExe); string patchVersion = string.Join(".", Settings.UltimaOnline.PatchVersion); Tracer.Debug($"Client.Exe version: {clientVersion}; Patch version reported to server: {patchVersion}"); if (!ClientVersion.EqualTo(Settings.UltimaOnline.PatchVersion, ClientVersion.DefaultVersion)) { Tracer.Warn("Note from ZaneDubya: I will not support any code where the Patch version is not {0}", string.Join(".", ClientVersion.DefaultVersion)); } } }
static FileManager() { var ultimaOnline = UltimaSettings.UltimaOnline; Utils.Log($"Initializing UO Data. Is64Bit = {Is64Bit}"); Utils.Log("Looking for UO Installation:"); if (ultimaOnline.DataDirectory != null && Directory.Exists(ultimaOnline.DataDirectory)) { Utils.Log($"Settings: {ultimaOnline.DataDirectory}"); _fileDirectory = ultimaOnline.DataDirectory; _isDataPresent = true; } else { for (var i = 0; i < _knownRegkeys.Length; i++) { var exePath = GetExePath(Is64Bit ? $"Wow6432Node\\{_knownRegkeys[i]}" : _knownRegkeys[i]); if (exePath != null && Directory.Exists(exePath)) { if (IsClientIsCompatible(exePath)) { Utils.Log($"Compatible: {exePath}"); ultimaOnline.DataDirectory = exePath; _fileDirectory = exePath; _isDataPresent = true; } else { Utils.Log($"Incompatible: {exePath}"); } } } } if (_fileDirectory == null) { _isDataPresent = false; } else { Utils.Log(string.Empty); Utils.Log($"Selected: {_fileDirectory}"); var clientVersion = string.Join(".", ClientVersion.ClientExe); var patchVersion = string.Join(".", ultimaOnline.PatchVersion); Utils.Log($"Client.Exe version: {clientVersion}; Patch version reported to server: {patchVersion}"); if (!ClientVersion.EqualTo(ultimaOnline.PatchVersion, ClientVersion.DefaultVersion)) { Utils.Warning($"Note from ZaneDubya: I will not support any code where the Patch version is not {string.Join(".", ClientVersion.DefaultVersion)}"); } } }