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

Update modules to 29577 UNTESTED

This commit is contained in:
Kaeno 2024-04-03 15:38:14 +01:00 committed by Refringe
parent 9feec7ec7f
commit 70d0d60198
Signed by: Refringe
GPG Key ID: 7715B85B4A6306ED
20 changed files with 35 additions and 35 deletions

View File

@ -349,8 +349,8 @@ namespace Aki.Custom.BTR
btrDataPacket.rotation = btrServerSide.transform.rotation;
if (btrTurretServer != null && btrTurretServer.gunsBlockRoot != null)
{
btrDataPacket.turretRotation = btrTurretServer.transform.rotation;
btrDataPacket.gunsBlockRotation = btrTurretServer.gunsBlockRoot.rotation;
btrDataPacket.turretRotation = btrTurretServer.transform.localEulerAngles.y;
btrDataPacket.gunsBlockRotation = btrTurretServer.gunsBlockRoot.localEulerAngles.x;
}
btrDataPacket.State = (byte)btrServerSide.BtrState;
btrDataPacket.RouteState = (byte)btrServerSide.VehicleRouteState;

View File

@ -8,7 +8,7 @@ namespace Aki.Custom.BTR
{
public override bool IsStatic => false;
public override void AddPenalty(GInterface94 player)
public override void AddPenalty(GInterface106 player)
{
}
@ -16,7 +16,7 @@ namespace Aki.Custom.BTR
{
}
public override void ProceedDamage(GInterface94 player, BodyPartCollider bodyPart)
public override void ProceedDamage(GInterface106 player, BodyPartCollider bodyPart)
{
bodyPart.ApplyInstantKill(new DamageInfo()
{
@ -31,7 +31,7 @@ namespace Aki.Custom.BTR
});
}
public override void RemovePenalty(GInterface94 player)
public override void RemovePenalty(GInterface106 player)
{
}
}

View File

@ -6,7 +6,7 @@ using EFT.Vehicle;
using HarmonyLib;
using System;
using System.Reflection;
using BTRDialog = EFT.UI.TraderDialogScreen.GClass3132;
using BTRDialog = EFT.UI.TraderDialogScreen.GClass3149;
namespace Aki.Custom.BTR.Patches
{

View File

@ -11,7 +11,7 @@ namespace Aki.Custom.BTR.Patches
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(BaseLocalGame<GamePlayerOwner>), nameof(BaseLocalGame<GamePlayerOwner>.Stop));
return AccessTools.Method(typeof(BaseLocalGame<EftGamePlayerOwner>), nameof(BaseLocalGame<EftGamePlayerOwner>.Stop));
}
[PatchPrefix]

View File

@ -13,7 +13,7 @@ namespace Aki.Custom.Patches
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(BaseLocalGame<GamePlayerOwner>), nameof(BaseLocalGame<GamePlayerOwner>.Stop));
return AccessTools.Method(typeof(BaseLocalGame<EftGamePlayerOwner>), nameof(BaseLocalGame<EftGamePlayerOwner>.Stop));
}
// Look at BaseLocalGame<TPlayerOwner> and find a method named "Stop"
@ -31,7 +31,7 @@ namespace Aki.Custom.Patches
var player = Singleton<GameWorld>.Instance.MainPlayer;
if (profileId == player?.Profile.Id)
{
GClass3107.Instance.CloseAllScreensForced();
GClass3123.Instance.CloseAllScreensForced();
}
return true;

View File

@ -12,7 +12,7 @@ namespace Aki.Custom.Patches
{
protected override MethodBase GetTargetMethod()
{
var desiredType = typeof(BaseLocalGame<GamePlayerOwner>);
var desiredType = typeof(BaseLocalGame<EftGamePlayerOwner>);
var desiredMethod = desiredType.GetMethods(BindingFlags.Instance | BindingFlags.DeclaredOnly | BindingFlags.Public).SingleCustom(IsTargetMethod); // method_6
Logger.LogDebug($"{this.GetType().Name} Type: {desiredType?.Name}");

View File

@ -17,8 +17,8 @@ namespace Aki.Custom.Patches
public RagfairFeePatch()
{
// Remember to update prefix parameter if below lines are broken
_ = nameof(GClass3069.IsAllSelectedItemSame);
_ = nameof(GClass3069.AutoSelectSimilar);
_ = nameof(GClass3083.IsAllSelectedItemSame);
_ = nameof(GClass3083.AutoSelectSimilar);
}
protected override MethodBase GetTargetMethod()
@ -30,18 +30,18 @@ namespace Aki.Custom.Patches
/// Calculate tax to charge player and send to server before the offer is sent
/// </summary>
/// <param name="___item_0">Item sold</param>
/// <param name="___gclass3069_0">OfferItemCount</param>
/// <param name="___gclass3083_0">OfferItemCount</param>
/// <param name="___double_0">RequirementsPrice</param>
/// <param name="___bool_0">SellInOnePiece</param>
[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 GClass3083 ___gclass3083_0, ref double ___double_0, ref bool ___bool_0)
{
RequestHandler.PutJson("/client/ragfair/offerfees", new
{
id = ___item_0.Id,
tpl = ___item_0.TemplateId,
count = ___gclass3069_0.OfferItemCount,
fee = Mathf.CeilToInt((float)GClass2089.CalculateTaxPrice(___item_0, ___gclass3069_0.OfferItemCount, ___double_0, ___bool_0))
count = ___gclass3083_0.OfferItemCount,
fee = Mathf.CeilToInt((float)GClass2100.CalculateTaxPrice(___item_0, ___gclass3083_0.OfferItemCount, ___double_0, ___bool_0))
}.ToJson());
}
}

View File

@ -10,7 +10,7 @@ namespace Aki.Custom.Patches
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(BaseLocalGame<GamePlayerOwner>), nameof(BaseLocalGame<GamePlayerOwner>.Stop));
return AccessTools.Method(typeof(BaseLocalGame<EftGamePlayerOwner>), nameof(BaseLocalGame<EftGamePlayerOwner>.Stop));
}
[PatchPrefix]

View File

@ -14,7 +14,7 @@ namespace Aki.Custom.Patches
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(BaseLocalGame<GamePlayerOwner>), nameof(BaseLocalGame<GamePlayerOwner>.method_5));
return AccessTools.Method(typeof(BaseLocalGame<EftGamePlayerOwner>), nameof(BaseLocalGame<EftGamePlayerOwner>.method_5));
}
[PatchPostfix]

View File

@ -5,7 +5,7 @@ using EFT;
using EFT.UI;
using HarmonyLib;
using System.Reflection;
using DialogControlClass = GClass1957;
using DialogControlClass = GClass1968;
namespace Aki.Debugging.Patches
{

View File

@ -14,11 +14,11 @@ namespace Aki.Debugging.Patches
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(BaseLocalGame<GamePlayerOwner>), nameof(BaseLocalGame<GamePlayerOwner>.Update));
return AccessTools.Method(typeof(BaseLocalGame<EftGamePlayerOwner>), nameof(BaseLocalGame<EftGamePlayerOwner>.Update));
}
[PatchPrefix]
private static void PatchPrefix(BaseLocalGame<GamePlayerOwner> __instance)
private static void PatchPrefix(BaseLocalGame<EftGamePlayerOwner> __instance)
{
if (!Input.GetKeyDown(KeyCode.LeftControl)) return;

View File

@ -9,7 +9,7 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using ExitSettingsClass = GClass1225;
using ExitSettingsClass = GClass1233;
namespace Aki.Debugging.Patches
{

View File

@ -17,11 +17,11 @@ namespace Aki.Debugging.Patches
{
private readonly List<ISpawnPoint> playerSpawnPoints;
private readonly Random _rnd = new Random();
private readonly GStruct380 _spawnSettings = new GStruct380();
private readonly GStruct381 _spawnSettings = new GStruct381();
public SptSpawnHelper()
{
IEnumerable<ISpawnPoint> locationSpawnPoints = GClass2928.CreateFromScene();
IEnumerable<ISpawnPoint> locationSpawnPoints = GClass2942.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(GClass1472 __instance, GClass591 data)
public static bool PatchPrefix(GClass1480 __instance, GClass590 data)
{
var firstBotRole = data.Profiles[0].Info.Settings.Role;

View File

@ -38,7 +38,7 @@ namespace Aki.Debugging.Patches
{
tarkovapp.HideoutControllerAccess.UnloadHideout();
}
tarkovapp.method_48();
tarkovapp.method_49();
}
}
}

View File

@ -7,8 +7,8 @@ namespace Aki.PrePatch
{
public static IEnumerable<string> TargetDLLs { get; } = new[] { "Assembly-CSharp.dll" };
public static int sptUsecValue = 47;
public static int sptBearValue = 48;
public static int sptUsecValue = 49;
public static int sptBearValue = 50;
public static void Patch(ref AssemblyDefinition assembly)
{

View File

@ -14,7 +14,7 @@ namespace Aki.SinglePlayer.Patches.Quests
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(BaseLocalGame<GamePlayerOwner>), nameof(BaseLocalGame<GamePlayerOwner>.Stop));
return AccessTools.Method(typeof(BaseLocalGame<EftGamePlayerOwner>), nameof(BaseLocalGame<EftGamePlayerOwner>.Stop));
}
// Unused, but left here in case patch breaks and finding the intended method is difficult

View File

@ -44,7 +44,7 @@ namespace Aki.SinglePlayer.Patches.RaidFix
/// BotsPresets.GetNewProfile()
/// </summary>
[PatchPrefix]
private static bool PatchPrefix(ref Task<Profile> __result, BotsPresets __instance, List<Profile> ___list_0, GClass591 data, ref bool withDelete)
private static bool PatchPrefix(ref Task<Profile> __result, BotsPresets __instance, List<Profile> ___list_0, GClass590 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)

View File

@ -123,7 +123,7 @@ namespace Aki.SinglePlayer.Patches.ScavMode
.Single(field => field.FieldType == typeof(MatchmakerPlayerControllerClass))
?.GetValue(menuController) as MatchmakerPlayerControllerClass;
var gclass = new MatchmakerOfflineRaidScreen.GClass3155(profile?.Info, ref raidSettings, matchmakerPlayersController);
var gclass = new MatchmakerOfflineRaidScreen.GClass3174(profile?.Info, ref raidSettings, matchmakerPlayersController);
gclass.OnShowNextScreen += LoadOfflineRaidNextScreen;

View File

@ -12,7 +12,7 @@ namespace Aki.SinglePlayer.Patches.ScavMode
// TODO: REMAP/UPDATE GCLASS REF
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(GClass1790), nameof(GClass1790.OnEnemyKill));
return AccessTools.Method(typeof(GClass1798), nameof(GClass1798.OnEnemyKill));
}
[PatchPrefix]

View File

@ -10,9 +10,9 @@ using System.Linq;
using System.Reflection;
using UnityEngine;
using static BackendConfigSettingsClass;
using TraderServiceClass = GClass1794;
using QuestDictClass = GClass2133<string>;
using StandingListClass = GClass2135<float>;
using TraderServiceClass = GClass1802;
using QuestDictClass = GClass2141<string>;
using StandingListClass = GClass2143<float>;
namespace Aki.SinglePlayer.Utils.TraderServices
{