mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 02:30:44 -05:00
Additrional patch fixes for 24605
This commit is contained in:
parent
878f85a5b5
commit
610f5e596b
@ -25,7 +25,8 @@ namespace Aki.Custom
|
|||||||
new BotDifficultyPatch().Enable();
|
new BotDifficultyPatch().Enable();
|
||||||
new CoreDifficultyPatch().Enable();
|
new CoreDifficultyPatch().Enable();
|
||||||
new OfflineRaidMenuPatch().Enable();
|
new OfflineRaidMenuPatch().Enable();
|
||||||
new RaidSettingsWindowPatch().Enable();
|
// Fixed in live, no need for patch
|
||||||
|
//new RaidSettingsWindowPatch().Enable();
|
||||||
new OfflineRaidSettingsMenuPatch().Enable();
|
new OfflineRaidSettingsMenuPatch().Enable();
|
||||||
new SessionIdPatch().Enable();
|
new SessionIdPatch().Enable();
|
||||||
new VersionLabelPatch().Enable();
|
new VersionLabelPatch().Enable();
|
||||||
|
@ -7,8 +7,8 @@ namespace Aki.PrePatch
|
|||||||
{
|
{
|
||||||
public static IEnumerable<string> TargetDLLs { get; } = new[] { "Assembly-CSharp.dll" };
|
public static IEnumerable<string> TargetDLLs { get; } = new[] { "Assembly-CSharp.dll" };
|
||||||
|
|
||||||
public static int sptUsecValue = 32;
|
public static int sptUsecValue = 33;
|
||||||
public static int sptBearValue = 33;
|
public static int sptBearValue = 34;
|
||||||
|
|
||||||
public static void Patch(ref AssemblyDefinition assembly)
|
public static void Patch(ref AssemblyDefinition assembly)
|
||||||
{
|
{
|
||||||
|
@ -36,9 +36,10 @@ namespace Aki.SinglePlayer.Patches.RaidFix
|
|||||||
private bool IsTargetMethod(MethodInfo mi)
|
private bool IsTargetMethod(MethodInfo mi)
|
||||||
{
|
{
|
||||||
var parameters = mi.GetParameters();
|
var parameters = mi.GetParameters();
|
||||||
return (parameters.Length == 2
|
return (parameters.Length == 3
|
||||||
&& parameters[0].Name == "data"
|
&& parameters[0].Name == "data"
|
||||||
&& parameters[1].Name == "cancellationToken");
|
&& parameters[1].Name == "cancellationToken"
|
||||||
|
&& parameters[2].Name == "withDelete");
|
||||||
}
|
}
|
||||||
|
|
||||||
[PatchPrefix]
|
[PatchPrefix]
|
||||||
|
@ -10,10 +10,10 @@ namespace Aki.SinglePlayer.Patches.RaidFix
|
|||||||
{
|
{
|
||||||
public class RemoveUsedBotProfilePatch : ModulePatch
|
public class RemoveUsedBotProfilePatch : ModulePatch
|
||||||
{
|
{
|
||||||
private static BindingFlags _flags;
|
private static readonly BindingFlags _flags;
|
||||||
private static Type _targetInterface;
|
private static readonly Type _targetInterface;
|
||||||
private static Type _targetType;
|
private static readonly Type _targetType;
|
||||||
private static FieldInfo _profilesField;
|
private static readonly FieldInfo _profilesField;
|
||||||
|
|
||||||
static RemoveUsedBotProfilePatch()
|
static RemoveUsedBotProfilePatch()
|
||||||
{
|
{
|
||||||
@ -41,21 +41,11 @@ namespace Aki.SinglePlayer.Patches.RaidFix
|
|||||||
}
|
}
|
||||||
|
|
||||||
[PatchPrefix]
|
[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<Profile>)_profilesField.GetValue(__instance);
|
withDelete = true;
|
||||||
|
|
||||||
if (profiles.Count > 0)
|
return true; // Do original method
|
||||||
{
|
|
||||||
// second parameter makes client remove used profiles
|
|
||||||
__result = data.ChooseProfile(profiles, true);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
__result = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user