From a04e0d28dbb7e85412ced52ea029fef3cc272e92 Mon Sep 17 00:00:00 2001 From: XtraCube <72575280+XtraCube@users.noreply.github.com> Date: Wed, 12 Mar 2025 17:24:40 -0400 Subject: [PATCH] WTF GIT FAIL! --- MiraAPI/Patches/Events/ReportBodyEventPatch.cs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/MiraAPI/Patches/Events/ReportBodyEventPatch.cs b/MiraAPI/Patches/Events/ReportBodyEventPatch.cs index 0f8d0e6..feba1c9 100644 --- a/MiraAPI/Patches/Events/ReportBodyEventPatch.cs +++ b/MiraAPI/Patches/Events/ReportBodyEventPatch.cs @@ -1,26 +1,21 @@ using HarmonyLib; using MiraAPI.Events; using MiraAPI.Events.Vanilla.Meeting; +using MiraAPI.Utilities; namespace MiraAPI.Patches.Events; -<<<<<<<< HEAD:MiraAPI/Patches/Events/ReportBodyEventPatch.cs [HarmonyPatch] public static class ReportBodyEventPatch -======== -[HarmonyPatch(typeof(MeetingHud), nameof(MeetingHud.Start))] -public static class StartMeetingEventPatch ->>>>>>>> dev:MiraAPI/Patches/Events/StartMeetingEventPatch.cs { - public static void Postfix(MeetingHud __instance) + [HarmonyPrefix] + [HarmonyPatch(typeof(PlayerControl), nameof(PlayerControl.CmdReportDeadBody))] + public static bool PlayerControlCmdReportDeadBodyPrefix(PlayerControl __instance, NetworkedPlayerInfo? target) { -<<<<<<<< HEAD:MiraAPI/Patches/Events/ReportBodyEventPatch.cs var body = target != null ? Helpers.GetBodyById(target.PlayerId) : null; var @event = new ReportBodyEvent(__instance, target, body); -======== - var @event = new StartMeetingEvent(__instance); ->>>>>>>> dev:MiraAPI/Patches/Events/StartMeetingEventPatch.cs MiraEventManager.InvokeEvent(@event); + return !@event.IsCancelled; } }