Refactoring, cleanup

This commit is contained in:
Tyfon
2024-04-18 16:39:16 -07:00
parent b39959230d
commit 656e970ca4
5 changed files with 77 additions and 48 deletions

View File

@@ -0,0 +1,24 @@
using Aki.Reflection.Patching;
using System;
using System.Reflection;
using EFT.UI.Chat;
namespace UIFixes
{
public class MailReceiveAllPatch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
Type type = typeof(ChatMessageSendBlock);
return type.GetMethod("Show", BindingFlags.Public | BindingFlags.Instance);
}
[PatchPrefix]
private static void Prefix(DialogueClass dialogue)
{
// Force this false will recalculate each time. This is less than ideal, but the way the code is structured makes it very difficult to do correctly.
dialogue.HasMessagesWithRewards = false;
}
}
}