mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
Update class refs for new patch
This commit is contained in:
parent
e3abb5fe04
commit
87d9688ab2
@ -13,7 +13,7 @@ using System.Linq;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using Random = UnityEngine.Random;
|
using Random = UnityEngine.Random;
|
||||||
using BotEventHandler = GClass595;
|
using BotEventHandler = GClass598;
|
||||||
|
|
||||||
namespace Aki.Custom.BTR
|
namespace Aki.Custom.BTR
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,7 @@ using EFT.Vehicle;
|
|||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using BTRDialog = EFT.UI.TraderDialogScreen.GClass3132;
|
using BTRDialog = EFT.UI.TraderDialogScreen.GClass3137;
|
||||||
|
|
||||||
namespace Aki.Custom.BTR.Patches
|
namespace Aki.Custom.BTR.Patches
|
||||||
{
|
{
|
||||||
|
@ -35,7 +35,7 @@ namespace Aki.Custom.BTR.Patches
|
|||||||
var btrTurretViewTupleField = (ValueTuple<ObservedPlayerView, bool>)AccessTools.Field(__instance.GetType(), "valueTuple_0").GetValue(__instance);
|
var btrTurretViewTupleField = (ValueTuple<ObservedPlayerView, bool>)AccessTools.Field(__instance.GetType(), "valueTuple_0").GetValue(__instance);
|
||||||
if (!btrTurretViewTupleField.Item2)
|
if (!btrTurretViewTupleField.Item2)
|
||||||
{
|
{
|
||||||
__instance.method_1(btrBotId);
|
__instance.method_3(btrBotId);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ using EFT.GlobalEvents;
|
|||||||
using EFT.Vehicle;
|
using EFT.Vehicle;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using GlobalEventHandler = GClass2911;
|
using GlobalEventHandler = GClass2915;
|
||||||
|
|
||||||
namespace Aki.Custom.BTR.Patches
|
namespace Aki.Custom.BTR.Patches
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@ using EFT;
|
|||||||
using EFT.Vehicle;
|
using EFT.Vehicle;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using BotEventHandler = GClass595;
|
using BotEventHandler = GClass598;
|
||||||
|
|
||||||
namespace Aki.Custom.BTR.Patches
|
namespace Aki.Custom.BTR.Patches
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,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)
|
||||||
{
|
{
|
||||||
GClass3107.Instance.CloseAllScreensForced();
|
GClass3112.Instance.CloseAllScreensForced();
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -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(GClass3069.IsAllSelectedItemSame);
|
_ = nameof(GClass3074.IsAllSelectedItemSame);
|
||||||
_ = nameof(GClass3069.AutoSelectSimilar);
|
_ = nameof(GClass3074.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 GClass3069 ___gclass3069_0, ref double ___double_0, ref bool ___bool_0)
|
private static void PatchPrefix(ref Item ___item_0, ref GClass3074 ___gclass3074_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 = ___gclass3069_0.OfferItemCount,
|
count = ___gclass3074_0.OfferItemCount,
|
||||||
fee = Mathf.CeilToInt((float)GClass2086.CalculateTaxPrice(___item_0, ___gclass3069_0.OfferItemCount, ___double_0, ___bool_0))
|
fee = Mathf.CeilToInt((float)GClass2089.CalculateTaxPrice(___item_0, ___gclass3074_0.OfferItemCount, ___double_0, ___bool_0))
|
||||||
}.ToJson());
|
}.ToJson());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ using EFT;
|
|||||||
using EFT.UI;
|
using EFT.UI;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using DialogControlClass = GClass1954;
|
using DialogControlClass = GClass1957;
|
||||||
|
|
||||||
namespace Aki.Debugging.Patches
|
namespace Aki.Debugging.Patches
|
||||||
{
|
{
|
||||||
|
@ -17,11 +17,11 @@ namespace Aki.Debugging.Patches
|
|||||||
{
|
{
|
||||||
private readonly List<ISpawnPoint> playerSpawnPoints;
|
private readonly List<ISpawnPoint> playerSpawnPoints;
|
||||||
private readonly Random _rnd = new Random();
|
private readonly Random _rnd = new Random();
|
||||||
private readonly GStruct379 _spawnSettings = new GStruct379();
|
private readonly GStruct380 _spawnSettings = new GStruct380();
|
||||||
|
|
||||||
public SptSpawnHelper()
|
public SptSpawnHelper()
|
||||||
{
|
{
|
||||||
IEnumerable<ISpawnPoint> locationSpawnPoints = GClass2924.CreateFromScene();
|
IEnumerable<ISpawnPoint> locationSpawnPoints = GClass2928.CreateFromScene();
|
||||||
|
|
||||||
var playerSpawns = locationSpawnPoints.Where(x => x.Categories.HasFlag(ESpawnCategoryMask.Player)).ToList();
|
var playerSpawns = locationSpawnPoints.Where(x => x.Categories.HasFlag(ESpawnCategoryMask.Player)).ToList();
|
||||||
this.playerSpawnPoints = 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]
|
[PatchPrefix]
|
||||||
public static bool PatchPrefix(GClass1470 __instance, GClass588 data)
|
public static bool PatchPrefix(GClass1472 __instance, GClass591 data)
|
||||||
{
|
{
|
||||||
|
|
||||||
var firstBotRole = data.Profiles[0].Info.Settings.Role;
|
var firstBotRole = data.Profiles[0].Info.Settings.Role;
|
||||||
|
@ -44,7 +44,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, GClass588 data, ref bool withDelete)
|
private static bool PatchPrefix(ref Task<Profile> __result, BotsPresets __instance, List<Profile> ___list_0, GClass591 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)
|
||||||
|
@ -43,7 +43,7 @@ namespace Aki.SinglePlayer.Patches.RaidFix
|
|||||||
}
|
}
|
||||||
|
|
||||||
var inventoryController = Traverse.Create(player).Field<InventoryControllerClass>("_inventoryController").Value;
|
var inventoryController = Traverse.Create(player).Field<InventoryControllerClass>("_inventoryController").Value;
|
||||||
GClass2770.Remove(accessCardItem, inventoryController, false, true);
|
GClass2774.Remove(accessCardItem, inventoryController, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -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);
|
||||||
_ = GClass3166.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!!
|
_ = GClass3172.MAX_SCAV_COUNT; // UPDATE REFS TO THIS CLASS BELOW !!!
|
||||||
|
|
||||||
// `MatchmakerInsuranceScreen` OnShowNextScreen
|
// `MatchmakerInsuranceScreen` OnShowNextScreen
|
||||||
_onReadyScreenMethod = AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_42));
|
_onReadyScreenMethod = AccessTools.Method(typeof(MainMenuController), nameof(MainMenuController.method_42));
|
||||||
@ -116,9 +116,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(GClass3166).ToLowerInvariant()}_0").GetValue<GClass3166>();
|
var matchmakerPlayersController = Traverse.Create(menuController).Field($"{nameof(GClass3172).ToLowerInvariant()}_0").GetValue<GClass3172>();
|
||||||
|
|
||||||
var gclass = new MatchmakerOfflineRaidScreen.GClass3155(profile?.Info, ref raidSettings, matchmakerPlayersController);
|
var gclass = new MatchmakerOfflineRaidScreen.GClass3160(profile?.Info, ref raidSettings, matchmakerPlayersController);
|
||||||
|
|
||||||
gclass.OnShowNextScreen += LoadOfflineRaidNextScreen;
|
gclass.OnShowNextScreen += LoadOfflineRaidNextScreen;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using static BackendConfigSettingsClass;
|
using static BackendConfigSettingsClass;
|
||||||
using TraderServiceClass = GClass1791;
|
using TraderServiceClass = GClass1794;
|
||||||
|
|
||||||
namespace Aki.SinglePlayer.Utils.TraderServices
|
namespace Aki.SinglePlayer.Utils.TraderServices
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user