From c4fe13c4ae0309e89dde8c04650145bcfb9d96c3 Mon Sep 17 00:00:00 2001 From: TacoConKvass Date: Tue, 26 Nov 2024 14:18:47 +0100 Subject: [PATCH] [Fix] Wrong class in hook --- CHANGELOG.md | 4 ++++ RL2.API/RL2.API.mod.json | 2 +- RL2.API/RL2API_Hooks.cs | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41a9844..39d33c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # RL2.API Changelog +## v1.1.1 +### Fixes: +- Bad method signature in register content hook + ## v1.1.0 ### Changes: - RL2.API now requires RL2.ModLoader v1.0.3 diff --git a/RL2.API/RL2.API.mod.json b/RL2.API/RL2.API.mod.json index a5b802f..bebd287 100644 --- a/RL2.API/RL2.API.mod.json +++ b/RL2.API/RL2.API.mod.json @@ -1,7 +1,7 @@ { "Name": "RL2.API", "Author": "TacoConKvass", - "Version": "1.1.0", + "Version": "1.1.1", "ModAssembly": "RL2.API.dll", "LoadAfter": [] } \ No newline at end of file diff --git a/RL2.API/RL2API_Hooks.cs b/RL2.API/RL2API_Hooks.cs index dfd08fd..f4d904f 100644 --- a/RL2.API/RL2API_Hooks.cs +++ b/RL2.API/RL2API_Hooks.cs @@ -7,7 +7,7 @@ namespace RL2.API; public partial class RL2API { internal static Hook OnGameLoad_Hook = new Hook( - typeof(GameManager).GetMethod("Run", BindingFlags.NonPublic | BindingFlags.Instance), + typeof(OnGameLoadManager).GetMethod("Run", BindingFlags.NonPublic | BindingFlags.Static), (Action orig) => { orig(); foreach (Mod mod in LoadedMods) {