mirror of
https://github.com/sp-tarkov/modules.git
synced 2025-02-13 09:50:43 -05:00
26 lines
918 B
C#
26 lines
918 B
C#
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]
|
|
public static void PatchPostfix(Profile profile, InventoryControllerClass inventoryController, ref AbstractAchievementControllerClass ____achievementsController, ref AbstractQuestControllerClass ____questController)
|
|
{
|
|
var achievementController = new GClass3233(profile, inventoryController, PatchConstants.BackEndSession, true);
|
|
achievementController.Init();
|
|
achievementController.Run();
|
|
|
|
____achievementsController = achievementController;
|
|
}
|
|
}
|
|
} |