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; } }