From e40233a6978055f0fa7ff5f1a4293a4e7f927ac2 Mon Sep 17 00:00:00 2001 From: renzis <hhsdsryx@qq.com> Date: Fri, 20 Dec 2024 21:38:35 +0800 Subject: [PATCH] Fix game updates compatibility issue --- .../Game/UI/Screens/Events/SkillScreenEvents.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/MultiplayerMod/Game/UI/Screens/Events/SkillScreenEvents.cs b/src/MultiplayerMod/Game/UI/Screens/Events/SkillScreenEvents.cs index 4489e437..4ac2d909 100644 --- a/src/MultiplayerMod/Game/UI/Screens/Events/SkillScreenEvents.cs +++ b/src/MultiplayerMod/Game/UI/Screens/Events/SkillScreenEvents.cs @@ -1,4 +1,4 @@ -using System; +using System; using HarmonyLib; using MultiplayerMod.ModRuntime.Context; @@ -21,7 +21,7 @@ private static void OnHatDropEntryClick(SkillsScreen __instance, IListableOption __instance.GetMinionIdentity(__instance.currentlySelectedMinion, out var minionIdentity, out _); SetHat?.Invoke( minionIdentity, - (skill as SkillListable)?.skillHat + (skill as HatListable)?.hat ); } @@ -35,9 +35,9 @@ private static class SkillMinionWidgetEvents { [HarmonyPatch(nameof(SkillMinionWidget.OnHatDropEntryClick))] [RequireExecutionLevel(ExecutionLevel.Game)] // ReSharper disable once UnusedMember.Local - private static void OnHatDropEntryClick(SkillMinionWidget __instance, IListableOption skill) { + private static void OnHatDropEntryClick(SkillMinionWidget __instance, IListableOption hatOption) { __instance.skillsScreen.GetMinionIdentity(__instance.assignableIdentity, out var minionIdentity, out _); - SetHat?.Invoke(minionIdentity, (skill as SkillListable)?.skillHat); + SetHat?.Invoke(minionIdentity, (hatOption as HatListable)?.hat); } }