From 0e3029a3dc4375c7eab8de9ccf07b5a2595c0070 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期日, 24 八月 2025 00:05:59 +0800
Subject: [PATCH] 117 【武将】武将系统 - 武将属性查看,非主线上阵武将战力提升显示

---
 Main/System/Main/PlayerMainDate.cs |   49 ++++++++++++++++++++++++++++++-------------------
 1 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/Main/System/Main/PlayerMainDate.cs b/Main/System/Main/PlayerMainDate.cs
index 2711a38..b3d69bf 100644
--- a/Main/System/Main/PlayerMainDate.cs
+++ b/Main/System/Main/PlayerMainDate.cs
@@ -56,27 +56,12 @@
         }
         else
         {
-            if ((long)power > prowNum)
+            if ((long)power != prowNum)
             {
                 prowNumChange = (long)power - prowNum;
                 prowNum = (long)power;
-                isAdd = true;
-                if (customDisplayPower != null && customDisplayPower())
-                {
-                    return;
-                }
-                if (UIManager.Instance.IsOpened<PowerAddWin>())
-                {
-                    AddPowerEvent?.Invoke();
-                    return;
-                }
-                UIManager.Instance.OpenWindow<PowerAddWin>();
-            }
-            else if ((long)power < prowNum)
-            {
-                prowNumChange = prowNum - (long)power;
-                prowNum = (long)power;
-                isAdd = false;
+                isAdd = prowNumChange > 0;
+                prowNumChange = Math.Abs(prowNumChange);
                 if (customDisplayPower != null && customDisplayPower())
                 {
                     return;
@@ -108,7 +93,33 @@
     //     UIManager.Instance.OpenWindow<PowerAddWin>();
     // }
 
-  
+    /// <summary>
+    /// 姝﹀皢鑷韩鐨勬垬鍔涘彉鍖�
+    /// </summary>
+    /// <param name="hero"></param>
+    public void AddPowerNotOnTeam(HeroInfo hero)
+    {
+        if (HeroUIManager.Instance.lastFightPower.Key != hero.heroId)
+        {
+            return;
+        }
+
+        if (hero.IsInTeamByTeamType(TeamType.Story))
+        { 
+            return;
+        }
+
+        prowNumChange = hero.CalculatePower() - HeroUIManager.Instance.lastFightPower.Value;
+        isAdd = prowNumChange > 0;
+        prowNumChange = Math.Abs(prowNumChange);
+        prowNum = hero.CalculatePower();
+        if (UIManager.Instance.IsOpened<PowerAddWin>())
+        {
+            AddPowerEvent?.Invoke();
+            return;
+        }
+        UIManager.Instance.OpenWindow<PowerAddWin>();
+    }
 }
 
 

--
Gitblit v1.8.0