0
0
mirror of https://github.com/sp-tarkov/modules.git synced 2025-02-13 09:50:43 -05:00
modules/project/SPT.SinglePlayer/Patches/RaidFix/FixAchievementsPatch.cs

26 lines
864 B
C#
Raw Normal View History

using System.Reflection;
using EFT;
using HarmonyLib;
using SPT.Reflection.Patching;
using SPT.Reflection.Utils;
namespace SPT.SinglePlayer.Patches.RaidFix
{
public class FixAchievementsPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return AccessTools.Method(typeof(Player), nameof(Player.Init));
}
[PatchPostfix]
2024-07-11 21:11:14 +01:00
public static void PatchPostfix(Profile profile, InventoryControllerClass inventoryController, ref AbstractAchievementControllerClass ____achievementsController)
{
var achievementController = new GClass3233(profile, inventoryController, PatchConstants.BackEndSession, true);
achievementController.Init();
achievementController.Run();
____achievementsController = achievementController;
}
}
}