diff --git a/README.md b/README.md index 59d9c34..b1621b7 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ git config --local user.email "USERNAME@SOMETHING.com" ``` ## Requirements -- Escape From Tarkov 30268 +- Escape From Tarkov 30473 - Visual Studio Code -OR- Visual Studio 2022 - .NET 6 SDK - [PowerShell v7](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows) diff --git a/project/SPT.Custom/BTR/Patches/BTRActivateTraderDialogPatch.cs b/project/SPT.Custom/BTR/Patches/BTRActivateTraderDialogPatch.cs index 1cf5d20..cfe47ba 100644 --- a/project/SPT.Custom/BTR/Patches/BTRActivateTraderDialogPatch.cs +++ b/project/SPT.Custom/BTR/Patches/BTRActivateTraderDialogPatch.cs @@ -6,7 +6,7 @@ using EFT.Vehicle; using HarmonyLib; using System; using System.Reflection; -using BTRDialog = EFT.UI.TraderDialogScreen.GClass3152; +using BTRDialog = EFT.UI.TraderDialogScreen.GClass3156; namespace SPT.Custom.BTR.Patches { diff --git a/project/SPT.Custom/Patches/ExitWhileLootingPatch.cs b/project/SPT.Custom/Patches/ExitWhileLootingPatch.cs index 423db17..034cebc 100644 --- a/project/SPT.Custom/Patches/ExitWhileLootingPatch.cs +++ b/project/SPT.Custom/Patches/ExitWhileLootingPatch.cs @@ -31,7 +31,7 @@ namespace SPT.Custom.Patches var player = Singleton.Instance.MainPlayer; if (profileId == player?.Profile.Id) { - GClass3126.Instance.CloseAllScreensForced(); + GClass3130.Instance.CloseAllScreensForced(); } return true; diff --git a/project/SPT.Custom/Patches/FileCachePatch.cs b/project/SPT.Custom/Patches/FileCachePatch.cs index daa675c..c4a36e7 100644 --- a/project/SPT.Custom/Patches/FileCachePatch.cs +++ b/project/SPT.Custom/Patches/FileCachePatch.cs @@ -18,7 +18,7 @@ namespace SPT.Custom.Patches protected override MethodBase GetTargetMethod() { - return AccessTools.Method(typeof(ProfileEndpointFactoryAbstractClass), nameof(ProfileEndpointFactoryAbstractClass.method_19)); + return AccessTools.Method(typeof(ProfileEndpointFactoryAbstractClass), nameof(ProfileEndpointFactoryAbstractClass.method_26)); } [PatchPrefix] diff --git a/project/SPT.Custom/Patches/InsurancePlaceItem.cs b/project/SPT.Custom/Patches/InsurancePlaceItem.cs index 22a3925..ed5a1b1 100644 --- a/project/SPT.Custom/Patches/InsurancePlaceItem.cs +++ b/project/SPT.Custom/Patches/InsurancePlaceItem.cs @@ -9,11 +9,11 @@ namespace SPT.Custom.Patches { protected override MethodBase GetTargetMethod() { - return AccessTools.Method(typeof(Class1492), nameof(Class1492.method_0)); + return AccessTools.Method(typeof(Class1496), nameof(Class1496.method_0)); } [PatchPostfix] - private static void PatchPostfix(Class1492 __instance, bool successful) + private static void PatchPostfix(Class1496 __instance, bool successful) { if (!successful) { diff --git a/project/SPT.Custom/Patches/PMCSpawnParamPatch.cs b/project/SPT.Custom/Patches/PMCSpawnParamPatch.cs index e622a3d..0f2e927 100644 --- a/project/SPT.Custom/Patches/PMCSpawnParamPatch.cs +++ b/project/SPT.Custom/Patches/PMCSpawnParamPatch.cs @@ -15,15 +15,17 @@ namespace SPT.Custom.Patches [PatchPrefix] private static void PatchPrefix(BotOwner bot) { - if (bot.SpawnProfileData.SpawnParams != null - && (bot.Profile.Info.Settings.Role != WildSpawnType.pmcBEAR || bot.Profile.Info.Settings.Role != WildSpawnType.pmcUSEC)) + if (bot.Profile.Info.Settings.Role == WildSpawnType.pmcBEAR || bot.Profile.Info.Settings.Role == WildSpawnType.pmcUSEC) { - return; + if (bot.SpawnProfileData.SpawnParams == null) + { + bot.SpawnProfileData.SpawnParams = new BotSpawnParams(); + } + if (bot.SpawnProfileData.SpawnParams.ShallBeGroup == null) + { + bot.SpawnProfileData.SpawnParams.ShallBeGroup = new ShallBeGroupParams(false, false); + } } - - // Add SpawnParams to PMC bots that are missing them - bot.SpawnProfileData.SpawnParams = new BotSpawnParams(); - bot.SpawnProfileData.SpawnParams.ShallBeGroup = new ShallBeGroupParams(false, false); } } } diff --git a/project/SPT.Custom/Patches/RagfairFeePatch.cs b/project/SPT.Custom/Patches/RagfairFeePatch.cs index 3214d9e..caec366 100644 --- a/project/SPT.Custom/Patches/RagfairFeePatch.cs +++ b/project/SPT.Custom/Patches/RagfairFeePatch.cs @@ -17,8 +17,8 @@ namespace SPT.Custom.Patches public RagfairFeePatch() { // Remember to update prefix parameter if below lines are broken - _ = nameof(GClass3086.IsAllSelectedItemSame); - _ = nameof(GClass3086.AutoSelectSimilar); + _ = nameof(GClass3090.IsAllSelectedItemSame); + _ = nameof(GClass3090.AutoSelectSimilar); } protected override MethodBase GetTargetMethod() @@ -34,14 +34,14 @@ namespace SPT.Custom.Patches /// RequirementsPrice /// SellInOnePiece [PatchPrefix] - private static void PatchPrefix(ref Item ___item_0, ref GClass3086 ___gclass3086_0, ref double ___double_0, ref bool ___bool_0) + private static void PatchPrefix(ref Item ___item_0, ref GClass3090 ___gclass3090_0, ref double ___double_0, ref bool ___bool_0) { RequestHandler.PutJson("/client/ragfair/offerfees", new { id = ___item_0.Id, tpl = ___item_0.TemplateId, - count = ___gclass3086_0.OfferItemCount, - fee = Mathf.CeilToInt((float)GClass2102.CalculateTaxPrice(___item_0, ___gclass3086_0.OfferItemCount, ___double_0, ___bool_0)) + count = ___gclass3090_0.OfferItemCount, + fee = Mathf.CeilToInt((float)GClass2104.CalculateTaxPrice(___item_0, ___gclass3090_0.OfferItemCount, ___double_0, ___bool_0)) }.ToJson()); } } diff --git a/project/SPT.Debugging/Patches/BTRDebugCommandPatch.cs b/project/SPT.Debugging/Patches/BTRDebugCommandPatch.cs index d614e74..5ca33cb 100644 --- a/project/SPT.Debugging/Patches/BTRDebugCommandPatch.cs +++ b/project/SPT.Debugging/Patches/BTRDebugCommandPatch.cs @@ -5,7 +5,7 @@ using EFT; using EFT.UI; using HarmonyLib; using System.Reflection; -using DialogControlClass = GClass1970; +using DialogControlClass = GClass1972; namespace SPT.Debugging.Patches { diff --git a/project/SPT.Debugging/Patches/PMCBotSpawnLocationPatch.cs b/project/SPT.Debugging/Patches/PMCBotSpawnLocationPatch.cs index 27e186e..52068ae 100644 --- a/project/SPT.Debugging/Patches/PMCBotSpawnLocationPatch.cs +++ b/project/SPT.Debugging/Patches/PMCBotSpawnLocationPatch.cs @@ -20,7 +20,7 @@ namespace SPT.Debugging.Patches public SptSpawnHelper() { - IEnumerable locationSpawnPoints = GClass2945.CreateFromScene(); + IEnumerable locationSpawnPoints = GClass2948.CreateFromScene(); var playerSpawns = locationSpawnPoints.Where(x => x.Categories.HasFlag(ESpawnCategoryMask.Player)).ToList(); this.playerSpawnPoints = locationSpawnPoints.Where(x => x.Categories.HasFlag(ESpawnCategoryMask.Player)).ToList(); diff --git a/project/SPT.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs b/project/SPT.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs index bd2fe48..bb17467 100644 --- a/project/SPT.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs +++ b/project/SPT.SinglePlayer/Patches/ScavMode/LoadOfflineRaidScreenPatch.cs @@ -124,7 +124,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode .Single(field => field.FieldType == typeof(MatchmakerPlayerControllerClass)) ?.GetValue(menuController) as MatchmakerPlayerControllerClass; - var gclass = new MatchmakerOfflineRaidScreen.GClass3177(profile?.Info, ref raidSettings, matchmakerPlayersController, ESessionMode.Regular); + var gclass = new MatchmakerOfflineRaidScreen.GClass3181(profile?.Info, ref raidSettings, matchmakerPlayersController, ESessionMode.Regular); gclass.OnShowNextScreen += LoadOfflineRaidNextScreen; diff --git a/project/SPT.SinglePlayer/Patches/ScavMode/ScavRepAdjustmentPatch.cs b/project/SPT.SinglePlayer/Patches/ScavMode/ScavRepAdjustmentPatch.cs index f4ac2b4..f91b74d 100644 --- a/project/SPT.SinglePlayer/Patches/ScavMode/ScavRepAdjustmentPatch.cs +++ b/project/SPT.SinglePlayer/Patches/ScavMode/ScavRepAdjustmentPatch.cs @@ -13,7 +13,7 @@ namespace SPT.SinglePlayer.Patches.ScavMode protected override MethodBase GetTargetMethod() { // Correct Gclass has sessionCounters - return AccessTools.Method(typeof(GClass1800), nameof(GClass1800.OnEnemyKill)); + return AccessTools.Method(typeof(GClass1801), nameof(GClass1801.OnEnemyKill)); } [PatchPrefix] diff --git a/project/SPT.SinglePlayer/Patches/ScavMode/ScavSellAllRequestPatch.cs b/project/SPT.SinglePlayer/Patches/ScavMode/ScavSellAllRequestPatch.cs index c3ae4aa..aa00145 100644 --- a/project/SPT.SinglePlayer/Patches/ScavMode/ScavSellAllRequestPatch.cs +++ b/project/SPT.SinglePlayer/Patches/ScavMode/ScavSellAllRequestPatch.cs @@ -22,33 +22,16 @@ namespace SPT.SinglePlayer.Patches.ScavMode protected override MethodBase GetTargetMethod() { - // We want to find a type that contains `SellAllFromSavage` but doesn't extend from `IBackendStatus` - Type targetType = PatchConstants.EftTypes.SingleCustom(IsTargetType); + _sendOperationMethod = AccessTools.Method(typeof(ProfileEndpointFactoryAbstractClass), nameof(ProfileEndpointFactoryAbstractClass.SendOperationRightNow)); - Logger.LogDebug($"{this.GetType().Name} Type: {targetType?.Name}"); - - // So we can call "SendOperationRightNow" without directly referencing a GClass - _sendOperationMethod = AccessTools.Method(targetType, "SendOperationRightNow"); - - return AccessTools.Method(targetType, TargetMethodName); - } - - private bool IsTargetType(Type type) - { - // Isn't an interface, isn't part of the dummy class, and contains our target method - if (!type.IsInterface - && type.DeclaringType != typeof(BackendDummyClass) - && type.GetMethod(TargetMethodName) != null) - { - return true; - } - - return false; + // NEEDS FIXING + return AccessTools.Method(typeof(ProfileEndpointFactoryAbstractClass), nameof(ProfileEndpointFactoryAbstractClass.SellAllFromSavage)); } [PatchPrefix] - private static bool PatchPrefix(object __instance, ref Task __result, string playerId, string petId) + private static bool PatchPrefix(ProfileEndpointFactoryAbstractClass __instance, ref Task __result, string playerId, string petId) { + // Build request with additional information OwnerInfo fromOwner = new OwnerInfo { diff --git a/project/SPT.SinglePlayer/Utils/TraderServices/TraderServicesManager.cs b/project/SPT.SinglePlayer/Utils/TraderServices/TraderServicesManager.cs index 0afd340..ae5bbeb 100644 --- a/project/SPT.SinglePlayer/Utils/TraderServices/TraderServicesManager.cs +++ b/project/SPT.SinglePlayer/Utils/TraderServices/TraderServicesManager.cs @@ -10,9 +10,9 @@ using System.Linq; using System.Reflection; using UnityEngine; using static BackendConfigSettingsClass; -using TraderServiceClass = GClass1804; -using QuestDictClass = GClass2144; -using StandingListClass = GClass2146; +using TraderServiceClass = GClass1805; +using QuestDictClass = GClass2146; +using StandingListClass = GClass2148; namespace SPT.SinglePlayer.Utils.TraderServices { diff --git a/project/Shared/Hollowed/hollowed.dll b/project/Shared/Hollowed/hollowed.dll index 7cd0d2a..2edc098 100644 Binary files a/project/Shared/Hollowed/hollowed.dll and b/project/Shared/Hollowed/hollowed.dll differ