// 休眠1s后卸载钩子 private static void releasehook() { Thread.Sleep(1000); if (mcapi != null) { bool unhooked = mcapi.csunhook(Marshal.GetFunctionPointerForDelegate(cs_crthookptr), ref _CS_ONCREATEPLAYER_org); if (unhooked) { Console.WriteLine("[C# unhook] release hook join listen."); } } }
// 还原原地图玩法 private static void explayunlock() { mapi.csunhook(Marshal.GetFunctionPointerForDelegate(explay), ref exorg); }