From cf6338b78d0688cf243fd02cd30d7441a794d571 Mon Sep 17 00:00:00 2001 From: starstormhun Date: Sun, 29 Dec 2024 05:05:14 +0100 Subject: [PATCH] Use AccessTools to access private field --- .../PregnancyPlus.Core/Hooks/PPPlugin.Hooks.Accessory.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PregnancyPlus/PregnancyPlus.Core/Hooks/PPPlugin.Hooks.Accessory.cs b/PregnancyPlus/PregnancyPlus.Core/Hooks/PPPlugin.Hooks.Accessory.cs index a6525cd..6b04662 100644 --- a/PregnancyPlus/PregnancyPlus.Core/Hooks/PPPlugin.Hooks.Accessory.cs +++ b/PregnancyPlus/PregnancyPlus.Core/Hooks/PPPlugin.Hooks.Accessory.cs @@ -104,7 +104,7 @@ public static void ChangeCopyAcsPostfix(CvsAccessoryChange __instance) var controller = GetCharaController(chaControl); if (controller == null) return; - var slotNum = __instance.selDst; + var slotNum = (int)AccessTools.Field(typeof(CvsAccessoryChange), "selDst").GetValue(__instance); controller.AccessoryStateChangeEvent(chaControl.chaID, slotNum); }