0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
This commit is contained in:
Dev 2023-07-28 10:01:11 +01:00
parent 83ea79c56c
commit 4a6b658b28
11 changed files with 14 additions and 11 deletions

View File

@ -23,7 +23,7 @@ git config --local user.email "USERNAME@SOMETHING.com"
## Requirements ## Requirements
- Escape From Tarkov 24964 - Escape From Tarkov 25206
- BepInEx 5.4.19 - BepInEx 5.4.19
- Visual Studio Code - Visual Studio Code
- .NET 6 SDK - .NET 6 SDK

View File

@ -15,7 +15,7 @@ namespace Aki.Core.Patches
{ {
try try
{ {
var type = PatchConstants.EftTypes.Single(t => t.Name == "Class226"); var type = PatchConstants.EftTypes.Single(t => t.Name == "Class227");
var value = Traverse.Create(type).Field("TransportPrefixes").GetValue<Dictionary<ETransportProtocolType, string>>(); var value = Traverse.Create(type).Field("TransportPrefixes").GetValue<Dictionary<ETransportProtocolType, string>>();
value[ETransportProtocolType.HTTPS] = "http://"; value[ETransportProtocolType.HTTPS] = "http://";
value[ETransportProtocolType.WSS] = "ws://"; value[ETransportProtocolType.WSS] = "ws://";

View File

@ -33,7 +33,7 @@ namespace Aki.Custom.Patches
var player = Singleton<GameWorld>.Instance.MainPlayer; var player = Singleton<GameWorld>.Instance.MainPlayer;
if (profileId == player?.Profile.Id) if (profileId == player?.Profile.Id)
{ {
GClass2975.Instance.CloseAllScreensForced(); GClass2977.Instance.CloseAllScreensForced();
} }
return true; return true;

View File

@ -14,7 +14,7 @@ namespace Aki.Custom.Patches
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
{ {
return typeof(GClass397).GetMethod(methodName); return typeof(GClass399).GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);
} }
[PatchPrefix] [PatchPrefix]

View File

@ -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 = 33; public static int sptUsecValue = 34;
public static int sptBearValue = 34; public static int sptBearValue = 35;
public static void Patch(ref AssemblyDefinition assembly) public static void Patch(ref AssemblyDefinition assembly)
{ {

View File

@ -33,6 +33,7 @@ namespace Aki.SinglePlayer.Patches.Progression
{ {
// GClass1812 as of 17349 // GClass1812 as of 17349
// GClass1886 as of 18876 // GClass1886 as of 18876
// Remapped to SpawnSystemClass
return (type.GetMethods(PatchConstants.PrivateFlags).Any(x => x.Name.IndexOf("CheckFarthestFromOtherPlayers", StringComparison.OrdinalIgnoreCase) != -1) return (type.GetMethods(PatchConstants.PrivateFlags).Any(x => x.Name.IndexOf("CheckFarthestFromOtherPlayers", StringComparison.OrdinalIgnoreCase) != -1)
&& type.IsClass); && type.IsClass);
} }

View File

@ -55,7 +55,7 @@ namespace Aki.SinglePlayer.Patches.RaidFix
/// BotsPresets.GetNewProfile() /// BotsPresets.GetNewProfile()
/// </summary> /// </summary>
[PatchPrefix] [PatchPrefix]
private static bool PatchPrefix(ref Task<Profile> __result, BotsPresets __instance, List<Profile> ___list_0, GClass626 data, ref bool withDelete) private static bool PatchPrefix(ref Task<Profile> __result, BotsPresets __instance, List<Profile> ___list_0, GClass628 data, ref bool withDelete)
{ {
/* /*
When client wants new bot and GetNewProfile() return null (if not more available templates or they don't satisfy by Role and Difficulty condition) When client wants new bot and GetNewProfile() return null (if not more available templates or they don't satisfy by Role and Difficulty condition)

View File

@ -2,7 +2,7 @@
using HarmonyLib; using HarmonyLib;
using System; using System;
using System.Reflection; using System.Reflection;
using TraderInfo = EFT.Profile.GClass1727; using TraderInfo = EFT.Profile.GClass1729;
namespace Aki.SinglePlayer.Patches.RaidFix namespace Aki.SinglePlayer.Patches.RaidFix
{ {

View File

@ -39,8 +39,10 @@ namespace Aki.SinglePlayer.Patches.RaidFix
return _targetInterface.IsAssignableFrom(type) && _targetInterface.IsAssignableFrom(type.BaseType); return _targetInterface.IsAssignableFrom(type) && _targetInterface.IsAssignableFrom(type.BaseType);
} }
/// <summary>
/// BotsPresets.GetNewProfile()
[PatchPrefix] [PatchPrefix]
private static bool PatchPrefix(ref Profile __result, object __instance, GClass626 data, ref bool withDelete) private static bool PatchPrefix(ref Profile __result, object __instance, GClass628 data, ref bool withDelete)
{ {
withDelete = true; withDelete = true;

View File

@ -114,9 +114,9 @@ namespace Aki.SinglePlayer.Patches.ScavMode
// Get fields from MainMenuController.cs // Get fields from MainMenuController.cs
var raidSettings = Traverse.Create(menuController).Field("raidSettings_0").GetValue<RaidSettings>(); var raidSettings = Traverse.Create(menuController).Field("raidSettings_0").GetValue<RaidSettings>();
var matchmakerPlayersController = Traverse.Create(menuController).Field("gclass3028_0").GetValue<GClass3028>(); var matchmakerPlayersController = Traverse.Create(menuController).Field("gclass3030_0").GetValue<GClass3030>();
var gclass = new MatchmakerOfflineRaidScreen.GClass3017(profile?.Info, ref raidSettings, matchmakerPlayersController); var gclass = new MatchmakerOfflineRaidScreen.GClass3019(profile?.Info, ref raidSettings, matchmakerPlayersController);
gclass.OnShowNextScreen += LoadOfflineRaidNextScreen; gclass.OnShowNextScreen += LoadOfflineRaidNextScreen;

Binary file not shown.