From ae2b98b69eeeb9cc93bd84ab9d72e2c40c849062 Mon Sep 17 00:00:00 2001 From: Dev Date: Thu, 4 Jan 2024 09:25:42 +0000 Subject: [PATCH] Add additional logging to patch --- .../Aki.Custom/Patches/SetLocationIdOnRaidStartPatch.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/project/Aki.Custom/Patches/SetLocationIdOnRaidStartPatch.cs b/project/Aki.Custom/Patches/SetLocationIdOnRaidStartPatch.cs index 65eee57..ec214f2 100644 --- a/project/Aki.Custom/Patches/SetLocationIdOnRaidStartPatch.cs +++ b/project/Aki.Custom/Patches/SetLocationIdOnRaidStartPatch.cs @@ -25,7 +25,12 @@ namespace Aki.Custom.Patches _locationProperty = localGameBaseType.GetProperties(PatchConstants.PrivateFlags).Single(x => x.PropertyType == typeof(Location)); // Find the TimeAndWeatherSettings handling method - return localGameBaseType.GetMethods(PatchConstants.PrivateFlags).SingleOrDefault(IsTargetMethod); + var desiredMethod = localGameBaseType.GetMethods(PatchConstants.PrivateFlags).SingleOrDefault(m => IsTargetMethod(m)); + + Logger.LogDebug($"{GetType().Name} Type: {localGameBaseType?.Name}"); + Logger.LogDebug($"{GetType().Name} Method: {desiredMethod?.Name}"); + + return desiredMethod; } private static bool IsTargetMethod(MethodInfo mi) @@ -48,6 +53,8 @@ namespace Aki.Custom.Patches Location location = _locationProperty.GetValue(__instance) as Location; gameWorld.LocationId = location.Id; + + Logger.LogDebug($"[SetLocationId] Set locationId to: {location.Id}"); } } }