static void Prefix(Wnd_GameMain __instance, ref PopupMenu ___MainMenu) { KLog.Dbg("[AmzHardCoreSaver] Prefix"); if (___MainMenu != null && World.Instance != null) { if (oldLength == 0) { oldLength = ___MainMenu._list.numItems; } if (___MainMenu._list.numItems <= oldLength) { if (World.Instance.GameMode == g_emGameMode.HardCore) { KLog.Dbg("[AmzHardCoreSaver] AddMenu"); // 替换为存档 ___MainMenu.AddItem(TFMgr.Get("存档"), (EventCallback0)(() => Wnd_Save.Instance.ShowSaveWnd(0))); // 替换为读档 ___MainMenu.AddItem(TFMgr.Get("读档"), (EventCallback0)(() => Wnd_Save.Instance.ShowSaveWnd(1))); } } } }
static void Postfix(Wnd_GameMain __instance, ref PopupMenu ___MainMenu) { }