From f3ae8542aee4b5de78fc20d9543bb424b315708f Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 10 九月 2025 14:23:47 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts

---
 Main/System/HeroUI/HeroDeleteWin.cs |   20 +++++++++++++++-----
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/Main/System/HeroUI/HeroDeleteWin.cs b/Main/System/HeroUI/HeroDeleteWin.cs
index ddfb73e..fd7b9bf 100644
--- a/Main/System/HeroUI/HeroDeleteWin.cs
+++ b/Main/System/HeroUI/HeroDeleteWin.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Collections.Generic;
 using System.Linq;
 using UnityEngine;
@@ -5,7 +6,7 @@
 
 
 /// <summary>
-/// 姝﹀皢鍩瑰吇鐣岄潰
+/// 姝﹀皢閬f暎鐣岄潰
 /// </summary>
 public class HeroDeleteWin : UIBase
 {
@@ -150,7 +151,7 @@
             HeroInfo hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectDeleteHeroList[i]);
             if (hero == null)
                 continue;
-            if (hero.heroStar > 1)
+            if (hero.heroStarMaxBefore > 1)
             {
                 hasStarHero = true;
                 break;
@@ -192,16 +193,25 @@
             {
                 if (!tmpDict.ContainsKey(itemInfo[0]))
                 {
-                    tmpDict.Add(itemInfo[0], itemInfo[1] * (1 + hero.heroStar));
+                    tmpDict.Add(itemInfo[0], itemInfo[1] * (1 + hero.heroStarMaxBefore));
                 }
                 else
                 {
-                    tmpDict[itemInfo[0]] += itemInfo[1] * (1 + hero.heroStar);
+                    tmpDict[itemInfo[0]] += itemInfo[1] * (1 + hero.heroStarMaxBefore);
                 }
             }
 
             allItemDict = CommonFunc.AddDict(allItemDict, tmpDict);
         }
+
+        //璁$畻杩旇繕姣斾緥
+        var _list = allItemDict.Keys.ToList();
+        foreach (var key in _list)
+        {
+            allItemDict[key] = Math.Max((long)(allItemDict[key] * HeroUIManager.Instance.deletePayBackPer / 100.0), 1);
+        }
+
+
 
         List<Item> items = CommonFunc.ChangeToItemList(allItemDict);
         ConfirmCancel.ShowItemsConfirm(items, Language.Get("herocard25"), Language.Get("herocard26"), (bool isOk) =>
@@ -220,7 +230,7 @@
                 GameNetSystem.Instance.SendInfo(pack);
                 HeroUIManager.Instance.selectDeleteHeroList.Clear();
             }
-        });
+        }, itemName:$"( {HeroUIManager.Instance.deletePayBackPer}% )");
 
     }
 

--
Gitblit v1.8.0