diff --git a/HsMod/LibHearthstone/AppsFlyer.dll b/HsMod/LibHearthstone/AppsFlyer.dll index 48b79172..d361968c 100644 Binary files a/HsMod/LibHearthstone/AppsFlyer.dll and b/HsMod/LibHearthstone/AppsFlyer.dll differ diff --git a/HsMod/LibHearthstone/Assembly-CSharp-firstpass.dll b/HsMod/LibHearthstone/Assembly-CSharp-firstpass.dll index b2f9523f..da42c2fe 100644 Binary files a/HsMod/LibHearthstone/Assembly-CSharp-firstpass.dll and b/HsMod/LibHearthstone/Assembly-CSharp-firstpass.dll differ diff --git a/HsMod/LibHearthstone/Assembly-CSharp.dll b/HsMod/LibHearthstone/Assembly-CSharp.dll index 6b91fcf9..75cd8d49 100644 Binary files a/HsMod/LibHearthstone/Assembly-CSharp.dll and b/HsMod/LibHearthstone/Assembly-CSharp.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.Commerce.Bindings.dll b/HsMod/LibHearthstone/Blizzard.Commerce.Bindings.dll index 683e37e6..ba0e1c6c 100644 Binary files a/HsMod/LibHearthstone/Blizzard.Commerce.Bindings.dll and b/HsMod/LibHearthstone/Blizzard.Commerce.Bindings.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.Commerce.Model.CSharp.dll b/HsMod/LibHearthstone/Blizzard.Commerce.Model.CSharp.dll index 2953e30e..8276bdc4 100644 Binary files a/HsMod/LibHearthstone/Blizzard.Commerce.Model.CSharp.dll and b/HsMod/LibHearthstone/Blizzard.Commerce.Model.CSharp.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.Commerce.Wrapper.dll b/HsMod/LibHearthstone/Blizzard.Commerce.Wrapper.dll index 5941573a..fe951c75 100644 Binary files a/HsMod/LibHearthstone/Blizzard.Commerce.Wrapper.dll and b/HsMod/LibHearthstone/Blizzard.Commerce.Wrapper.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.AssetLoader.dll b/HsMod/LibHearthstone/Blizzard.T5.AssetLoader.dll index 84d732c0..11b6a673 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.AssetLoader.dll and b/HsMod/LibHearthstone/Blizzard.T5.AssetLoader.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.AssetManager.dll b/HsMod/LibHearthstone/Blizzard.T5.AssetManager.dll index bb77af45..649f2868 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.AssetManager.dll and b/HsMod/LibHearthstone/Blizzard.T5.AssetManager.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.Configuration.dll b/HsMod/LibHearthstone/Blizzard.T5.Configuration.dll index 3eca4124..aefcc9d0 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.Configuration.dll and b/HsMod/LibHearthstone/Blizzard.T5.Configuration.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.Core.dll b/HsMod/LibHearthstone/Blizzard.T5.Core.dll index baaf14e4..ccf3aa52 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.Core.dll and b/HsMod/LibHearthstone/Blizzard.T5.Core.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.ErrorInterface.dll b/HsMod/LibHearthstone/Blizzard.T5.ErrorInterface.dll index 805d7538..9983b999 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.ErrorInterface.dll and b/HsMod/LibHearthstone/Blizzard.T5.ErrorInterface.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.FXBuilder.dll b/HsMod/LibHearthstone/Blizzard.T5.FXBuilder.dll index 2d6d0778..c252cc70 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.FXBuilder.dll and b/HsMod/LibHearthstone/Blizzard.T5.FXBuilder.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.FontService.dll b/HsMod/LibHearthstone/Blizzard.T5.FontService.dll index 4e50186e..bc9c4c8c 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.FontService.dll and b/HsMod/LibHearthstone/Blizzard.T5.FontService.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.Game.dll b/HsMod/LibHearthstone/Blizzard.T5.Game.dll index 0f935ff4..f456a490 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.Game.dll and b/HsMod/LibHearthstone/Blizzard.T5.Game.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.GameStringsInterface.dll b/HsMod/LibHearthstone/Blizzard.T5.GameStringsInterface.dll index 814c84bf..73b5871d 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.GameStringsInterface.dll and b/HsMod/LibHearthstone/Blizzard.T5.GameStringsInterface.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.GraphicsManagerInterface.dll b/HsMod/LibHearthstone/Blizzard.T5.GraphicsManagerInterface.dll index f8823bef..7298b280 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.GraphicsManagerInterface.dll and b/HsMod/LibHearthstone/Blizzard.T5.GraphicsManagerInterface.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.JobQueue.dll b/HsMod/LibHearthstone/Blizzard.T5.JobQueue.dll index 6a424276..ea2f7827 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.JobQueue.dll and b/HsMod/LibHearthstone/Blizzard.T5.JobQueue.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.Localization.dll b/HsMod/LibHearthstone/Blizzard.T5.Localization.dll index 08f926e3..85ea1b44 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.Localization.dll and b/HsMod/LibHearthstone/Blizzard.T5.Localization.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.Logging.dll b/HsMod/LibHearthstone/Blizzard.T5.Logging.dll index bd92bd92..ab9d1afb 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.Logging.dll and b/HsMod/LibHearthstone/Blizzard.T5.Logging.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.MaterialService.dll b/HsMod/LibHearthstone/Blizzard.T5.MaterialService.dll index 229cdefa..fb8b5a30 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.MaterialService.dll and b/HsMod/LibHearthstone/Blizzard.T5.MaterialService.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.MiniJSON.dll b/HsMod/LibHearthstone/Blizzard.T5.MiniJSON.dll index 8af7461f..e2300c74 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.MiniJSON.dll and b/HsMod/LibHearthstone/Blizzard.T5.MiniJSON.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.Network-Core.dll b/HsMod/LibHearthstone/Blizzard.T5.Network-Core.dll index dd47be68..66b0fbc5 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.Network-Core.dll and b/HsMod/LibHearthstone/Blizzard.T5.Network-Core.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.PlayMakerCustomActions.Runtime.dll b/HsMod/LibHearthstone/Blizzard.T5.PlayMakerCustomActions.Runtime.dll index d02a68db..9fabc5c1 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.PlayMakerCustomActions.Runtime.dll and b/HsMod/LibHearthstone/Blizzard.T5.PlayMakerCustomActions.Runtime.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.ServiceLocator.dll b/HsMod/LibHearthstone/Blizzard.T5.ServiceLocator.dll index 37db0777..c4882d9f 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.ServiceLocator.dll and b/HsMod/LibHearthstone/Blizzard.T5.ServiceLocator.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.UI.Core.dll b/HsMod/LibHearthstone/Blizzard.T5.UI.Core.dll index 05e8b79f..c5dcd9d1 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.UI.Core.dll and b/HsMod/LibHearthstone/Blizzard.T5.UI.Core.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.UberText.Runtime.dll b/HsMod/LibHearthstone/Blizzard.T5.UberText.Runtime.dll index 47098686..82c97337 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.UberText.Runtime.dll and b/HsMod/LibHearthstone/Blizzard.T5.UberText.Runtime.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.T5.iTween.dll b/HsMod/LibHearthstone/Blizzard.T5.iTween.dll index de802f51..6c832a04 100644 Binary files a/HsMod/LibHearthstone/Blizzard.T5.iTween.dll and b/HsMod/LibHearthstone/Blizzard.T5.iTween.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.Telemetry.Identity.dll b/HsMod/LibHearthstone/Blizzard.Telemetry.Identity.dll index 38ec6c34..074f651a 100644 Binary files a/HsMod/LibHearthstone/Blizzard.Telemetry.Identity.dll and b/HsMod/LibHearthstone/Blizzard.Telemetry.Identity.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.Telemetry.Sdk.dll b/HsMod/LibHearthstone/Blizzard.Telemetry.Sdk.dll index e9c34b1d..f9c49ea3 100644 Binary files a/HsMod/LibHearthstone/Blizzard.Telemetry.Sdk.dll and b/HsMod/LibHearthstone/Blizzard.Telemetry.Sdk.dll differ diff --git a/HsMod/LibHearthstone/Blizzard.Telemetry.StandardProtos.BlizzPbc.dll b/HsMod/LibHearthstone/Blizzard.Telemetry.StandardProtos.BlizzPbc.dll index 3efe1bb7..5245170a 100644 Binary files a/HsMod/LibHearthstone/Blizzard.Telemetry.StandardProtos.BlizzPbc.dll and b/HsMod/LibHearthstone/Blizzard.Telemetry.StandardProtos.BlizzPbc.dll differ diff --git a/HsMod/LibHearthstone/Newtonsoft.Json.dll b/HsMod/LibHearthstone/Newtonsoft.Json.dll index 17c0af46..b2869cff 100644 Binary files a/HsMod/LibHearthstone/Newtonsoft.Json.dll and b/HsMod/LibHearthstone/Newtonsoft.Json.dll differ diff --git a/HsMod/LibHearthstone/QRCoderUnity.dll b/HsMod/LibHearthstone/QRCoderUnity.dll index 6dd91d94..166a4f34 100644 Binary files a/HsMod/LibHearthstone/QRCoderUnity.dll and b/HsMod/LibHearthstone/QRCoderUnity.dll differ diff --git a/HsMod/LibHearthstone/UniSDK.NgWebView.Runtime.dll b/HsMod/LibHearthstone/UniSDK.NgWebView.Runtime.dll index e9aaac5f..45e37104 100644 Binary files a/HsMod/LibHearthstone/UniSDK.NgWebView.Runtime.dll and b/HsMod/LibHearthstone/UniSDK.NgWebView.Runtime.dll differ diff --git a/HsMod/LibHearthstone/Unity.Mathematics.dll b/HsMod/LibHearthstone/Unity.Mathematics.dll index 6da5d2db..7858e5fd 100644 Binary files a/HsMod/LibHearthstone/Unity.Mathematics.dll and b/HsMod/LibHearthstone/Unity.Mathematics.dll differ diff --git a/HsMod/LibHearthstone/Unity.RenderPipeline.Universal.ShaderLibrary.dll b/HsMod/LibHearthstone/Unity.RenderPipeline.Universal.ShaderLibrary.dll index 47c98a8a..2a7302eb 100644 Binary files a/HsMod/LibHearthstone/Unity.RenderPipeline.Universal.ShaderLibrary.dll and b/HsMod/LibHearthstone/Unity.RenderPipeline.Universal.ShaderLibrary.dll differ diff --git a/HsMod/LibHearthstone/Unity.RenderPipelines.Core.Runtime.dll b/HsMod/LibHearthstone/Unity.RenderPipelines.Core.Runtime.dll index 3425e742..86b40c6d 100644 Binary files a/HsMod/LibHearthstone/Unity.RenderPipelines.Core.Runtime.dll and b/HsMod/LibHearthstone/Unity.RenderPipelines.Core.Runtime.dll differ diff --git a/HsMod/LibHearthstone/Unity.RenderPipelines.Universal.Runtime.dll b/HsMod/LibHearthstone/Unity.RenderPipelines.Universal.Runtime.dll index ddfa7c2d..c48f7a60 100644 Binary files a/HsMod/LibHearthstone/Unity.RenderPipelines.Universal.Runtime.dll and b/HsMod/LibHearthstone/Unity.RenderPipelines.Universal.Runtime.dll differ diff --git a/HsMod/LibHearthstone/Unity.Timeline.dll b/HsMod/LibHearthstone/Unity.Timeline.dll index 725d7dbb..d9a4134d 100644 Binary files a/HsMod/LibHearthstone/Unity.Timeline.dll and b/HsMod/LibHearthstone/Unity.Timeline.dll differ diff --git a/HsMod/LibHearthstone/Unity.ZombieObjectDetector.Runtime.dll b/HsMod/LibHearthstone/Unity.ZombieObjectDetector.Runtime.dll index b5552ebc..d6be77ae 100644 Binary files a/HsMod/LibHearthstone/Unity.ZombieObjectDetector.Runtime.dll and b/HsMod/LibHearthstone/Unity.ZombieObjectDetector.Runtime.dll differ diff --git a/HsMod/LibHearthstone/UnityEngine.AnimationModule.dll b/HsMod/LibHearthstone/UnityEngine.AnimationModule.dll index c6306b9c..191931ad 100644 Binary files a/HsMod/LibHearthstone/UnityEngine.AnimationModule.dll and b/HsMod/LibHearthstone/UnityEngine.AnimationModule.dll differ diff --git a/HsMod/LibHearthstone/UnityEngine.CoreModule.dll b/HsMod/LibHearthstone/UnityEngine.CoreModule.dll index f2bd89b2..3437ec6f 100644 Binary files a/HsMod/LibHearthstone/UnityEngine.CoreModule.dll and b/HsMod/LibHearthstone/UnityEngine.CoreModule.dll differ diff --git a/HsMod/LibHearthstone/UnityEngine.UI.dll b/HsMod/LibHearthstone/UnityEngine.UI.dll index 0ab577e3..e9cfc5f7 100644 Binary files a/HsMod/LibHearthstone/UnityEngine.UI.dll and b/HsMod/LibHearthstone/UnityEngine.UI.dll differ diff --git a/HsMod/LibHearthstone/blizzard.bgsclient.dll b/HsMod/LibHearthstone/blizzard.bgsclient.dll index 065c6951..939037bd 100644 Binary files a/HsMod/LibHearthstone/blizzard.bgsclient.dll and b/HsMod/LibHearthstone/blizzard.bgsclient.dll differ diff --git a/HsMod/LibHearthstone/com.blizzard.mobile-unity-auth-sdk.dll b/HsMod/LibHearthstone/com.blizzard.mobile-unity-auth-sdk.dll index 8b911ade..00971587 100644 Binary files a/HsMod/LibHearthstone/com.blizzard.mobile-unity-auth-sdk.dll and b/HsMod/LibHearthstone/com.blizzard.mobile-unity-auth-sdk.dll differ diff --git a/HsMod/Patcher.cs b/HsMod/Patcher.cs index 6ef48a69..77f07288 100644 --- a/HsMod/Patcher.cs +++ b/HsMod/Patcher.cs @@ -314,7 +314,8 @@ public static bool PatchAspectRatioWithinLimit(ref bool __result, int width, int __result = true; return false; } - //移除分辨率限制V2 + //移除分辨率限制V2 + /* [HarmonyPrefix] [HarmonyPatch(typeof(ResizeManagerV2), "Update")] public static bool PatchResizeManagerV2Update(ref float ___m_minResolutionResizeDelay) @@ -322,6 +323,24 @@ public static bool PatchResizeManagerV2Update(ref float ___m_minResolutionResize ___m_minResolutionResizeDelay = UnityEngine.Time.time + 114514; return true; } + */ + // 上面的方法会导致偶尔出现炉石窗口消失,这里用transpiler修改分辨率值 + [HarmonyTranspiler] + [HarmonyPatch(typeof(ResizeManagerV2), "Update")] + public static IEnumerable Patch_ResizeManagerV2_Update(IEnumerable instructions, ILGenerator generator) + { + int counter = 0; + foreach (var code in instructions) + { + if (code.opcode == OpCodes.Ldc_I4 && code.operand is int v && v == 400) + { + // 偶数位当成 width -> 144;奇数位当成 height -> 108 + code.operand = (counter % 2 == 0) ? 144 : 108; + counter++; + } + yield return code; + } + } //命令行修改分辨率,阻止炉石自修改 [HarmonyPrefix] @@ -450,7 +469,7 @@ public static void PatchExceptionReporterControl() //屏蔽错误报告 [HarmonyPrefix] - [HarmonyPatch(typeof(Blizzard.BlizzardErrorMobile.ExceptionReporter), "ReportCaughtException", new Type[] { typeof(Exception), typeof(string)})] + [HarmonyPatch(typeof(Blizzard.BlizzardErrorMobile.ExceptionReporter), "ReportCaughtException", new Type[] { typeof(Exception) })] public static bool PatchReportCaughtException(ref Exception exception) { Utils.MyLogger(BepInEx.Logging.LogLevel.Warning, "message:" + exception.Message + "\nInnerException:\n" + exception.InnerException + "\nStackTrace:\n" + exception.StackTrace); @@ -616,14 +635,7 @@ public static void AutoClickRedundantNDE(UIBButton ___m_rerollButton, RedundantN if (!isAutoRedundantNDE.Value) return; - __instance.StartCoroutine(AutoClick(___m_rerollButton)); - } - - private static IEnumerator AutoClick(UIBButton button) - { - yield return new WaitForSeconds(1f); - button.TriggerPress(); - button.TriggerRelease(); + __instance.StartCoroutine(Utils.UIBButtonDelayClick(___m_rerollButton, 1f)); } //处理未领取的奖励 @@ -2825,13 +2837,13 @@ public static bool PatchShouldLoanerDecksBeDisplayed(ref bool __result) // 屏蔽推广活动领取的奖励 [HarmonyPostfix] [HarmonyPatch(typeof(BoosterPackReward), "ShowReward")] - public static void PatchBoosterPackReward_ShowReward(BoosterPackReward __instance) + public static void PatchBoosterPackReward_ShowReward(PegUIElement ___m_clickCatcher, BoosterPackReward __instance) { if (isIGMMessageShow.Value) return; - var miHide = AccessTools.Method(__instance.GetType(), "HideReward"); - miHide?.Invoke(__instance, null); + Utils.MyLogger(BepInEx.Logging.LogLevel.Warning, "[Patch] BoosterPackReward"); + __instance.StartCoroutine(Utils.PegUIElementDelayClick(___m_clickCatcher, 1f)); } } diff --git a/HsMod/Utils.cs b/HsMod/Utils.cs index 77034db3..c424331e 100644 --- a/HsMod/Utils.cs +++ b/HsMod/Utils.cs @@ -1274,6 +1274,20 @@ public static void Quit(int exitCode = 0) } } + public static IEnumerator PegUIElementDelayClick(PegUIElement catcher, float delay) + { + yield return new WaitForSeconds(delay); + + catcher.TriggerPress(); + catcher.TriggerRelease(); + } + public static IEnumerator UIBButtonDelayClick(UIBButton button, float delay) + { + yield return new WaitForSeconds(delay); + button.TriggerPress(); + button.TriggerRelease(); + } + public static class LeakInfo { public static void Mercenaries()