mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-12 22:30:44 -05:00
28476 - update mappings most classes were offset by 2
This commit is contained in:
parent
6b81544363
commit
2fbe050a14
@ -7,6 +7,7 @@ using HarmonyLib;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using static EFT.UI.TraderDialogScreen;
|
||||
using BTRDialog = EFT.UI.TraderDialogScreen.GClass3132;
|
||||
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
@ -45,7 +46,7 @@ namespace Aki.Custom.BTR.Patches
|
||||
InventoryControllerClass inventoryController = _playerInventoryControllerField.GetValue(player) as InventoryControllerClass;
|
||||
AbstractQuestControllerClass questController = _playerQuestControllerField.GetValue(player) as AbstractQuestControllerClass;
|
||||
|
||||
GClass3130 btrDialog = new GClass3130(player.Profile, Profile.TraderInfo.TraderServiceToId[Profile.ETraderServiceSource.Btr], questController, inventoryController, null);
|
||||
BTRDialog btrDialog = new BTRDialog(player.Profile, Profile.TraderInfo.TraderServiceToId[Profile.ETraderServiceSource.Btr], questController, inventoryController, null);
|
||||
btrDialog.OnClose += player.UpdateInteractionCast;
|
||||
btrDialog.ShowScreen(EScreenState.Queued);
|
||||
|
||||
|
@ -5,7 +5,7 @@ using EFT.GlobalEvents;
|
||||
using EFT.Vehicle;
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using GlobalEventHandler = GClass2909;
|
||||
using GlobalEventHandler = GClass2911;
|
||||
|
||||
namespace Aki.Custom.BTR.Patches
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ namespace Aki.Custom.Patches
|
||||
var player = Singleton<GameWorld>.Instance.MainPlayer;
|
||||
if (profileId == player?.Profile.Id)
|
||||
{
|
||||
GClass3105.Instance.CloseAllScreensForced();
|
||||
GClass3107.Instance.CloseAllScreensForced();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -17,8 +17,8 @@ namespace Aki.Custom.Patches
|
||||
public RagfairFeePatch()
|
||||
{
|
||||
// Remember to update prefix parameter if below lines are broken
|
||||
_ = nameof(GClass3067.IsAllSelectedItemSame);
|
||||
_ = nameof(GClass3067.AutoSelectSimilar);
|
||||
_ = nameof(GClass3069.IsAllSelectedItemSame);
|
||||
_ = nameof(GClass3069.AutoSelectSimilar);
|
||||
}
|
||||
|
||||
protected override MethodBase GetTargetMethod()
|
||||
@ -34,14 +34,14 @@ namespace Aki.Custom.Patches
|
||||
/// <param name="___double_0">RequirementsPrice</param>
|
||||
/// <param name="___bool_0">SellInOnePiece</param>
|
||||
[PatchPrefix]
|
||||
private static void PatchPrefix(ref Item ___item_0, ref GClass3067 ___gclass3067_0, ref double ___double_0, ref bool ___bool_0)
|
||||
private static void PatchPrefix(ref Item ___item_0, ref GClass3069 ___gclass3069_0, ref double ___double_0, ref bool ___bool_0)
|
||||
{
|
||||
RequestHandler.PutJson("/client/ragfair/offerfees", new
|
||||
{
|
||||
id = ___item_0.Id,
|
||||
tpl = ___item_0.TemplateId,
|
||||
count = ___gclass3067_0.OfferItemCount,
|
||||
fee = Mathf.CeilToInt((float)GClass2084.CalculateTaxPrice(___item_0, ___gclass3067_0.OfferItemCount, ___double_0, ___bool_0))
|
||||
count = ___gclass3069_0.OfferItemCount,
|
||||
fee = Mathf.CeilToInt((float)GClass2086.CalculateTaxPrice(___item_0, ___gclass3069_0.OfferItemCount, ___double_0, ___bool_0))
|
||||
}.ToJson());
|
||||
}
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ using EFT;
|
||||
using EFT.UI;
|
||||
using HarmonyLib;
|
||||
using System.Reflection;
|
||||
using DialogControlClass = GClass1954;
|
||||
|
||||
namespace Aki.Debugging.Patches
|
||||
{
|
||||
@ -19,7 +20,7 @@ namespace Aki.Debugging.Patches
|
||||
[PatchPostfix]
|
||||
internal static void PatchPostfix()
|
||||
{
|
||||
ConsoleScreen.Processor.RegisterCommandGroup<GClass1952>();
|
||||
ConsoleScreen.Processor.RegisterCommandGroup<DialogControlClass>();
|
||||
ConsoleScreen.Processor.RegisterCommand("btr_deliver_items", new System.Action(BtrDeliverItemsCommand));
|
||||
}
|
||||
|
||||
@ -35,7 +36,7 @@ namespace Aki.Debugging.Patches
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
return AccessTools.Method(typeof(GClass1952), nameof(GClass1952.ShowDialogScreen));
|
||||
return AccessTools.Method(typeof(DialogControlClass), nameof(DialogControlClass.ShowDialogScreen));
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
|
@ -21,7 +21,7 @@ namespace Aki.Debugging.Patches
|
||||
|
||||
public SptSpawnHelper()
|
||||
{
|
||||
IEnumerable<ISpawnPoint> locationSpawnPoints = GClass2922.CreateFromScene();
|
||||
IEnumerable<ISpawnPoint> locationSpawnPoints = GClass2924.CreateFromScene();
|
||||
|
||||
var playerSpawns = locationSpawnPoints.Where(x => x.Categories.HasFlag(ESpawnCategoryMask.Player)).ToList();
|
||||
this.playerSpawnPoints = locationSpawnPoints.Where(x => x.Categories.HasFlag(ESpawnCategoryMask.Player)).ToList();
|
||||
@ -62,7 +62,7 @@ namespace Aki.Debugging.Patches
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
public static bool PatchPrefix(GClass1468 __instance, GClass588 data)
|
||||
public static bool PatchPrefix(GClass1470 __instance, GClass588 data)
|
||||
{
|
||||
|
||||
var firstBotRole = data.Profiles[0].Info.Settings.Role;
|
||||
|
@ -43,7 +43,7 @@ namespace Aki.SinglePlayer.Patches.RaidFix
|
||||
}
|
||||
|
||||
var inventoryController = Traverse.Create(player).Field<InventoryControllerClass>("_inventoryController").Value;
|
||||
GClass2768.Remove(accessCardItem, inventoryController, false, true);
|
||||
GClass2770.Remove(accessCardItem, inventoryController, false, true);
|
||||
}
|
||||
}
|
||||
}
|
@ -11,6 +11,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Reflection.Emit;
|
||||
using OfflineRaidAction = System.Action;
|
||||
using SettingsClass = GClass3166;
|
||||
|
||||
// DON'T FORGET TO UPDATE REFERENCES IN CONSTRUCTOR
|
||||
// AND IN THE LoadOfflineRaidScreenForScavs METHOD AS WELL
|
||||
@ -29,7 +30,7 @@ namespace Aki.SinglePlayer.Patches.ScavMode
|
||||
_ = nameof(TimeAndWeatherSettings.IsRandomWeather);
|
||||
_ = nameof(BotControllerSettings.IsScavWars);
|
||||
_ = nameof(WavesSettings.IsBosses);
|
||||
_ = GClass3164.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!!
|
||||
_ = SettingsClass.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!!
|
||||
|
||||
// `MatchmakerInsuranceScreen` OnShowNextScreen
|
||||
_onReadyScreenMethod = AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_42));
|
||||
@ -116,9 +117,9 @@ namespace Aki.SinglePlayer.Patches.ScavMode
|
||||
|
||||
// Get fields from MainMenuController.cs
|
||||
var raidSettings = Traverse.Create(menuController).Field("raidSettings_0").GetValue<RaidSettings>();
|
||||
var matchmakerPlayersController = Traverse.Create(menuController).Field($"{nameof(GClass3164).ToLowerInvariant()}_0").GetValue<GClass3164>();
|
||||
var matchmakerPlayersController = Traverse.Create(menuController).Field($"{nameof(SettingsClass).ToLowerInvariant()}_0").GetValue<SettingsClass>();
|
||||
|
||||
var gclass = new MatchmakerOfflineRaidScreen.GClass3153(profile?.Info, ref raidSettings, matchmakerPlayersController);
|
||||
var gclass = new MatchmakerOfflineRaidScreen.GClass3155(profile?.Info, ref raidSettings, matchmakerPlayersController);
|
||||
|
||||
gclass.OnShowNextScreen += LoadOfflineRaidNextScreen;
|
||||
|
||||
|
@ -6,7 +6,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using static BackendConfigSettingsClass;
|
||||
using TraderServiceClass = GClass1789;
|
||||
using TraderServiceClass = GClass1791;
|
||||
|
||||
namespace Aki.SinglePlayer.Utils.TraderServices
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user