From df1fb7ccdf835443e72fc9f02cde0e26916e5235 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 30 十月 2025 14:15:54 +0800
Subject: [PATCH] 130 战斗系统-客户端 加速与跳过按钮增加条件
---
Main/System/Battle/BattleManager.cs | 7 ++++++-
Main/System/Battle/BaseBattleWin.cs | 17 +++++++++++++++--
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/Main/System/Battle/BaseBattleWin.cs b/Main/System/Battle/BaseBattleWin.cs
index ec9484d..0e37401 100644
--- a/Main/System/Battle/BaseBattleWin.cs
+++ b/Main/System/Battle/BaseBattleWin.cs
@@ -195,6 +195,15 @@
{
if (null == battleField)
return;
+ if (!FuncOpen.Instance.IsFuncOpen(BattleManager.Instance.passFuncId, true))
+ return;
+ int passRound = BattleManager.Instance.passRound;
+ int nowRound = battleField.round;
+ if (nowRound <= passRound)
+ {
+ SysNotifyMgr.Instance.ShowTip("BattlePass", passRound - nowRound);
+ return;
+ }
battleField.ForceFinish();
}
@@ -205,10 +214,14 @@
{
if (null == battleField)
return;
-
+ // 璁$畻涓嬩竴涓�熷害妗d綅鐨勭储寮�
+ int nextSpeedIndex = (BattleManager.Instance.speedIndex + 1) % BattleManager.Instance.speedGear.Length;
+ // 妫�鏌ヤ笅涓�妗e�嶉�熷姛鑳芥槸鍚﹀紑鍚�
+ int nextSpeedFuncId = BattleManager.Instance.speedIndexfuncIdArr[nextSpeedIndex];
+ if (!FuncOpen.Instance.IsFuncOpen(nextSpeedFuncId, true))
+ return;
BattleManager.Instance.speedIndex = (BattleManager.Instance.speedIndex + 1) % BattleManager.Instance.speedGear.Length;
battleField.SetSpeedRatio(BattleManager.Instance.speedGear[BattleManager.Instance.speedIndex]);
-
if (textSpeed != null)
textSpeed.text = (BattleManager.Instance.speedIndex + 1).ToString();
}
diff --git a/Main/System/Battle/BattleManager.cs b/Main/System/Battle/BattleManager.cs
index fe2abf2..f879dec 100644
--- a/Main/System/Battle/BattleManager.cs
+++ b/Main/System/Battle/BattleManager.cs
@@ -23,7 +23,9 @@
QuickSetting.Instance.SendPackage();
}
}
-
+ public readonly int[] speedIndexfuncIdArr = new int[] { 34, 35, 36 }; // 鎴樻枟鍊嶆暟瀵瑰簲鐨勫姛鑳絀D
+ public readonly int passFuncId = 33; // 璺宠繃鎴樻枟瀵瑰簲鐨勫姛鑳絀D
+ 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);
}
--
Gitblit v1.8.0