yyl
2025-10-31 39001a600fcae2bcf27c225df8752d75fb92fef4
Main/System/Battle/BattleManager.cs
@@ -23,7 +23,9 @@
            QuickSetting.Instance.SendPackage();
        }
    }
    public readonly int[] speedIndexfuncIdArr = new int[] { 34, 35, 36 };  // 战斗倍数对应的功能ID
    public readonly int passFuncId = 33;    // 跳过战斗对应的功能ID
    public int passRound;   // 超过X回合可跳过
    public int fightGuideID;
    public int fightGuideMainLevelLimit;
    public int fightGuideNoClickSeconds;
@@ -54,6 +56,9 @@
        fightGuideID = int.Parse(config.Numerical1);
        fightGuideMainLevelLimit = int.Parse(config.Numerical2);
        fightGuideNoClickSeconds = int.Parse(config.Numerical3);
        config = FuncConfigConfig.Get("BattleButton");
        passRound= int.Parse(config.Numerical1);
    }
@@ -67,8 +72,8 @@
    protected void OnPlayerLoginOk()
    {
        long exAttr1 = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.ExAttr1);
        long exAttr2 = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.ExAttr2);
        long exAttr1 = PlayerDatas.Instance.baseData.ExAttr1;
        long exAttr2 = PlayerDatas.Instance.baseData.ExAttr2;
        int MapID = 1;
        int FuncLineID = (int)exAttr2;
@@ -586,6 +591,33 @@
        return null;
    }
    //发进入战斗包
    private float lastTime = 0f;
    private float turnCoolDown = 0.5f; // 冷却时间
    public void SendTurnFight(uint mapID, uint funcLineID = 0, byte tagType = 0, uint tagID = 0, uint[] valueList = null)
    {
        // 连续频繁发包,触发提示
        float currentTime = Time.time;
        if (currentTime - lastTime < turnCoolDown)
        {
            SysNotifyMgr.Instance.ShowTip("BattleCoolDown");
            return;
        }
        lastTime = currentTime;
        CB410_tagCMTurnFight pack = new CB410_tagCMTurnFight();
        pack.MapID = mapID;
        pack.FuncLineID = funcLineID;
        pack.TagType = tagType;
        pack.TagID = tagID;
        if (!valueList.IsNullOrEmpty())
        {
            pack.ValueList = valueList;
            pack.ValueCount = (byte)valueList.Length;
        }
        GameNetSystem.Instance.SendInfo(pack);
    }
    // 获取当前正在显示的战斗场景名称,如果没有则返回空字符串
    public string GetActiveBattleName()
    {