0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:10:44 -05:00

Update references for 26835 (!36)

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: SPT-AKI/Modules#36
This commit is contained in:
chomp 2023-10-28 09:30:21 +00:00
parent 4b0ebbe597
commit 4047f86b24
9 changed files with 20 additions and 19 deletions

View File

@ -15,8 +15,9 @@ namespace Aki.Core.Patches
{ {
try try
{ {
_ = GClass239.DEBUG_LOGIC; // UPDATE BELOW LINE TOO // NOTE: This doesn't actually check the below, GClass vs Class
var type = PatchConstants.EftTypes.Single(t => t.Name == "Class239"); _ = GClass259.DEBUG_LOGIC; // UPDATE BELOW LINE TOO
var type = PatchConstants.EftTypes.Single(t => t.Name == "Class259");
if (type == null) if (type == null)
{ {

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)
{ {
GClass2898.Instance.CloseAllScreensForced(); GClass2949.Instance.CloseAllScreensForced();
} }
return true; return true;

View File

@ -17,8 +17,8 @@ namespace Aki.Custom.Patches
public RagfairFeePatch() public RagfairFeePatch()
{ {
// Remember to update prefix parameter if below lines are broken // Remember to update prefix parameter if below lines are broken
_ = nameof(GClass2860.IsAllSelectedItemSame); _ = nameof(GClass2911.IsAllSelectedItemSame);
_ = nameof(GClass2860.AutoSelectSimilar); _ = nameof(GClass2911.AutoSelectSimilar);
} }
protected override MethodBase GetTargetMethod() protected override MethodBase GetTargetMethod()
@ -34,14 +34,14 @@ namespace Aki.Custom.Patches
/// <param name="___double_0">RequirementsPrice</param> /// <param name="___double_0">RequirementsPrice</param>
/// <param name="___bool_0">SellInOnePiece</param> /// <param name="___bool_0">SellInOnePiece</param>
[PatchPrefix] [PatchPrefix]
private static void PatchPrefix(ref Item ___item_0, ref GClass2860 ___gclass2860_0, ref double ___double_0, ref bool ___bool_0) private static void PatchPrefix(ref Item ___item_0, ref GClass2911 ___gclass2911_0, ref double ___double_0, ref bool ___bool_0)
{ {
RequestHandler.PutJson("/client/ragfair/offerfees", new RequestHandler.PutJson("/client/ragfair/offerfees", new
{ {
id = ___item_0.Id, id = ___item_0.Id,
tpl = ___item_0.TemplateId, tpl = ___item_0.TemplateId,
count = ___gclass2860_0.OfferItemCount, count = ___gclass2911_0.OfferItemCount,
fee = Mathf.CeilToInt((float)GClass1941.CalculateTaxPrice(___item_0, ___gclass2860_0.OfferItemCount, ___double_0, ___bool_0)) fee = Mathf.CeilToInt((float)GClass1991.CalculateTaxPrice(___item_0, ___gclass2911_0.OfferItemCount, ___double_0, ___bool_0))
} }
.ToJson()); .ToJson());
} }

View File

@ -17,7 +17,7 @@ namespace Aki.Debugging.Patches
[PatchPrefix] [PatchPrefix]
private static bool PatchPreFix(ref LocalizedText ____nickName, ref TMP_Text ____standing, private static bool PatchPreFix(ref LocalizedText ____nickName, ref TMP_Text ____standing,
ref RankPanel ____rankPanel, ref Profile.GClass1625 ___gclass1625_0) ref RankPanel ____rankPanel, ref Profile.GClass1675 ___gclass1675_0)
{ {
if (____nickName.LocalizationKey == null) if (____nickName.LocalizationKey == null)
{ {
@ -37,13 +37,13 @@ namespace Aki.Debugging.Patches
return false; // skip original return false; // skip original
} }
if (___gclass1625_0?.LoyaltyLevel == null) if (___gclass1675_0?.LoyaltyLevel == null)
{ {
ConsoleScreen.LogError("This Shouldn't happen!! Please report this in discord"); ConsoleScreen.LogError("This Shouldn't happen!! Please report this in discord");
Logger.Log(LogLevel.Error, "[AKI] _gclass1618_0 or _gclass1618_0.LoyaltyLevel was null"); Logger.Log(LogLevel.Error, "[AKI] _gclass1618_0 or _gclass1618_0.LoyaltyLevel was null");
} }
if (___gclass1625_0?.MaxLoyaltyLevel == null) if (___gclass1675_0?.MaxLoyaltyLevel == null)
{ {
ConsoleScreen.LogError("This Shouldn't happen!! Please report this in discord"); ConsoleScreen.LogError("This Shouldn't happen!! Please report this in discord");
Logger.Log(LogLevel.Error, "[AKI] _gclass1618_0 or _gclass1618_0.MaxLoyaltyLevel was null"); Logger.Log(LogLevel.Error, "[AKI] _gclass1618_0 or _gclass1618_0.MaxLoyaltyLevel was null");

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 = 38; public static int sptUsecValue = 41;
public static int sptBearValue = 39; public static int sptBearValue = 42;
public static void Patch(ref AssemblyDefinition assembly) public static void Patch(ref AssemblyDefinition assembly)
{ {

View File

@ -58,7 +58,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, GClass513 data, ref bool withDelete) private static bool PatchPrefix(ref Task<Profile> __result, BotsPresets __instance, List<Profile> ___list_0, GClass560 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.GClass1625; using TraderInfo = EFT.Profile.GClass1675;
namespace Aki.SinglePlayer.Patches.RaidFix namespace Aki.SinglePlayer.Patches.RaidFix
{ {

View File

@ -42,7 +42,7 @@ namespace Aki.SinglePlayer.Patches.RaidFix
/// <summary> /// <summary>
/// BotsPresets.GetNewProfile() /// BotsPresets.GetNewProfile()
[PatchPrefix] [PatchPrefix]
private static bool PatchPrefix(ref Profile __result, object __instance, GClass513 data, ref bool withDelete) private static bool PatchPrefix(ref Profile __result, object __instance, GClass560 data, ref bool withDelete)
{ {
withDelete = true; withDelete = true;

View File

@ -29,7 +29,7 @@ namespace Aki.SinglePlayer.Patches.ScavMode
_ = nameof(TimeAndWeatherSettings.IsRandomWeather); _ = nameof(TimeAndWeatherSettings.IsRandomWeather);
_ = nameof(BotControllerSettings.IsScavWars); _ = nameof(BotControllerSettings.IsScavWars);
_ = nameof(WavesSettings.IsBosses); _ = nameof(WavesSettings.IsBosses);
_ = GClass2953.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!! _ = GClass3004.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!!
var menuControllerType = typeof(MainMenuController); var menuControllerType = typeof(MainMenuController);
@ -118,9 +118,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($"{nameof(GClass2953).ToLowerInvariant()}_0").GetValue<GClass2953>(); var matchmakerPlayersController = Traverse.Create(menuController).Field($"{nameof(GClass3004).ToLowerInvariant()}_0").GetValue<GClass3004>();
var gclass = new MatchmakerOfflineRaidScreen.GClass2942(profile?.Info, ref raidSettings, matchmakerPlayersController); var gclass = new MatchmakerOfflineRaidScreen.GClass2993(profile?.Info, ref raidSettings, matchmakerPlayersController);
gclass.OnShowNextScreen += LoadOfflineRaidNextScreen; gclass.OnShowNextScreen += LoadOfflineRaidNextScreen;