mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
Added patch to allow Scavruns to work
This commit is contained in:
parent
b6fda0aeb2
commit
8242f66024
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using EFT;
|
||||
using EFT.InventoryLogic;
|
||||
using HarmonyLib;
|
||||
using SPT.Reflection.Patching;
|
||||
using SPT.Reflection.Utils;
|
||||
|
||||
namespace SPT.SinglePlayer.Patches.ScavMode;
|
||||
|
||||
/// <summary>
|
||||
/// The game is not accepting Scav profiles for the PrestigeController,
|
||||
/// as a workaround we give the PMC profile so we can get in-raid as a scav
|
||||
/// this may cause issues with the Prestige system if/when implemented
|
||||
/// </summary>
|
||||
public class ScavPrestigeFixPatch : ModulePatch
|
||||
{
|
||||
protected override MethodBase GetTargetMethod()
|
||||
{
|
||||
return AccessTools.Constructor(typeof(GClass3690), new Type[] { typeof(Profile), typeof(InventoryController), typeof(GClass3865), typeof(ISession) }, false);
|
||||
}
|
||||
|
||||
[PatchPrefix]
|
||||
public static void PatchPrefix(GClass3690 __instance, ref Profile profile)
|
||||
{
|
||||
if (profile.Side == EPlayerSide.Savage)
|
||||
{
|
||||
profile = PatchConstants.BackEndSession.Profile;
|
||||
}
|
||||
}
|
||||
}
|
@ -65,6 +65,9 @@ namespace SPT.SinglePlayer
|
||||
new BotOwnerManualUpdatePatch().Enable();
|
||||
new FirearmControllerShowIncompatibleNotificationClass().Enable();
|
||||
new FixKeyAlreadyExistsErrorOnAchievementPatch().Enable();
|
||||
|
||||
// 4.0.0
|
||||
new ScavPrestigeFixPatch().Enable();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Loading…
x
Reference in New Issue
Block a user