internal static void TryToGrab_Postfix(ref QuestContainerMenu __instance, ref Item __result) { try { if (!(__result is Clothing)) { return; } //Clothes don't stack so don't have to worry about stack number DonateObjective obj = FindItemObjective(__result, true); var complete = Helper.Reflection.GetField <bool>(obj, "_complete"); Log.Debug($"Objective is complete: {complete}"); complete.SetValue(false); __result = null; } catch (Exception e) { Log.Error($"Harmony patch \"{nameof(TryToGrab_Postfix)}\" has encountered an error. \n{e}"); } }
internal static void TryToPlace_Postfix(ref QuestContainerMenu __instance, ref Item __result) { try { if (!(__result is Clothing)) { return; } //Clothes don't stack so don't have to worry about stack number DonateObjective obj = FindItemObjective(__result, false); if (obj != null) { __result = null; } } catch (Exception e) { Log.Error($"Harmony patch \"{nameof(TryToPlace_Postfix)}\" has encountered an error. \n{e}"); } }