1.修改野外战斗场景为指定场景
[HarmonyPatch(typeof(PlayerEncounter), "GetBattleSceneForMapPatch")]
public class GetBattleSceneForMapPatch
{
[DllImport("user32.dll", EntryPoint = "MessageBoxA")]
public static extern int MsgBox(int hWnd, string msg, string caption, int type);
public static bool Prefix(ref string __result)
{
MsgBox(0, "GetBattleSceneForMapPatch prefix", "msg box", 0x30);
__result = "p_song_battle_terrain_1";
return false;
}
public static void Postfix(ref string __result)
{
MsgBox(0, __result, "msg box", 0x30);
}
}
2.去除战斗音乐