Exemple #1
0
        private void ServerCoreFixBtn_Click(object sender, RoutedEventArgs e)
        {
            if (ModifySettings.ModificationSettings.ServerMultiCoreFixInstalled)
            {
                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/Mkw_Odf63XgkeF"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "ServerPatched228.zip", Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName),
                    "GameServer Vanilla", "ServerPatched228.exe", "gameserver.exe");

                ServerCoreFixBtn.SetResourceReference(ContentProperty, "String0092");

                ModifySettings.ModificationSettings.ServerMultiCoreFixInstalled = false;
            }
            else
            {
                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/_GHKuy8FdgLaAA"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "ServerPatched229.zip", Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName),
                    "GameServer Fix", "ServerPatched229.exe", "gameserver.exe");

                ServerCoreFixBtn.SetResourceReference(ContentProperty, "String0093");

                ModifySettings.ModificationSettings.ServerMultiCoreFixInstalled = true;
            }
        }
Exemple #2
0
        public static void Get(int value)
        {
            if (value == 0)
            {
                ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "RU");

                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/sKUKqp3W3XgcFP"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "GameLangRu.zip", "scripts\\ru", "LangRu",
                    "scripts\\ru\\globalru.res", "scripts\\ru\\global.res");
            }
            else if (value == 1)
            {
                ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "US");

                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/1sni8lWA3XgcFo"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "GameLangUs.zip", "scripts\\us", "LangUs",
                    "scripts\\us\\globalus.res", "scripts\\us\\global.res");
            }
            else if (value == 2)
            {
                ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "DE");

                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/ekWsMxz13XgcEr"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "GameLangDe.zip", "scripts\\de", "LangDe",
                    "scripts\\de\\globalde.res", "scripts\\de\\global.res");
            }
            else if (value == 3)
            {
                ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "SP");

                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/5n-Vslep3XgcFb"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "GameLangSp.zip", "scripts\\sp", "LangSp",
                    "scripts\\sp\\globalsp.res", "scripts\\sp\\global.res");
            }
            else if (value == 4)
            {
                ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "FR");

                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/2XGSFLVL3XgcF5"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "GameLangFr.zip", "scripts\\fr", "LangFr",
                    "scripts\\fr\\globalfr.res", "scripts\\fr\\global.res");
            }
        }
Exemple #3
0
        public static void Get(int value)
        {
            if (value == 0)
            {
                ModifySettings.ModificationSettings.SacredVoiceoverLanguage = "RU";

                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/MHPKgQql3Xg8Ek"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "GameSoundRu.zip", "PAK", "SoundRu",
                    "PAK\\soundru.pak", "PAK\\sound.pak");
            }
            else if (value == 1)
            {
                ModifySettings.ModificationSettings.SacredVoiceoverLanguage = "US";

                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/cZRhldb-3Xg9fw"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "GameSoundUs.zip", "PAK", "SoundUs",
                    "PAK\\soundus.pak", "PAK\\sound.pak");
            }
            else if (value == 2)
            {
                ModifySettings.ModificationSettings.SacredVoiceoverLanguage = "DE";

                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/pneWkQ1b3Xg6mG"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "GameSoundDe.zip", "PAK", "SoundDe",
                    "PAK\\soundde.pak", "PAK\\sound.pak");
            }
            else if (value == 3)
            {
                ModifySettings.ModificationSettings.SacredVoiceoverLanguage = "SP";

                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/maW7dmcv3Xg8cY"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "GameSoundSp.zip", "PAK", "SoundSp",
                    "PAK\\soundsp.pak", "PAK\\sound.pak");
            }
        }
Exemple #4
0
        private void Sacred229PathBtn_Click(object sender, RoutedEventArgs e)
        {
            if (ModifySettings.ModificationSettings.SacredUnofficialPatchInstalled)
            {
                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/WbF1fYcOViNghQ"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "SacredPatched228.zip", Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName),
                    "2.28.01 Patch", "SacredPatched228.exe", Settings.SacredExecutableFileName);

                string[] text = File.ReadAllLines(Settings.SacredConfigurationFile, Encoding.ASCII);

                string prefix = "LANGUAGE : ";

                string line = text.FirstOrDefault(x => x.StartsWith(prefix));

                if (line == null)
                {
                    switch (MainWindow.ChatStgOne.UiLanguageCmbBox.SelectedIndex)
                    {
                    case 0: ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "RU"); break;

                    case 1: ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "US"); break;

                    case 2: ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "DE"); break;

                    case 3: ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "SP"); break;

                    case 4: ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "FR"); break;
                    }
                }

                Sacred229PathBtn.SetResourceReference(ContentProperty, "String0090");

                ModifySettings.ModificationSettings.SacredUnofficialPatchInstalled = false;
            }
            else
            {
                GetSacredGameComponentFiles.GetComponent(
                    new Uri("https://getfile.dokpub.com/yandex/get/https://yadi.sk/d/P-gzohuQ3XgkfQ"),
                    Environment.ExpandEnvironmentVariables("%tmp%"),
                    "SacredPatched22914.zip", Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName),
                    "2.29.14 Patch", "SacredPatched22914.exe", Settings.SacredExecutableFileName);

                string[] text = File.ReadAllLines(Settings.SacredConfigurationFile, Encoding.ASCII);

                string prefix = "LANGUAGE : ";

                string line = text.FirstOrDefault(x => x.StartsWith(prefix));

                if (line == null)
                {
                    switch (MainWindow.ChatStgOne.UiLanguageCmbBox.SelectedIndex)
                    {
                    case 0: ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "RU"); break;

                    case 1: ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "US"); break;

                    case 2: ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "DE"); break;

                    case 3: ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "SP"); break;

                    case 4: ChangeSacredGameSettingsValue.ChangeSettingValue("LANGUAGE", "FR"); break;
                    }
                }

                Sacred229PathBtn.SetResourceReference(ContentProperty, "String0091");

                ModifySettings.ModificationSettings.SacredUnofficialPatchInstalled = true;
            }
        }