From b565a1003a6d35596540ac60d44c337ccafea955 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期六, 14 三月 2026 23:30:45 +0800
Subject: [PATCH] 540 子 【幻境阁】新增称号加成效果 / 【幻境阁】新增称号加成效果-客户端
---
Main/Config/Configs/HeroQualityConfig.cs | 14 +
Main/System/PhantasmPavilion/PhantasmPavilionTilteWin.cs | 10 +
Main/System/Tip/ConfirmCancel.cs | 4
Main/System/Tip/ItemsConfirmWin.cs | 2
Main/System/KnapSack/BackpackData.cs | 5
Main/System/BeautyMM/BeautyMMManager.cs | 2
Main/System/Tip/ItemsConfirmCell.cs | 14 +
Main/System/PhantasmPavilion/PhantasmPavilionModelWin.cs | 10
Main/System/PhantasmPavilion/PhantasmPavilionInfoCell.cs | 11 +
Main/System/PhantasmPavilion/PhantasmPavilionFaceWin.cs | 8
Main/System/PhantasmPavilion/PhantasmPavilionManager.cs | 13 +
Main/System/Scroll/ScrollerController.cs | 6
Main/Config/Configs/TitleConfig.cs | 172 +++++++++++++-----------
Main/System/PhantasmPavilion/PhantasmPavilionManager.Attr.cs | 74 ++++++++++
Main/System/HeroUI/HeroDeleteWin.cs | 67 +++++++++
15 files changed, 307 insertions(+), 105 deletions(-)
diff --git a/Main/Config/Configs/HeroQualityConfig.cs b/Main/Config/Configs/HeroQualityConfig.cs
index 4bae93b..d6e2729 100644
--- a/Main/Config/Configs/HeroQualityConfig.cs
+++ b/Main/Config/Configs/HeroQualityConfig.cs
@@ -1,6 +1,6 @@
锘�//--------------------------------------------------------
// [Author]: YYL
-// [ Date ]: Monday, December 8, 2025
+// [ Date ]: Saturday, March 14, 2026
//--------------------------------------------------------
using System.Collections.Generic;
@@ -24,6 +24,8 @@
public int StarAddPer;
public int[] BookActAwardMoney;
public int[][] DismissReturnItems;
+ public int[][] BeautyReturnItems;
+ public int[][] TitleReturnItems;
public int[] RecommendAwardMoney;
public override int LoadKey(string _key)
@@ -64,13 +66,17 @@
DismissReturnItems = JsonMapper.ToObject<int[][]>(tables[7].Replace("(", "[").Replace(")", "]"));
- if (tables[8].Contains("["))
+ BeautyReturnItems = JsonMapper.ToObject<int[][]>(tables[8].Replace("(", "[").Replace(")", "]"));
+
+ TitleReturnItems = JsonMapper.ToObject<int[][]>(tables[9].Replace("(", "[").Replace(")", "]"));
+
+ if (tables[10].Contains("["))
{
- RecommendAwardMoney = JsonMapper.ToObject<int[]>(tables[8]);
+ RecommendAwardMoney = JsonMapper.ToObject<int[]>(tables[10]);
}
else
{
- string[] RecommendAwardMoneyStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ string[] RecommendAwardMoneyStringArray = tables[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
RecommendAwardMoney = new int[RecommendAwardMoneyStringArray.Length];
for (int i=0;i<RecommendAwardMoneyStringArray.Length;i++)
{
diff --git a/Main/Config/Configs/TitleConfig.cs b/Main/Config/Configs/TitleConfig.cs
index b73297e..d4741aa 100644
--- a/Main/Config/Configs/TitleConfig.cs
+++ b/Main/Config/Configs/TitleConfig.cs
@@ -1,69 +1,73 @@
-锘�//--------------------------------------------------------
-// [Author]: YYL
-// [ Date ]: 2025骞�11鏈�18鏃�
-//--------------------------------------------------------
-
-using System.Collections.Generic;
-using System;
-using UnityEngine;
-using LitJson;
-
-public partial class TitleConfig : ConfigBase<int, TitleConfig>
-{
- static TitleConfig()
- {
- // 璁块棶杩囬潤鎬佹瀯閫犲嚱鏁�
- visit = true;
- }
-
- public int TitleID;
- public int TabType;
- public string Name;
- public int ResourceType;
- public string ResourceValue;
- public int ExpireMinutes;
- public int UnlockWay;
- public int UnlockValue;
- public int UnlockNeedCnt;
- public int UpNeedCnt;
- public int StarMax;
- public int[] AttrIDList;
- public int[] InitAttrValueList;
- public int[] AttrPerStarAddList;
- public string GetWayString;
-
- public override int LoadKey(string _key)
- {
- int key = GetKey(_key);
- return key;
- }
-
- public override void LoadConfig(string input)
- {
- try {
- string[] tables = input.Split('\t');
- int.TryParse(tables[0],out TitleID);
-
- int.TryParse(tables[1],out TabType);
-
- Name = tables[2];
-
- int.TryParse(tables[3],out ResourceType);
-
- ResourceValue = tables[4];
-
- int.TryParse(tables[5],out ExpireMinutes);
-
- int.TryParse(tables[6],out UnlockWay);
-
- int.TryParse(tables[7],out UnlockValue);
-
- int.TryParse(tables[8],out UnlockNeedCnt);
-
- int.TryParse(tables[9],out UpNeedCnt);
-
- int.TryParse(tables[10],out StarMax);
-
+锘�//--------------------------------------------------------
+// [Author]: YYL
+// [ Date ]: Saturday, March 14, 2026
+//--------------------------------------------------------
+
+using System.Collections.Generic;
+using System;
+using UnityEngine;
+using LitJson;
+
+public partial class TitleConfig : ConfigBase<int, TitleConfig>
+{
+ static TitleConfig()
+ {
+ // 璁块棶杩囬潤鎬佹瀯閫犲嚱鏁�
+ visit = true;
+ }
+
+ public int TitleID;
+ public int TabType;
+ public string Name;
+ public int ResourceType;
+ public string ResourceValue;
+ public int ExpireMinutes;
+ public int UnlockWay;
+ public int UnlockValue;
+ public int UnlockNeedCnt;
+ public int UpNeedCnt;
+ public int StarMax;
+ public int[] AttrIDList;
+ public int[] InitAttrValueList;
+ public int[] AttrPerStarAddList;
+ public int EffType;
+ public int EffTypeValue;
+ public int EffValue;
+ public int EffPerStarAdd;
+ public string GetWayString;
+
+ public override int LoadKey(string _key)
+ {
+ int key = GetKey(_key);
+ return key;
+ }
+
+ public override void LoadConfig(string input)
+ {
+ try {
+ string[] tables = input.Split('\t');
+ int.TryParse(tables[0],out TitleID);
+
+ int.TryParse(tables[1],out TabType);
+
+ Name = tables[2];
+
+ int.TryParse(tables[3],out ResourceType);
+
+ ResourceValue = tables[4];
+
+ int.TryParse(tables[5],out ExpireMinutes);
+
+ int.TryParse(tables[6],out UnlockWay);
+
+ int.TryParse(tables[7],out UnlockValue);
+
+ int.TryParse(tables[8],out UnlockNeedCnt);
+
+ int.TryParse(tables[9],out UpNeedCnt);
+
+ int.TryParse(tables[10],out StarMax);
+
if (tables[11].Contains("["))
{
AttrIDList = JsonMapper.ToObject<int[]>(tables[11]);
@@ -76,8 +80,8 @@
{
int.TryParse(AttrIDListStringArray[i],out AttrIDList[i]);
}
- }
-
+ }
+
if (tables[12].Contains("["))
{
InitAttrValueList = JsonMapper.ToObject<int[]>(tables[12]);
@@ -90,8 +94,8 @@
{
int.TryParse(InitAttrValueListStringArray[i],out InitAttrValueList[i]);
}
- }
-
+ }
+
if (tables[13].Contains("["))
{
AttrPerStarAddList = JsonMapper.ToObject<int[]>(tables[13]);
@@ -104,13 +108,21 @@
{
int.TryParse(AttrPerStarAddListStringArray[i],out AttrPerStarAddList[i]);
}
- }
-
- GetWayString = tables[14];
- }
- catch (Exception exception)
- {
- Debug.LogError(exception);
- }
- }
-}
+ }
+
+ int.TryParse(tables[14],out EffType);
+
+ int.TryParse(tables[15],out EffTypeValue);
+
+ int.TryParse(tables[16],out EffValue);
+
+ int.TryParse(tables[17],out EffPerStarAdd);
+
+ GetWayString = tables[18];
+ }
+ catch (Exception exception)
+ {
+ Debug.LogError(exception);
+ }
+ }
+}
diff --git a/Main/System/BeautyMM/BeautyMMManager.cs b/Main/System/BeautyMM/BeautyMMManager.cs
index 978a0bd..705c310 100644
--- a/Main/System/BeautyMM/BeautyMMManager.cs
+++ b/Main/System/BeautyMM/BeautyMMManager.cs
@@ -782,6 +782,7 @@
// 2.婕旀鍦烘寫鎴樿儨鍒╋紝姒傜巼棰濆鑾峰緱1涓墿鍝佺殑姒傜巼 鐗╁搧ID 姒傜巼
// 3.娓稿巻浣撳姏涓婇檺澧炲姞 鏃� 澧炲姞涓婇檺
// 4.鐧介鐩堥噹鎵崱棰濆鐗╁搧濂栧姳 鐗╁搧ID 涓暟
+// 5. 閬f暎/鍚炲櫖姝﹀皢棰濆杩旇繕 鏃� 鐧惧垎姣�
public enum TalentEffectType
{
@@ -789,5 +790,6 @@
Arena = 2,
Travel = 3,
BoneField = 4,
+ HeroDelete = 5,
}
diff --git a/Main/System/HeroUI/HeroDeleteWin.cs b/Main/System/HeroUI/HeroDeleteWin.cs
index ee7189a..b181103 100644
--- a/Main/System/HeroUI/HeroDeleteWin.cs
+++ b/Main/System/HeroUI/HeroDeleteWin.cs
@@ -242,9 +242,72 @@
allItemDict[key] = Math.Max((long)(allItemDict[key] * HeroUIManager.Instance.deletePayBackPer / 100.0), 1);
}
+ List<Item> items = new List<Item>();
+ foreach (var data in allItemDict)
+ {
+ items.Add(new Item(data.Key, data.Value, _dataEx:$"( {HeroUIManager.Instance.deletePayBackPer}% )"));
+ }
+ Dictionary<int, long> moreMMItemDict = new Dictionary<int, long>();
+ Dictionary<int, long> moreTitleItemDict = new Dictionary<int, long>();
+ int beautyEffectPer = BeautyMMManager.Instance.GetTalentEffectByType(TalentEffectType.HeroDelete);
+ int titleEffect = PhantasmPavilionManager.Instance.GetTotalTalentValue(PhantasmPavilionType.Title, 3);
+ //绾㈤鍜岀О鍙烽澶栬幏寰�
+ if (beautyEffectPer > 0)
+ {
+ for (int i = 0; i < HeroUIManager.Instance.selectDeleteHeroList.Count; i++)
+ {
+ HeroInfo hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectDeleteHeroList[i]);
+ if (hero == null)
+ continue;
- List<Item> items = CommonFunc.ChangeToItemList(allItemDict);
+ foreach (var tmp in hero.qualityConfig.BeautyReturnItems)
+ {
+ if (!moreMMItemDict.ContainsKey(tmp[0]))
+ {
+ moreMMItemDict.Add(tmp[0], (long)Math.Ceiling(tmp[1] * beautyEffectPer / 100.0f));
+ }
+ else
+ {
+ moreMMItemDict[tmp[0]] += (long)Math.Ceiling(tmp[1] * beautyEffectPer / 100.0f);
+ }
+ }
+
+ }
+
+ foreach (var key in moreMMItemDict.Keys)
+ {
+ items.Add(new Item(key, moreMMItemDict[key], 20, _dataEx: $"( {beautyEffectPer}% )"));
+ }
+ }
+ if (titleEffect > 0)
+ {
+ for (int i = 0; i < HeroUIManager.Instance.selectDeleteHeroList.Count; i++)
+ {
+ HeroInfo hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectDeleteHeroList[i]);
+ if (hero == null)
+ continue;
+
+ foreach (var tmp in hero.qualityConfig.TitleReturnItems)
+ {
+ if (!moreTitleItemDict.ContainsKey(tmp[0]))
+ {
+ moreTitleItemDict.Add(tmp[0], (long)Math.Ceiling(tmp[1] * titleEffect / 100.0f));
+ }
+ else
+ {
+ moreTitleItemDict[tmp[0]] += (long)Math.Ceiling(tmp[1] * titleEffect / 100.0f);
+ }
+ }
+
+ }
+
+ foreach (var key in moreTitleItemDict.Keys)
+ {
+ items.Add(new Item(key, moreTitleItemDict[key], 30, _dataEx: $"( {titleEffect}% )"));
+ }
+ }
+
ConfirmCancel.ShowItemsConfirm(items, Language.Get("herocard25"), Language.Get("herocard26"), (bool isOk) =>
{
if (isOk)
@@ -261,7 +324,7 @@
GameNetSystem.Instance.SendInfo(pack);
HeroUIManager.Instance.selectDeleteHeroList.Clear();
}
- }, itemName:$"( {HeroUIManager.Instance.deletePayBackPer}% )");
+ });
}
diff --git a/Main/System/KnapSack/BackpackData.cs b/Main/System/KnapSack/BackpackData.cs
index 9b61513..c454b70 100644
--- a/Main/System/KnapSack/BackpackData.cs
+++ b/Main/System/KnapSack/BackpackData.cs
@@ -12,6 +12,7 @@
public long countEx;
public int quality;
public int useType; //鐢ㄩ�斿畾涔夛細0 榛樿鏃� 10 - 鍙ゅ疂 20 - 绾㈤ 30 - 绉板彿 40 -鍒嗚В
+ public string dataEx;
public Item(int _id, long _count)
{
@@ -19,17 +20,19 @@
this.quality = 0;
this.useType = 0;
this.countEx = _count;
+ this.dataEx = "";
}
- public Item(int _id, long _count, int _useType = 0, int _quality = 0)
+ public Item(int _id, long _count, int _useType = 0, int _quality = 0, string _dataEx = "")
{
this.id = _id;
this.quality = _quality;
this.useType = _useType;
this.countEx = _count;
+ this.dataEx = _dataEx;
}
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionFaceWin.cs b/Main/System/PhantasmPavilion/PhantasmPavilionFaceWin.cs
index 3963e99..11d6121 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionFaceWin.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionFaceWin.cs
@@ -158,14 +158,16 @@
void SelectTeamFunc(PhantasmPavilionType type, bool isRemove = false)
{
+ var lastType = manager.nowType;
+ manager.nowType = type;
+
manager.SetSelectItemId(type);
if (isRemove)
{
- manager.RemoveAllNewHeroByTabType(manager.nowType);
+ manager.RemoveAllNewHeroByTabType(lastType);
manager.UpdateRedPoint();
- RefreshAll(manager.nowType, false);
+ RefreshAll(lastType, false);
}
- manager.nowType = type;
CreateAll(type);
}
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionInfoCell.cs b/Main/System/PhantasmPavilion/PhantasmPavilionInfoCell.cs
index 8836015..1e26584 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionInfoCell.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionInfoCell.cs
@@ -10,6 +10,17 @@
{
int id = cellView.info.Value.infoInt1;
PhantasmPavilionType type = manager.nowType;
+ //澶╄祴
+ if (index == 10000)
+ {
+ txtUnLockInfo.SetActive(true);
+ txtAddInfo.SetActive(false);
+ var effectInfo = PhantasmPavilionManager.Instance.GetTalentString(type, id);
+ txtUnLockInfo.text = effectInfo;
+ return;
+ }
+
+ //灞炴��
int[] attrIDList = manager.GetAttrIDList(type, id);
int[] initAttrValueList = manager.GetInitAttrValueList(type, id);
if (attrIDList.IsNullOrEmpty() || initAttrValueList.IsNullOrEmpty()
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionManager.Attr.cs b/Main/System/PhantasmPavilion/PhantasmPavilionManager.Attr.cs
index 00ecd7e..8b13ece 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionManager.Attr.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionManager.Attr.cs
@@ -108,4 +108,78 @@
int attrPerStarAdd = attrPerStarAddList[AttrIndex];
return initAttrValue + info.Star * attrPerStarAdd;
}
+
+
+ /// <summary>
+ /// 鑾峰緱鍗曞璞$殑澶╄祴鏁堟灉
+ /// </summary>
+ /// <param name="id">ID</param>
+ /// <param name="defaultAttr">鑷冲皯杩斿洖榛樿鐨� 濡傛湭婵�娲荤殑鏃跺��</param>
+ /// <returns>杩斿洖澶╄祴ID - 鏁堟灉鍊硷紝0浠h〃娌℃湁澶╄祴</returns>
+ public Int2 GetTalentEffect(PhantasmPavilionType type, int id)
+ {
+ if (PhantasmPavilionType.Title != type)
+ {
+ return new Int2(0, 0);
+ }
+ var config = TitleConfig.Get(id);
+ if (TryGetInfo(PhantasmPavilionType.Title, id, out PhantasmPavilionData info))
+ {
+ if (info.State)
+ {
+ return new Int2(config.EffType, config.EffValue + info.Star * config.EffPerStarAdd);
+ }
+ }
+
+ //鏈縺娲昏繑鍥為粯璁�
+ return new Int2(config.EffType, config.EffValue);
+ }
+
+ public string GetTalentString(PhantasmPavilionType type, int id)
+ {
+ if (PhantasmPavilionType.Title != type)
+ {
+ return "";
+ }
+ var config = TitleConfig.Get(id);
+ var values = GetTalentEffect(type, id);
+
+ switch (config.EffType)
+ {
+ case 1:
+ return Language.Get("HJGTalent1", ItemConfig.Get(config.EffTypeValue).ItemName, values.y);
+ default:
+ return Language.Get($"HJGTalent{config.EffType}", values.y);
+ }
+ }
+
+ /// <summary>
+ /// 鑾峰緱鎵�鏈夊璞$殑澶╄祴鎬诲��
+ /// </summary>
+ public int GetTotalTalentValue(PhantasmPavilionType type, int effctType)
+ {
+ if (PhantasmPavilionType.Title != type)
+ {
+ return 0;
+ }
+ var effectValue = 0;
+ dataDict.TryGetValue(type, out var dict);
+ if (dict == null)
+ {
+ return 0;
+ }
+ foreach (var info in dict.Values)
+ {
+ if (!info.State)
+ {
+ continue;
+ }
+ var config = TitleConfig.Get((int)info.ID);
+ if (config.EffType != effctType)
+ continue;
+ effectValue += GetTalentEffect(type, (int)info.ID).y;
+ }
+ return effectValue;
+
+ }
}
\ No newline at end of file
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs b/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
index 52ce53f..78c3f77 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionManager.cs
@@ -327,6 +327,18 @@
// 鏈夋病鏈夊睘鎬�
public bool HasInitAttr(PhantasmPavilionType type, int id)
{
+ if (type == PhantasmPavilionType.Title)
+ {
+ //绉板彿鏈夌壒娈婂ぉ璧嬫晥鏋�
+ var cfg = TitleConfig.Get(id);
+ if (cfg == null)
+ {
+ Debug.LogError($"TitleConfig.Get(id) is null, id: {id}");
+ return false;
+ }
+ if(cfg.EffType > 0)
+ return true;
+ }
if (!Has(type, id))
return false;
int[] attrIDList = GetAttrIDList(type, id);
@@ -812,6 +824,7 @@
GameNetSystem.Instance.SendInfo(pack);
}
+
}
public class PhantasmPavilionData
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionModelWin.cs b/Main/System/PhantasmPavilion/PhantasmPavilionModelWin.cs
index 6cc20c6..77a7fa0 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionModelWin.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionModelWin.cs
@@ -112,15 +112,17 @@
void SelectTeamFunc(PhantasmPavilionType type, int order, bool isRemove = false)
{
+ var lastType = manager.nowType;
+ var lastOrder = functionOrder;
+ manager.nowType = type;
+ functionOrder = order;
manager.SetSelectItemId(type, order + 1);
if (isRemove)
{
- manager.RemoveAllNewHeroByTabType(manager.nowType, functionOrder + 1);
+ manager.RemoveAllNewHeroByTabType(lastType, lastOrder + 1);
manager.UpdateRedPoint();
- RefreshAll(manager.nowType, functionOrder + 1, false);
+ RefreshAll(lastType, lastOrder + 1, false);
}
- manager.nowType = type;
- functionOrder = order;
CreateAll();
}
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionTilteWin.cs b/Main/System/PhantasmPavilion/PhantasmPavilionTilteWin.cs
index f976df1..e1f5629 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionTilteWin.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionTilteWin.cs
@@ -109,9 +109,9 @@
void SelectTeamFunc(PhantasmPavilionType type, int order)
{
- manager.SetSelectItemId(type, order + 1);
manager.nowType = type;
functionOrder = order;
+ manager.SetSelectItemId(type, order + 1);
CreateTitleScroller();
CreateAll();
}
@@ -248,6 +248,14 @@
scrInfo.AddCell(ScrollerDataType.Header, i, cellInfo);
}
}
+
+ //绉板彿鏈夊ぉ璧�
+ if (TitleConfig.Get(id).EffType > 0)
+ {
+ CellInfo cellInfo = new CellInfo();
+ cellInfo.infoInt1 = id;
+ scrInfo.AddCell(ScrollerDataType.Header, 10000, cellInfo);
+ }
scrInfo.Restart();
}
diff --git a/Main/System/Scroll/ScrollerController.cs b/Main/System/Scroll/ScrollerController.cs
index e08426b..6e3db1d 100644
--- a/Main/System/Scroll/ScrollerController.cs
+++ b/Main/System/Scroll/ScrollerController.cs
@@ -367,11 +367,13 @@
if (horizontal)
{
- rect.sizeDelta = rect.sizeDelta.SetX(Math.Min(jiaMiddleWithMaxSize, (m_CellHeaderPrefab.height + m_Scorller.spacing) * _data.Count - m_Scorller.spacing));
+ rect.sizeDelta = rect.sizeDelta.SetX(Math.Min(jiaMiddleWithMaxSize, (m_CellHeaderPrefab.height + m_Scorller.spacing) * _data.Count - m_Scorller.spacing +
+ m_Scorller.padding.right + m_Scorller.padding.left));
}
else if (vertical)
{
- rect.sizeDelta = rect.sizeDelta.SetY(Math.Min(jiaMiddleWithMaxSize, (m_CellHeaderPrefab.height + m_Scorller.spacing) * _data.Count - m_Scorller.spacing));
+ rect.sizeDelta = rect.sizeDelta.SetY(Math.Min(jiaMiddleWithMaxSize, (m_CellHeaderPrefab.height + m_Scorller.spacing) * _data.Count - m_Scorller.spacing +
+ m_Scorller.padding.top + m_Scorller.padding.bottom));
}
if (rect.sizeDelta.x < jiaMiddleWithMaxSize)
{
diff --git a/Main/System/Tip/ConfirmCancel.cs b/Main/System/Tip/ConfirmCancel.cs
index dfd4ad4..6492c47 100644
--- a/Main/System/Tip/ConfirmCancel.cs
+++ b/Main/System/Tip/ConfirmCancel.cs
@@ -267,7 +267,6 @@
public static int moneyNeedCount;
public static List<Item> getItems { get; private set; }
- public static string replaceItemName;
/// <summary>
/// 澶氱墿鍝佸睍绀虹‘璁ゆ
/// </summary>
@@ -280,7 +279,7 @@
/// <param name="moneyCnt"></param>
/// <param name="type"></param>
public static void ShowItemsConfirm(List<Item> items, string tiltle, string info, Action<bool> func,
- string info2 = "", string btnText = "", int moneyCnt = 0, int type = 0, string itemName = "")
+ string info2 = "", string btnText = "", int moneyCnt = 0, int type = 0)
{
getItems = items;
generalTitle = tiltle;
@@ -290,7 +289,6 @@
OnPopConfirmClickEvent = func;
moneyType = type;
moneyNeedCount = moneyCnt;
- replaceItemName = itemName;
if (!UIManager.Instance.IsOpened<ItemsConfirmWin>())
{
UIManager.Instance.OpenWindow<ItemsConfirmWin>();
diff --git a/Main/System/Tip/ItemsConfirmCell.cs b/Main/System/Tip/ItemsConfirmCell.cs
index 9415abc..253f270 100644
--- a/Main/System/Tip/ItemsConfirmCell.cs
+++ b/Main/System/Tip/ItemsConfirmCell.cs
@@ -5,15 +5,21 @@
{
[SerializeField] ItemCell itemCell;
[SerializeField] Text itemName;
+ [SerializeField] Image sourceImg;
- public void Display(int index, string replaceItemName)
+ public void Display(int index)
{
- int itemID = ConfirmCancel.getItems[index].id;
- itemCell.Init(new ItemCellModel(itemID, false, ConfirmCancel.getItems[index].countEx));
+ var item = ConfirmCancel.getItems[index];
+ int itemID = item.id;
+ itemCell.Init(new ItemCellModel(itemID, false, item.countEx));
itemCell.button.SetListener(() =>
{
ItemTipUtility.Show(itemID);
});
- itemName.text = string.IsNullOrEmpty(replaceItemName) ? ItemConfig.Get(itemID).ItemName : replaceItemName;
+ itemName.text = string.IsNullOrEmpty(item.dataEx) ? ItemConfig.Get(itemID).ItemName : item.dataEx;
+
+ sourceImg.SetActive(item.useType != 0);
+ sourceImg.SetSprite($"AwardMark{item.useType}");
+ sourceImg.SetNativeSize();
}
}
diff --git a/Main/System/Tip/ItemsConfirmWin.cs b/Main/System/Tip/ItemsConfirmWin.cs
index f4b53d0..50df629 100644
--- a/Main/System/Tip/ItemsConfirmWin.cs
+++ b/Main/System/Tip/ItemsConfirmWin.cs
@@ -76,7 +76,7 @@
void OnRefreshCell(ScrollerDataType type, CellView cell)
{
var _cell = cell as ItemsConfirmCell;
- _cell?.Display(cell.index, ConfirmCancel.replaceItemName);
+ _cell?.Display(cell.index);
}
void CreateScroller()
--
Gitblit v1.8.0