diff --git a/project/Aki.Custom/AkiCustomPlugin.cs b/project/Aki.Custom/AkiCustomPlugin.cs index 50092bd..d3fa849 100644 --- a/project/Aki.Custom/AkiCustomPlugin.cs +++ b/project/Aki.Custom/AkiCustomPlugin.cs @@ -25,7 +25,8 @@ namespace Aki.Custom new BotDifficultyPatch().Enable(); new CoreDifficultyPatch().Enable(); new OfflineRaidMenuPatch().Enable(); - new RaidSettingsWindowPatch().Enable(); + // Fixed in live, no need for patch + //new RaidSettingsWindowPatch().Enable(); new OfflineRaidSettingsMenuPatch().Enable(); new SessionIdPatch().Enable(); new VersionLabelPatch().Enable(); diff --git a/project/Aki.Custom/Patches/EasyAssetsPatch.cs b/project/Aki.Custom/Patches/EasyAssetsPatch.cs index 0597b36..9f45526 100644 --- a/project/Aki.Custom/Patches/EasyAssetsPatch.cs +++ b/project/Aki.Custom/Patches/EasyAssetsPatch.cs @@ -49,9 +49,9 @@ namespace Aki.Custom.Patches private static bool IsTargetMethod(MethodInfo mi) { var parameters = mi.GetParameters(); - return (parameters.Length == 6 - && parameters[0].Name == "bundleLock" - && parameters[1].Name == "defaultKey" + return (parameters.Length == 6 + && parameters[0].Name == "bundleLock" + && parameters[1].Name == "defaultKey" && parameters[4].Name == "shouldExclude"); } diff --git a/project/Aki.PrePatch/AkiBotsPrePatcher.cs b/project/Aki.PrePatch/AkiBotsPrePatcher.cs index 23bc1f9..42db019 100644 --- a/project/Aki.PrePatch/AkiBotsPrePatcher.cs +++ b/project/Aki.PrePatch/AkiBotsPrePatcher.cs @@ -7,8 +7,8 @@ namespace Aki.PrePatch { public static IEnumerable TargetDLLs { get; } = new[] { "Assembly-CSharp.dll" }; - public static int sptUsecValue = 32; - public static int sptBearValue = 33; + public static int sptUsecValue = 33; + public static int sptBearValue = 34; public static void Patch(ref AssemblyDefinition assembly) { diff --git a/project/Aki.SinglePlayer/Patches/RaidFix/GetNewBotTemplatesPatch.cs b/project/Aki.SinglePlayer/Patches/RaidFix/GetNewBotTemplatesPatch.cs index 42aed36..7450bfe 100644 --- a/project/Aki.SinglePlayer/Patches/RaidFix/GetNewBotTemplatesPatch.cs +++ b/project/Aki.SinglePlayer/Patches/RaidFix/GetNewBotTemplatesPatch.cs @@ -36,9 +36,10 @@ namespace Aki.SinglePlayer.Patches.RaidFix private bool IsTargetMethod(MethodInfo mi) { var parameters = mi.GetParameters(); - return (parameters.Length == 2 + return (parameters.Length == 3 && parameters[0].Name == "data" - && parameters[1].Name == "cancellationToken"); + && parameters[1].Name == "cancellationToken" + && parameters[2].Name == "withDelete"); } [PatchPrefix] diff --git a/project/Aki.SinglePlayer/Patches/RaidFix/RemoveUsedBotProfilePatch.cs b/project/Aki.SinglePlayer/Patches/RaidFix/RemoveUsedBotProfilePatch.cs index ba1938a..f8a727f 100644 --- a/project/Aki.SinglePlayer/Patches/RaidFix/RemoveUsedBotProfilePatch.cs +++ b/project/Aki.SinglePlayer/Patches/RaidFix/RemoveUsedBotProfilePatch.cs @@ -10,10 +10,10 @@ namespace Aki.SinglePlayer.Patches.RaidFix { public class RemoveUsedBotProfilePatch : ModulePatch { - private static BindingFlags _flags; - private static Type _targetInterface; - private static Type _targetType; - private static FieldInfo _profilesField; + private static readonly BindingFlags _flags; + private static readonly Type _targetInterface; + private static readonly Type _targetType; + private static readonly FieldInfo _profilesField; static RemoveUsedBotProfilePatch() { @@ -41,21 +41,11 @@ namespace Aki.SinglePlayer.Patches.RaidFix } [PatchPrefix] - private static bool PatchPrefix(ref Profile __result, object __instance, IBotData data) + private static bool PatchPrefix(ref Profile __result, object __instance, GClass626 data, ref bool withDelete) { - var profiles = (List)_profilesField.GetValue(__instance); + withDelete = true; - if (profiles.Count > 0) - { - // second parameter makes client remove used profiles - __result = data.ChooseProfile(profiles, true); - } - else - { - __result = null; - } - - return false; + return true; // Do original method } } }