From 694ae6cf519732ce464a1b044990c99d9ab2a87c Mon Sep 17 00:00:00 2001 From: ZestyTS Date: Mon, 15 Jul 2024 13:50:13 -0700 Subject: [PATCH] Gets different bases for the emulation/virtualization crowd --- UWUVCI AIO WPF/Models/MainViewModel.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/UWUVCI AIO WPF/Models/MainViewModel.cs b/UWUVCI AIO WPF/Models/MainViewModel.cs index 3e03d2f..1804b59 100644 --- a/UWUVCI AIO WPF/Models/MainViewModel.cs +++ b/UWUVCI AIO WPF/Models/MainViewModel.cs @@ -1491,7 +1491,7 @@ namespace UWUVCI_AIO_WPF } public static int GetDeterministicHashCode(string str) - { + { unchecked { int hash1 = (5381 << 16) + 5381; @@ -1803,9 +1803,12 @@ namespace UWUVCI_AIO_WPF string basePath = $@"bin\bases\"; Directory.SetCurrentDirectory(basePath); using (var client = new WebClient()) - { var fixname = name.Split('\\'); + + if (Injection.IsRunningInVirtualMachine() || Injection.IsRunningUnderWineOrSimilar()) + name = "Net6/" + name; + client.DownloadFile(getDownloadLink(name, false), fixname[fixname.Length - 1]); } } @@ -2395,7 +2398,8 @@ namespace UWUVCI_AIO_WPF } public bool checkKey(string key) { - if (GbTemp.KeyHash == key.ToLower().GetHashCode() || GbTemp.KeyHash == GetDeterministicHashCode(key.ToLower())) + var hash = GetDeterministicHashCode(key.ToLower()); + if (GbTemp.KeyHash == hash) { UpdateKeyInFile(key, $@"bin\keys\{GetConsoleOfBase(gbTemp).ToString().ToLower()}.vck", GbTemp, GetConsoleOfBase(gbTemp)); return true;