예제 #1
0
		private void AdjustWoWConfig()
		{
			var wowFolder = Path.GetDirectoryName(_lockOwner.Settings.WowPath);
			var configPath = Path.Combine(wowFolder, @"Wtf\Config.wtf");
			if (!File.Exists(configPath))
			{
				_lockOwner.Profile.Log("Warning: Unable to find Wow's config.wtf file. Editing this file speeds up the login process.");
				return;
			}
			var config = new ConfigWtf(_lockOwner, configPath);
			if (HbRelogManager.Settings.AutoAcceptTosEula)
			{
				config.EnsureValue("readTOS", "1");
				config.EnsureValue("readEULA", "1");
			}
			config.EnsureValue("accountName", _lockOwner.Settings.Login);

			if (!string.IsNullOrEmpty(_lockOwner.Settings.AcountName))
				config.EnsureAccountList(_lockOwner.Settings.AcountName);
			else
				config.DeleteSetting("accountList");

			if (config.Changed)
			{
				config.Save();
			}
		}
예제 #2
0
        private void AdjustWoWConfig()
        {
            var wowFolder = Path.GetDirectoryName(_lockOwner.Settings.WowPath);
            var configPath = Path.Combine(wowFolder, @"Wtf\Config.wtf");
            if (!File.Exists(configPath))
            {
                _lockOwner.Profile.Log("Warning: Unable to find Wow's config.wtf file. Editing this file speeds up the login process.");
                return;
            }
            var config = new ConfigWtf(_lockOwner, configPath);
            config.EnsureValue("realmName", _lockOwner.Settings.ServerName);
            if (HbRelogManager.Settings.AutoAcceptTosEula)
            {
                config.EnsureValue("readTOS", "1");
                config.EnsureValue("readEULA", "1");
            }
            config.EnsureValue("accountName", _lockOwner.Settings.Login);

            if (!string.IsNullOrEmpty(_lockOwner.Settings.AcountName))
                config.EnsureAccountList(_lockOwner.Settings.AcountName);
            else
                config.DeleteSetting("accountList");

            if (config.Changed)
            {
                config.Save();
            }
        }
예제 #3
0
        private void AdjustWoWConfig()
        {
            var wowFolder  = Path.GetDirectoryName(_lockOwner.Settings.WowPath);
            var configPath = Path.Combine(wowFolder, @"Wtf\Config.wtf");

            if (!File.Exists(configPath))
            {
                _lockOwner.Profile.Log("Warning: Unable to find Wow's config.wtf file. Editing this file speeds up the login process.");
                return;
            }
            var config = new ConfigWtf(_lockOwner, configPath);

            if (HbRelogManager.Settings.AutoAcceptTosEula)
            {
                config.EnsureValue("readTOS", "1");
                config.EnsureValue("readEULA", "1");
            }
            config.EnsureValue("accountName", _lockOwner.Settings.Login);

            if (_lockOwner.Settings.Region != WowSettings.WowRegion.Auto)
            {
                string portal;
                switch (_lockOwner.Settings.Region)
                {
                case WowSettings.WowRegion.US:
                    portal = "US";
                    break;

                case WowSettings.WowRegion.EU:
                    portal = "EU";
                    break;

                case WowSettings.WowRegion.Korea:
                    portal = "KR";
                    break;

                case WowSettings.WowRegion.China:
                    portal = "CN";
                    break;

                case WowSettings.WowRegion.Taiwan:
                    portal = "TW";
                    break;

                default:
                    portal = null;
                    break;
                }

                if (portal != null)
                {
                    config.EnsureValue("portal", portal);
                }
            }

            if (!string.IsNullOrEmpty(_lockOwner.Settings.AcountName))
            {
                config.EnsureAccountList(_lockOwner.Settings.AcountName);
            }
            else
            {
                config.DeleteSetting("accountList");
            }

            if (config.Changed)
            {
                config.Save();
            }
        }