public static bool EnterBattle_Path(BattleManager __instance, BattleType battleType, List <int> playerChrIDList)
        {
            // 如果MOD状态是关闭的话
            if (!FormationMod.enable)
            {
                // 执行原本的方法
                return(true);
            }
            __instance.mAutoBattle = false;
            __instance.IsOver      = false;
            TimeModel instance = SingletonMonoBehaviour <TimeModel> .Instance;
            int       timeStop = instance.TimeStop;

            instance.TimeStop = timeStop + 1;
            GameTempValue.GameSpeedHotKeyLock++;
            GameTempValue.MapMoveHotKeyLock++;
            GameTempValue.SamllMapKeyLock++;
            GameTempValue.TapKeyLock++;
            GameTempValue.BackpackKeyLock++;
            //__instance.mBattleEntityIDMap.Clear();
            Dictionary <int, int> mBattleEntityIDMap = Traverse.Create(__instance).Field("mBattleEntityIDMap").GetValue <Dictionary <int, int> >();

            mBattleEntityIDMap.Clear();

            __instance.Show();
            // battle类型无法直接赋值
            Traverse mBattleTypeTraverse = Traverse.Create(__instance).Property("BattleType");

            mBattleTypeTraverse.SetValue(battleType);
            bool flag = battleType != BattleType.Invade;

            if (flag)
            {
                SingletonMonoBehaviour <MapModel> .Instance.AddState(MapPlayerState.Battle);
            }
            List <int> list;

            using (ListPool <int> .Block(out list))
            {
                foreach (KeyValuePair <int, string> keyValuePair in __instance.mEnemyTeamMap)
                {
                    int key = keyValuePair.Key;
                    list.Add(key);
                    // 不在这里进行buff添加
                    //Character chrByID = SingletonMonoBehaviour<CharacterModel>.Instance.GetChrByID(key);
                    //chrByID.AddAllMartialModifier();
                }
                __instance.PrepareBattleEntities(list, 1);
            }
            List <BattleEntity> list2;

            using (ListPool <BattleEntity> .Block(out list2))
            {
                __instance.GetEntityList(1, list2);
                for (int i = 0; i < list2.Count; i++)
                {
                    BattleEntityView battleEntityView = __instance.AddEntityView(list2[i], EntityForward.Left);
                    battleEntityView.transform.localPosition = __instance.GetScenePosByEntityPos(1, i);
                }
            }
            __instance.mPlayerTeamChrIDList.Clear();
            foreach (int num in playerChrIDList)
            {
                Character chrByID2 = SingletonMonoBehaviour <CharacterModel> .Instance.GetChrByID(num);

                bool flag2 = chrByID2.IsPlayer();
                if (flag2)
                {
                    __instance.mPlayerTeamChrIDList.Add(num);
                }
            }
            __instance.PrepareBattleEntities(playerChrIDList, 0);
            List <BattleEntity> list3 = ListPool <BattleEntity> .Get();

            __instance.GetEntityList(0, list3);
            for (int j = 0; j < list3.Count; j++)
            {
                BattleEntityView battleEntityView2 = __instance.AddEntityView(list3[j], EntityForward.Right);
                battleEntityView2.transform.localPosition = __instance.GetScenePosByEntityPos(0, j);
            }
            ListPool <BattleEntity> .Recycle(list3);

            string text  = null;
            bool   flag3 = battleType != BattleType.Invade;

            if (flag3)
            {
                RegionInfo curRegionInfo = SingletonMonoBehaviour <MapModel> .Instance.GetCurRegionInfo();

                text = curRegionInfo.BattleBG;
            }
            bool flag4 = string.IsNullOrEmpty(text);

            if (flag4)
            {
                text = "battle_bg_town0.prefab";
            }
            GameObject gameObject = (GameObject)Singleton <ResourcesManager> .Instance.GetInstance(text, string.Empty);

            bool flag5 = gameObject != null;

            if (flag5)
            {
                TransformContainer mContainer = Traverse.Create(__instance).Field("mContainer").GetValue <TransformContainer>();
                gameObject.transform.SetParent(mContainer["BackgroundRoot"].transform);
                gameObject.transform.localScale = Vector3.one;

                Traverse mBackground = Traverse.Create(__instance).Field("mBackground");
                mBackground.SetValue(new TransformContainer(gameObject.transform));
                //mBackground = new TransformContainer(gameObject.transform);
            }
            SingletonMonoBehaviour <UIManager> .Instance.HideAll();

            SingletonMonoBehaviour <UIManager> .Instance.OpenUnique(PanelEnum.Battle, Array.Empty <object>());

            AudioClip audioClip = SingletonMonoBehaviour <AudioModel> .Instance.GetAudioClip(SingletonMonoBehaviour <AudioModel> .Instance.mGameData.BattleStart);

            BGMLoop = SingletonMonoBehaviour <AudioModel> .Instance.GetAudioClip(SingletonMonoBehaviour <AudioModel> .Instance.mGameData.BattleLoop);

            SingletonMonoBehaviour <AudioManager> .Instance.PauseGameBGM();

            // bgm添加监听
            SingletonMonoBehaviour <AudioManager> .Instance.PlayMusic(audioClip, false, 0, new Action(OnBGMStartEnd_Patch));

            // 返回false表示不执行原方法
            return(false);
        }