From 09bc892c7283df8757a07b646d5af21ddaa263d1 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 06 十一月 2025 18:22:34 +0800
Subject: [PATCH] 164 天子的考验-客户端

---
 Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs |   71 +++++++++--------------------------
 1 files changed, 18 insertions(+), 53 deletions(-)

diff --git a/Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs b/Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs
index 636cc37..c4f1ed9 100644
--- a/Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs
+++ b/Main/System/Battle/BattleField/OperationAgent/HandModeOperationAgent.cs
@@ -5,77 +5,42 @@
 public class HandModeOperationAgent : IOperationAgent
 {
 	protected StoryBattleField storyBattleField;
+	bool autoNext = false;	//棰勫瓨鐜╁鐨勪笅涓�娆℃敾鍑伙紝璁╀笅涓�娆¤嚜鍔ㄦ墽琛岋紝鍥犱负鐜╁鐐圭殑鏃舵満涓嶄竴瀹氭槸鍒氬ソ鐨勫彲鏀诲嚮鐘舵��
 
 	public HandModeOperationAgent(BattleField battleField) : base(battleField)
 	{
 		storyBattleField = battleField as StoryBattleField;
 	}
 
+	float lastTime;
 	public override void Run()
 	{
 		base.Run();
+		if (autoNext)
+		{
+			if (Time.time - lastTime < 0.1f)
+				return;
+			lastTime = Time.time;
+			if (storyBattleField.RequestFight())
+			{
+				//鐩村埌鎴愬姛涓烘
+				autoNext = false;
+			}
+		}
 	}
 
 	//	閫氳繃涓荤晫闈㈢殑鎸夐挳鎺ㄥ姩(璋冪敤)DoNext
 	public override void DoNext()
 	{
 		base.DoNext();
-
-		//	褰撳墠娌℃湁鍦ㄦ挱鏀炬垬鏂楀綍鍍�
-		if (!battleField.recordPlayer.IsPlaying())
+		if (!storyBattleField.RequestFight())
 		{
-			// 娌℃湁涓嬩竴涓寘鍙互鍙戜簡
-			if (!BattleManager.Instance.DistributeNextPackage())
-			{
-				//	璇锋眰涓嬩竴涓垬鏂楀寘 鎴栬�呮鏌ユ垬鏂楁槸鍚︾粨鏉�
-				// ReqType; // 0-鍋滄鎴樻枟鍥炲煄锛�1-璁剧疆娑堣�楀�嶅�硷紱2-鎸戞垬鍏冲崱灏忔�紱3-鎸戞垬鍏冲崱boss锛�4-缁х画鎴樻枟锛�
-
-				//	濡傛灉鍦ㄤ紤鎭� 鐐逛竴涓嬩箣鍚庡簲璇ユ槸鎸戞垬灏忔�垨鑰呮寫鎴樺叧鍗�
-				//  濡傛灉鍦ㄦ垬鏂� 鎴樻枟鏄惁缁撴潫/鎴樻枟鎸佺画涓� 缁撴潫搴旇鏄寫鎴樹笅涓�鍏� 鎸佺画搴旇鏄户缁垬鏂�
-
-
-				//	妫�鏌ヤ竴涓嬮敜瀛愮殑娑堣��
-				//FightPoint             鐢ㄤ簬璁板綍娑堣�楁垬閿ゅ�嶆暟锛屽皬浜庣瓑浜�1鏃堕粯璁�1鍊嶏紝澶т簬1鏃朵负瀵瑰簲娑堣�楀�嶅�硷紝0418鍒锋柊绫诲瀷22
-				ulong costRate = PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.FightPoint);
-
-				ulong cost = (costRate > 1 ? costRate : 1) * 1; // 1鏄粯璁ゆ秷鑰�
-
-				//	妫�鏌ヤ竴涓嬮敜瀛愮殑娑堣��
-				if (!ItemLogicUtility.CheckCurrencyCount(41, cost, true))
-				{
-					return;
-				}
-
-				byte reqType;
-
-				if (storyBattleField.battleState == StoryBattleState.Break)
-				{
-					reqType = 2;
-				}
-				else if (storyBattleField.battleState == StoryBattleState.Battle)
-				{
-					if (battleField.IsBattleEnd())
-					{
-						reqType = 2; // 缁х画鎸戞垬灏忔��
-					}
-					else
-					{
-						reqType = 4; // 缁х画鎴樻枟
-					}
-				}
-				else
-				{
-					Debug.LogError("unknown battle state");
-					return;
-				}
-
-				BattleManager.Instance.MainFightRequest(reqType);
-			}
+			autoNext = true;
 		}
 		else
-		{
-			Debug.LogError("action doesnt finish, wait a moment please");
-		}
+        {
+            autoNext = false;
+        }
 	}
 
 

--
Gitblit v1.8.0