From 108997fd934885b21c7cc7af3fcde171d5c3cca9 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期日, 31 八月 2025 13:20:24 +0800
Subject: [PATCH] 50 【主界面】核心主体 - 卡牌

---
 Main/System/Main/AutoFightModel.cs |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/Main/System/Main/AutoFightModel.cs b/Main/System/Main/AutoFightModel.cs
index c0b1c8d..77d3471 100644
--- a/Main/System/Main/AutoFightModel.cs
+++ b/Main/System/Main/AutoFightModel.cs
@@ -210,7 +210,7 @@
     }
 
     public int fightingHeroSkinID;  //褰撳墠鎴樻枟鐨勮嫳闆勭毊鑲D
-    public string heroGuid;
+    public string heroGuid; //鎴樻枟涓殑姝﹀皢
     public event Action<bool> OnFightEvent; //鏄惁鎴樻枟閫氱煡
 
 
@@ -225,11 +225,21 @@
         if (!string.IsNullOrEmpty(guid))
             return;
 
-
+        //鍙�氱煡鐜╁姝﹀皢鐨勬垬鏂�
         if (teamHero.NPCID != 0)
             return;
+
         fightingHeroSkinID = teamHero.SkinID;
-        heroGuid = teamHero.guid;
+        //鎴樻枟鏃舵病鏈塆UID 锛岄�氳繃heroid鏌ユ壘
+        var hero = TeamManager.Instance.GetTeam(TeamType.Story).GetHeroByHeroID(teamHero.heroId);
+        if (hero != null)
+        {
+            heroGuid = hero.guid;
+        }
+        else
+        {
+            heroGuid = "";
+        }
         OnFightEvent?.Invoke(true);
     }
 

--
Gitblit v1.8.0