From 453e96025c4f78888e11f8da85fbdb78245e23f9 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 29 十二月 2025 02:36:23 +0800
Subject: [PATCH] 351 【内政】红颜系统

---
 Main/System/KnapSack/Logic/CommonGetItemCell.cs         |    2 
 Main/System/BeautyMM/BeautyMMTalentEffectCell.cs.meta   |   11 
 Main/System/BeautyMM/BeautyMMTalentEffectCell.cs        |  135 +++++++++++
 Main/System/BeautyMM/BeautyMMTalentWin.cs.meta          |   11 
 Main/System/KnapSack/BackpackData.cs                    |   10 
 Main/System/BeautyMM/BeautyMMManager.cs                 |   78 ++++++
 Main/System/BeautyMM/BeautyMMTalentAttrCell.cs          |   41 +++
 Main/System/BeautyMM/BeautyMMTalentWin.cs               |  116 +++++++++
 Main/System/BeautyMM/BeautyMMTravelCell.cs              |   15 +
 Main/System/KnapSack/Logic/ItemLogicUtility.cs          |   95 ++++---
 Main/System/BeautyMM/BeautyMMShowWin.cs                 |   14 
 Main/System/BeautyMM/BeautyMMTalentAttrNameCell.cs      |   18 +
 Main/System/BeautyMM/BeautyMMTravelWin.cs               |   39 +++
 Main/System/KnapSack/Logic/CommonGetItem.cs             |   40 +-
 Main/System/BeautyMM/BeautyMMTalentAttrCell.cs.meta     |   11 
 Main/System/BeautyMM/BeautyMMManager.Travel.cs          |    8 
 Main/System/BoneField/BoneFieldManager.cs               |    5 
 Main/System/MainLevel/MainLevelDropCell.cs              |    4 
 Main/System/BeautyMM/BeautyMMListWin.cs                 |    2 
 Main/System/BeautyMM/BeautyMMTalentAttrNameCell.cs.meta |   11 
 20 files changed, 577 insertions(+), 89 deletions(-)

diff --git a/Main/System/BeautyMM/BeautyMMListWin.cs b/Main/System/BeautyMM/BeautyMMListWin.cs
index 0820869..bfb021c 100644
--- a/Main/System/BeautyMM/BeautyMMListWin.cs
+++ b/Main/System/BeautyMM/BeautyMMListWin.cs
@@ -14,7 +14,7 @@
     {
         seeAttrBtn.AddListener(() =>
         {
-            // UIManager.Instance.OpenWindow<BeautyMMAttrWin>();
+            AttributeManager.Instance.OpenTotalAttributeWin(BeautyMMManager.Instance.allMMTalentAttr);
         });
         allMMBtn.AddListener(() =>
         {
diff --git a/Main/System/BeautyMM/BeautyMMManager.Travel.cs b/Main/System/BeautyMM/BeautyMMManager.Travel.cs
index 8c722b2..9343aa6 100644
--- a/Main/System/BeautyMM/BeautyMMManager.Travel.cs
+++ b/Main/System/BeautyMM/BeautyMMManager.Travel.cs
@@ -39,7 +39,7 @@
 
         if (m_Result == 5)
         {
-            isClickDoor = false; //涓嶉渶瑕佸府蹇樿鑷姩閲嶇疆浜�
+            isClickDoor = false; //涓嶉渶瑕佸府鐜╁鑷姩閲嶇疆浜�
         }
 
         for (int i = 0; i < netPack.GridCnt; i++)
@@ -120,10 +120,12 @@
         return false;
     }
 
+
+
+    //娓稿巻浣撳姏
     public int GetMaxEnergy()
     {
-        var value = allMMTalentEffect.ContainsKey((int)TalentEffectType.Travel) ? allMMTalentEffect[(int)TalentEffectType.Travel] : 0;
-        return baseTravelEnergy + value;
+        return baseTravelEnergy + GetTalentEffectByType(TalentEffectType.Travel);
     }
 
 
diff --git a/Main/System/BeautyMM/BeautyMMManager.cs b/Main/System/BeautyMM/BeautyMMManager.cs
index 93d6575..ed9e807 100644
--- a/Main/System/BeautyMM/BeautyMMManager.cs
+++ b/Main/System/BeautyMM/BeautyMMManager.cs
@@ -27,7 +27,7 @@
     public int recoverTravelEnergyTime = 0;   // 鏁板��2锛氭仮澶�1鐐逛綋鍔涙墍闇�鏃堕棿锛屽垎閽�  
     public int[] travelRowCol = new int[2]; // 鏁板��3锛氭父鍘嗚鍒楁暟  琛寍鍒�
 
-    public Dictionary<int, int> allMMTalentAttr = new Dictionary<int, int>();
+    public Dictionary<int, long> allMMTalentAttr = new Dictionary<int, long>();
     public Dictionary<int, int> allMMTalentEffect = new Dictionary<int, int>();
 
 
@@ -163,6 +163,15 @@
         return null;
     }
 
+    public int GetMMLV(int mmID)
+    {
+        if (beautyMMDataDict.ContainsKey(mmID))
+        {
+            return beautyMMDataDict[mmID].LV;
+        }
+        return 0;
+    }
+
     public int GetUsedSkinID(int mmID)
     {
         if (beautyMMDataDict.ContainsKey(mmID))
@@ -199,9 +208,9 @@
     }
 
     // 鑾峰彇MM澶╄祴灞炴�у睘鎬�, defaultAttr 鏄惁浣跨敤榛樿灞炴��
-    public Dictionary<int, int> GetMMTalentAttrForUI(int mmID, bool defaultAttr = false)
+    public Dictionary<int, long> GetMMTalentAttrForUI(int mmID, bool defaultAttr = false)
     {
-        var _dict = new Dictionary<int, int>();
+        var _dict = new Dictionary<int, long>();
         if (beautyMMDataDict.ContainsKey(mmID))
         {
             var _beauty = beautyMMDataDict[mmID];
@@ -246,10 +255,18 @@
         return _dict;
     }
 
-    // 鐪熷疄灞炴��
-    public Dictionary<int, int> GetMMTalentAttr(int mmID)
+
+    public int GetTalentEffectByType(TalentEffectType type)
     {
-        var _dict = new Dictionary<int, int>();
+        var value = allMMTalentEffect.ContainsKey((int)type) ? allMMTalentEffect[(int)type] : 0;
+        return value;
+    }
+
+
+    // 鐪熷疄澶╄祴灞炴��
+    public Dictionary<int, long> GetMMTalentAttr(int mmID)
+    {
+        var _dict = new Dictionary<int, long>();
         if (beautyMMDataDict.ContainsKey(mmID))
         {
             var _beauty = beautyMMDataDict[mmID];
@@ -351,6 +368,36 @@
         return new Dictionary<int, int>();
     }
 
+    Dictionary<int, long> GetMMLVUPAttr(int mmID)
+    {
+        var mmConfig = BeautyConfig.Get(mmID);
+        //鍗囩骇鑾峰緱鐨勫睘鎬�
+        var _dict = new Dictionary<int, long>();
+        var lv = GetMMLV(mmID);
+        BeautyQualityLVConfig config;
+        for (int i = 1; i <= lv; i++)
+        {
+            BeautyQualityLVConfig.TryGetBeautyQualityLVConfig(mmConfig.BeautyQuality, lv, out config);
+            if (config != null)
+            {
+                for (int j = 0; j < config.AttrIDList.Length; j++)
+                {
+                    if (_dict.ContainsKey(config.AttrIDList[j]))
+                    {
+                        _dict[config.AttrIDList[j]] += config.AttrValueList[j];
+                    }
+                    else
+                    {
+                        _dict.Add(config.AttrIDList[j], config.AttrValueList[j]);
+                    }
+                }
+            }
+        }
+
+
+        return _dict;
+
+    }
 
     void RefreshAllTalen()
     {
@@ -369,6 +416,23 @@
                     allMMTalentAttr.Add(_key, _dict[_key]);
                 }
             }
+
+            //鍗囩骇灞炴��
+            var _dict1 = GetMMLVUPAttr(key);
+            //鍔犲埌allMMTalentAttr
+            foreach (var _key in _dict1.Keys)
+            {
+                if (allMMTalentAttr.ContainsKey(_key))
+                {
+                    allMMTalentAttr[_key] += _dict1[_key];
+                }
+                else
+                {
+                    allMMTalentAttr.Add(_key, _dict1[_key]);
+                }
+            }
+
+
             var _dict2 = GetMMTalentEffect(key);
             //鍔犲埌allMMTalentEffect
             foreach (var _key in _dict2.Keys)
@@ -584,6 +648,8 @@
     
     #endregion
     
+
+
 }
 
 
diff --git a/Main/System/BeautyMM/BeautyMMShowWin.cs b/Main/System/BeautyMM/BeautyMMShowWin.cs
index 809aafd..3d5fd09 100644
--- a/Main/System/BeautyMM/BeautyMMShowWin.cs
+++ b/Main/System/BeautyMM/BeautyMMShowWin.cs
@@ -91,7 +91,7 @@
 
         seeAttrBtn.AddListener(() =>
         {
-            // UIManager.Instance.OpenWindow<BeautyMMAttrWin>();
+            UIManager.Instance.OpenWindow<BeautyMMTalentWin>(mmID);
         });
 
         activeBtn.AddListener(ActiveMM);
@@ -118,7 +118,7 @@
         BeautyMMManager.Instance.OnBeautyMMDataUpdate += OnBeautyMMDataUpdate;
         PackManager.Instance.RefreshItemEvent += OnRefreshItemEvent;
         
-        Display();
+        Display(true);
     }
 
 
@@ -145,7 +145,7 @@
         }
     }
 
-    void Display()
+    void Display(bool isOpen = false)
     {
         mmConfig = BeautyConfig.Get(mmID);
         qualityImg.SetSprite($"mmMark{mmConfig.BeautyQuality}");
@@ -222,6 +222,11 @@
             fullRect.SetActive(false);
         }
 
+        itemlist = BeautyMMManager.Instance.loveItemIDs.ToList();
+        if (isOpen)
+        {
+            BeautyMMManager.Instance.selectLoveItemID = itemlist[0];
+        }
         CreateScroller();
 
     }
@@ -356,8 +361,7 @@
     void CreateScroller()
     {
         loveScroller.Refresh();
-        itemlist = BeautyMMManager.Instance.loveItemIDs.ToList();
-        BeautyMMManager.Instance.selectLoveItemID = itemlist[0];
+
         if (mmConfig.ExclusiveItemID > 0)
         {
             itemlist.Add(mmConfig.ExclusiveItemID);    //涓撳睘淇$墿
diff --git a/Main/System/BeautyMM/BeautyMMTalentAttrCell.cs b/Main/System/BeautyMM/BeautyMMTalentAttrCell.cs
new file mode 100644
index 0000000..f9b58bb
--- /dev/null
+++ b/Main/System/BeautyMM/BeautyMMTalentAttrCell.cs
@@ -0,0 +1,41 @@
+锘縰sing System;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class BeautyMMTalentAttrCell : CellView
+{
+    [SerializeField] Text lvText;
+    [SerializeField] Text nameText;
+    [SerializeField] Text valueText;
+    public void Display(int lv, int mmID)
+    {
+        var lvValue = BeautyMMManager.Instance.GetMMLV(mmID);
+        bool isLVActive = false;
+        if (lvValue >= lv)
+        {
+            isLVActive = true;
+        }
+        var mmConfig = BeautyConfig.Get(mmID);
+        BeautyQualityLVConfig config;
+        BeautyQualityLVConfig.TryGetBeautyQualityLVConfig(mmConfig.BeautyQuality, lv, out config);
+        var id = config.AttrIDList[0];
+        if (!isLVActive)
+        {
+            lvText.text = UIHelper.AppendColor(TextColType.NavyGray, Language.Get($"L1113", index));
+            nameText.text = UIHelper.AppendColor(TextColType.NavyGray, PlayerPropertyConfig.Get(id).Name);
+            valueText.text = UIHelper.AppendColor(TextColType.NavyGray, PlayerPropertyConfig.GetValueDescription(id, config.AttrValueList[0]));
+        }
+        else
+        {
+            lvText.text = Language.Get($"L1113", index);
+            nameText.text = PlayerPropertyConfig.Get(id).Name;
+            valueText.text = PlayerPropertyConfig.GetValueDescription(id, config.AttrValueList[0]);
+        }
+    }
+
+
+}
+
+
diff --git a/Main/System/BeautyMM/BeautyMMTalentAttrCell.cs.meta b/Main/System/BeautyMM/BeautyMMTalentAttrCell.cs.meta
new file mode 100644
index 0000000..69e36de
--- /dev/null
+++ b/Main/System/BeautyMM/BeautyMMTalentAttrCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 83dafad1a1945144aac0539cdfe807e7
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/BeautyMM/BeautyMMTalentAttrNameCell.cs b/Main/System/BeautyMM/BeautyMMTalentAttrNameCell.cs
new file mode 100644
index 0000000..583fcd2
--- /dev/null
+++ b/Main/System/BeautyMM/BeautyMMTalentAttrNameCell.cs
@@ -0,0 +1,18 @@
+锘縰sing System;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class BeautyMMTalentAttrNameCell : CellView
+{
+    [SerializeField] Text nameText;
+    public void Display(int index)
+    {
+        nameText.text = Language.Get($"BeautyMMLVName{index + 1}");
+    }
+
+
+}
+
+
diff --git a/Main/System/BeautyMM/BeautyMMTalentAttrNameCell.cs.meta b/Main/System/BeautyMM/BeautyMMTalentAttrNameCell.cs.meta
new file mode 100644
index 0000000..26d505a
--- /dev/null
+++ b/Main/System/BeautyMM/BeautyMMTalentAttrNameCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c694d5be398d45246b40dfd5392e4d4b
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/BeautyMM/BeautyMMTalentEffectCell.cs b/Main/System/BeautyMM/BeautyMMTalentEffectCell.cs
new file mode 100644
index 0000000..34ae68b
--- /dev/null
+++ b/Main/System/BeautyMM/BeautyMMTalentEffectCell.cs
@@ -0,0 +1,135 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class BeautyMMTalentEffectCell : CellView
+{
+    [SerializeField] Text lvText;
+    [SerializeField] ImageEx lvBGImg;
+    [SerializeField] Text nameText;
+    [SerializeField] Text[] talentTexts;
+    [SerializeField] Image activeImg;
+    public void Display(int rank, int mmID)
+    {
+        lvText.text = (rank*BeautyMMManager.Instance.needLVForTalent).ToString();
+        var lvValue = BeautyMMManager.Instance.GetMMLV(mmID);
+        var isActive = BeautyMMManager.Instance.isActiveMM(mmID);
+        bool isRankActive = false;
+        if (isActive && lvValue/BeautyMMManager.Instance.needLVForTalent >= rank)
+        {
+            isRankActive = true;
+        }
+        lvBGImg.gray = !isRankActive;
+        ShowTalent(mmID, rank, isRankActive);
+        activeImg.SetActive(isRankActive && lvValue/BeautyMMManager.Instance.needLVForTalent == rank);
+        nameText.text = isRankActive ? Language.Get($"BeautyMMLVName{rank + 1}") : UIHelper.AppendColor(TextColType.NavyGray, Language.Get($"BeautyMMLVName{rank}"));
+    }
+
+
+    void ShowTalent(int mmID, int rank, bool isRankActive)
+    {
+        var mmConfig = BeautyConfig.Get(mmID);
+        //鍏堟樉绀哄ぉ璧嬪睘鎬э紝鍐嶆樉绀哄ぉ璧嬬壒鎬�
+        var attrs = GetMMTalentAttrForUI(mmConfig, rank);
+        int talentIndex = 0;
+        if (attrs.IsNullOrEmpty())
+        {
+            talentIndex = 0;
+        }
+        else
+        {
+            foreach (var attr in attrs)
+            {
+                if (talentIndex < talentTexts.Length)
+                {
+                    talentTexts[talentIndex].SetActive(true);
+                    string format = "{0}" + UIHelper.AppendColor(TextColType.Green, "+{1}");
+                    talentTexts[talentIndex].text = PlayerPropertyConfig.GetFullDescription(attr.Key, attr.Value, format);
+                }
+                else
+                {
+                    break;
+                }
+                talentIndex++;
+            }
+        }
+
+
+        var talentValue = GetMMTalentEffectForUI(mmConfig, rank);
+        for (int i = talentIndex; i < talentTexts.Length; i++)
+        {
+            if (i == talentIndex && mmConfig.EffType != 0)
+            {
+                //澶╄祴鏁堟灉绾﹀畾鏈�澶氫竴涓�
+                talentTexts[talentIndex].SetActive(true);
+                switch (mmConfig.EffType)
+                {
+                    case 1:
+                        talentTexts[i].text = Language.Get($"BeautyMMTalent1", talentValue);
+                        break;
+                    case 2:
+                        talentTexts[i].text = Language.Get($"BeautyMMTalent2", talentValue / 100, ItemConfig.Get(mmConfig.EffTypeValue).ItemName);
+                        break;
+                    case 3:
+                        talentTexts[i].text = Language.Get($"BeautyMMTalent3", talentValue);
+                        break;
+                    case 4:
+                        talentTexts[i].text = Language.Get($"BeautyMMTalent4", ItemConfig.Get(mmConfig.EffTypeValue).ItemName, talentValue);
+                        break;
+                }
+            }
+            else
+            {
+                talentTexts[i].SetActive(false);
+            }
+        }
+
+        //缃伆
+        if (!isRankActive)
+        {
+            for (int i = 0; i < talentTexts.Length; i++)
+            {
+                talentTexts[i].text = UIHelper.AppendColor(TextColType.NavyGray, talentTexts[i].text);
+            }
+        }
+
+    }
+
+    Dictionary<int, long> GetMMTalentAttrForUI(BeautyConfig config, int rank)
+    {
+        var _dict = new Dictionary<int, long>();
+        //鍒濆澶╄祴灞炴��
+        for (int i = 0; i < config.TalentAttrIDList.Length; i++)
+        {
+            _dict[config.TalentAttrIDList[i]] = config.TalentAttrValueList[i];
+        }
+
+        //鎸墄绾уソ鎰熷害鎻愬崌涓�绾уぉ璧嬫晥鏋�
+        if (rank > 0)
+        {
+            for (int i = 0; i < config.TalentAttrIDList.Length; i++)
+            {
+                _dict[config.TalentAttrIDList[i]] += rank * config.TalentPerLVAddList[i];
+            }
+        }
+        return _dict;
+    }
+
+    int GetMMTalentEffectForUI(BeautyConfig config, int rank)
+    {
+        //鍒濆澶╄祴鏁堟灉
+        int _effect = config.EffValue;
+        if (rank > 0)
+        {
+            _effect += rank * config.EffPerLVAdd;
+        }
+        return _effect;
+    }
+
+
+}
+
+
diff --git a/Main/System/BeautyMM/BeautyMMTalentEffectCell.cs.meta b/Main/System/BeautyMM/BeautyMMTalentEffectCell.cs.meta
new file mode 100644
index 0000000..6152c26
--- /dev/null
+++ b/Main/System/BeautyMM/BeautyMMTalentEffectCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a29a345cf77504d419511ea3c4f7b522
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/BeautyMM/BeautyMMTalentWin.cs b/Main/System/BeautyMM/BeautyMMTalentWin.cs
new file mode 100644
index 0000000..59ba854
--- /dev/null
+++ b/Main/System/BeautyMM/BeautyMMTalentWin.cs
@@ -0,0 +1,116 @@
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class BeautyMMTalentWin : UIBase
+{
+    [SerializeField] Text titleText;
+    [SerializeField] ScrollerController attrScroller;
+    [SerializeField] ScrollerController talentScroller;
+    [SerializeField] GroupButtonEx attrBtn;
+    [SerializeField] GroupButtonEx talentBtn;
+
+    int selectTab = 0;
+    int mmID = 0;
+    protected override void InitComponent()
+    {
+
+        attrBtn.AddListener(() =>
+        {
+            selectTab = 0;
+            Display();
+        });
+        talentBtn.AddListener(() =>
+        {
+            selectTab = 1;
+            Display();
+        });
+
+    }
+
+
+    protected override void OnPreOpen()
+    {
+
+        selectTab = 0;
+        mmID = functionOrder;
+        attrScroller.OnRefreshCell += OnRefreshAttrCell;
+        talentScroller.OnRefreshCell += OnRefreshTalentCell;
+        CreateScroller();
+        Display();
+    }
+
+
+    protected override void OnPreClose()
+    {
+        attrScroller.OnRefreshCell -= OnRefreshAttrCell;
+        talentScroller.OnRefreshCell -= OnRefreshTalentCell;
+    }
+
+    void CreateScroller()
+    {
+        var mmConfig = BeautyConfig.Get(mmID);
+        var maxLV = BeautyQualityLVConfig.GetBeautyQualityMaxLV(mmConfig.BeautyQuality);
+        attrScroller.Refresh();
+        talentScroller.Refresh();
+        for (int i = 0; i < maxLV; i++)
+        {
+            if (i % 20 == 0)
+            {
+                attrScroller.AddCell(ScrollerDataType.Header, i / 20);
+                talentScroller.AddCell(ScrollerDataType.Header, i / 20);
+            }
+
+            attrScroller.AddCell(ScrollerDataType.Normal, i + 1);
+            
+        }
+        attrScroller.Restart();
+        talentScroller.Restart();
+    }
+
+
+    void OnRefreshAttrCell(ScrollerDataType type, CellView cell)
+    {
+        if (type == ScrollerDataType.Header)
+        {
+            var _cell1 = cell as BeautyMMTalentAttrNameCell;
+            _cell1.Display(cell.index);
+        }
+        else
+        {
+            var _cell = cell as BeautyMMTalentAttrCell;
+            _cell.Display(cell.index, mmID);
+        }
+    }
+
+    void OnRefreshTalentCell(ScrollerDataType type, CellView cell)
+    {
+        var _cell = cell as BeautyMMTalentEffectCell;
+        _cell.Display(cell.index, mmID);
+    }
+
+
+    void Display()
+    {
+        if (selectTab == 0)
+        {
+            attrScroller.SetActive(true);
+            talentScroller.SetActive(false);
+            attrBtn.SelectBtn();
+            attrScroller.JumpIndex(BeautyMMManager.Instance.GetMMLV(mmID) - 10);
+            titleText.text = Language.Get("BeautyMM2");
+        }
+        else
+        {
+            attrScroller.SetActive(false);
+            talentScroller.SetActive(true);
+            talentBtn.SelectBtn();
+            titleText.text = Language.Get("BeautyMM4");
+            talentScroller.JumpIndex(BeautyMMManager.Instance.GetMMLV(mmID)/BeautyMMManager.Instance.needLVForTalent);
+        }
+        
+    }
+
+
+
+}
diff --git a/Main/System/BeautyMM/BeautyMMTalentWin.cs.meta b/Main/System/BeautyMM/BeautyMMTalentWin.cs.meta
new file mode 100644
index 0000000..2fdd12d
--- /dev/null
+++ b/Main/System/BeautyMM/BeautyMMTalentWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e028690447cf54e438d8ae323e263655
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Main/System/BeautyMM/BeautyMMTravelCell.cs b/Main/System/BeautyMM/BeautyMMTravelCell.cs
index 6ab242d..1e12345 100644
--- a/Main/System/BeautyMM/BeautyMMTravelCell.cs
+++ b/Main/System/BeautyMM/BeautyMMTravelCell.cs
@@ -18,6 +18,8 @@
 
     public void Display(int index)
     {
+        restartTween.Stop();
+        restartTween.SetEndState();
         Int2 girdPos = BeautyMMManager.Instance.ChangeIndexToGrid(index);
         var grid = BeautyMMManager.Instance.GetGrid(girdPos);
 
@@ -113,6 +115,10 @@
     // 澶т簬200 瀵瑰簲琛ㄩ噷鐨� 鐗╁搧
     void ClickGird(Int2 girdPos, TravelGrid grid)
     {
+        if (Time.time - restartTime < 0.5f)
+        {
+            return;
+        }
         ////鐘舵�侊細0-鏈偣鍑伙紱1-宸插紑鍚紱2-瑁傜汗
         if (grid.State == 0 || grid.State == 2)
         {
@@ -142,7 +148,7 @@
         {
             boomEffect.Play();
         }
-        
+
 
         var pack = new CB040_tagCSTravelClick();
         pack.Row = (byte)girdPos.x;
@@ -156,4 +162,11 @@
 
 
     }
+
+    float restartTime = 0;
+    public void RestartAnim()
+    {
+        restartTween.Play();
+        restartTime = Time.time;
+    }
 }
diff --git a/Main/System/BeautyMM/BeautyMMTravelWin.cs b/Main/System/BeautyMM/BeautyMMTravelWin.cs
index 0d314cb..e017fd1 100644
--- a/Main/System/BeautyMM/BeautyMMTravelWin.cs
+++ b/Main/System/BeautyMM/BeautyMMTravelWin.cs
@@ -25,6 +25,7 @@
     [SerializeField] Image[] whatImgs;
     [SerializeField] Image[] rightImgs;
     [SerializeField] Image[] wrongImgs;
+    [SerializeField] UIEffectPlayer[] pointEffects;
 
     float gridWidth = 0;
     float gridHeight = 0;
@@ -74,7 +75,21 @@
             boomColEffect.transform.localPosition = new Vector3((BeautyMMManager.Instance.clickGirdPos.y - 1) * gridWidth + gridWidth / 2, boomColEffect.transform.localPosition.y, 0);
             boomColEffect.Play();
         }
+
         DisplayBuildResult();
+
+        // 閲嶇疆寮�濮嬭鍦ㄦ樉绀哄悗澶勭悊鍔ㄧ敾
+        if (result == 5)
+        {
+            for (int i = 0; i < girds.Count; i++)
+            {
+                girds[i].RestartAnim();
+            }
+        }
+        else if (result == 4 && BeautyMMManager.Instance.m_SceneryLVInfo == 0)
+        {
+            SoundPlayer.Instance.PlayUIAudio(23);
+        }
     }
 
     void Display()
@@ -181,10 +196,17 @@
 
         var startEffectID = buildEffectDic[BeautyMMManager.Instance.m_SceneryType] + GetSuccessCnt();
         buildResultEffect.effectId = startEffectID;
-        buildResultEffect.isPlaySpineLoop = true;
-        buildResultEffect.Play(1);
+        buildResultEffect.isPlaySpineLoop = false;
+        buildResultEffect.onComplete = () =>
+        {
+            buildResultEffect.isPlaySpineLoop = true;
+            buildResultEffect.Play(1);
+        };
+        buildResultEffect.Play(0);
 
         //public uint m_SceneryLVInfo;    //鏅鍗囩骇淇℃伅锛�0-杩樻湭澶勭悊鏅鍗囩骇锛涗釜浣嶆暟-绗�1娆″崌绾ф垚鍔熶笌鍚︼紝1-鎴愬姛锛�2-澶辫触锛涘崄浣�-绗�2娆� ...
+        int effectPointIndex = -1;
+
         for (int i = 0; i < whatImgs.Length; i++)
         {
             //0鏄剧ず闂彿 1 鎴愬姛 2 澶辫触
@@ -197,7 +219,18 @@
             whatImgs[i].SetActive(result == 0);
             rightImgs[i].SetActive(result == 1);
             wrongImgs[i].SetActive(result == 2);
-
+            if (result == 0 && effectPointIndex == -1)
+            {
+                effectPointIndex = i;
+            }
+        }
+        if (effectPointIndex != -1 && effectPointIndex != 0)
+        {
+            pointEffects[effectPointIndex - 1].Play();
+        }
+        else if (effectPointIndex == -1 && BeautyMMManager.Instance.m_SceneryLVInfo != 0)
+        {
+            pointEffects[whatImgs.Length - 1].Play();
         }
     }
 
diff --git a/Main/System/BoneField/BoneFieldManager.cs b/Main/System/BoneField/BoneFieldManager.cs
index 45ac59e..4da586f 100644
--- a/Main/System/BoneField/BoneFieldManager.cs
+++ b/Main/System/BoneField/BoneFieldManager.cs
@@ -140,16 +140,17 @@
         List<Item> showItems = new List<Item>();
         foreach (var item in result.itemInfo)
         {
-            Item tempItem = new Item(item.ItemID, item.Count);
+            Item tempItem = new Item(item.ItemID, item.Count, _useType: item.BeautyEx + 1);
             showItems.Add(tempItem);
         }
-        ItemLogicUtility.Instance.ShowGetItem(showItems);
+        ItemLogicUtility.Instance.ShowGetItem(showItems, isMergeItem: false);
     }
 
     public class ItemInfo
     {
         public int ItemID { get; set; }
         public int Count { get; set; }
+        public int BeautyEx { get; set; }
     }
 
     public class ChallengeResultData
diff --git a/Main/System/KnapSack/BackpackData.cs b/Main/System/KnapSack/BackpackData.cs
index 5dac9ab..464b65c 100644
--- a/Main/System/KnapSack/BackpackData.cs
+++ b/Main/System/KnapSack/BackpackData.cs
@@ -11,13 +11,13 @@
     public int id;
     public long countEx;   
     public int quality;
-    public int bind;    //缁戝畾 鎴栬�� 鎷嶅崠 浜ゆ槗
+    public int useType;    //鐢ㄩ�斿畾涔夛細0 鏃� 1 棰勭暀 2 绾㈤澧炲姞
 
     public Item(int _id, long _count)
     {
         this.id = _id;
         this.quality = 0;
-        this.bind = 0;
+        this.useType = 0;
         this.countEx = _count;
     }
     
@@ -26,15 +26,15 @@
     {
         this.id = _id;
         this.quality = _quality;
-        this.bind = 0;
+        this.useType = 0;
         this.countEx = _count;
     }
 
-    public Item(int _id, long _count, int _bind = 0, int _quality = 0)
+    public Item(int _id, long _count, int _useType = 0, int _quality = 0)
     {
         this.id = _id;
         this.quality = _quality;
-        this.bind = _bind;
+        this.useType = _useType;
         this.countEx = _count;
     }
 
diff --git a/Main/System/KnapSack/Logic/CommonGetItem.cs b/Main/System/KnapSack/Logic/CommonGetItem.cs
index 4fe276e..1f2dfb5 100644
--- a/Main/System/KnapSack/Logic/CommonGetItem.cs
+++ b/Main/System/KnapSack/Logic/CommonGetItem.cs
@@ -1,24 +1,30 @@
 锘縰sing UnityEngine;
+using UnityEngine.UI;
 
-    public class CommonGetItem : MonoBehaviour
+public class CommonGetItem : MonoBehaviour
+{
+    [SerializeField] ItemCell itemCell;
+    [SerializeField] TextEx txtItemName;
+    [SerializeField] Image beautyExImg;
+
+    public void Display(int itemID, int useType)
     {
-        [SerializeField] ItemCell itemCell;
-        [SerializeField] TextEx txtItemName;
+        txtItemName.SetActive(ItemLogicUtility.Instance.isNameShow);
 
-        public void Display(int itemID)
+        Int2 idInfo = new Int2(itemID, useType);
+        if (!ItemLogicUtility.Instance.totalShowItems.ContainsKey(idInfo))
         {
-            txtItemName.SetActive(ItemLogicUtility.Instance.isNameShow);
-            if (!ItemLogicUtility.Instance.totalShowItems.ContainsKey(itemID))
-            {
-                return;
-            }
-
-            var item = ItemLogicUtility.Instance.totalShowItems[itemID];
-            itemCell.Init(new ItemCellModel(itemID, false, item.countEx));
-            txtItemName.text = ItemConfig.Get(itemID).ItemName;
-            itemCell.button.SetListener(() =>
-            {
-                ItemTipUtility.Show(itemID);
-            });
+            return;
         }
+
+        var item = ItemLogicUtility.Instance.totalShowItems[idInfo];
+        itemCell.Init(new ItemCellModel(itemID, false, item.countEx));
+        txtItemName.text = ItemConfig.Get(itemID).ItemName;
+        itemCell.button.SetListener(() =>
+        {
+            ItemTipUtility.Show(itemID);
+        });
+
+        beautyExImg.SetActive(item.useType == 2);
     }
+}
diff --git a/Main/System/KnapSack/Logic/CommonGetItemCell.cs b/Main/System/KnapSack/Logic/CommonGetItemCell.cs
index d16ba2b..cc34211 100644
--- a/Main/System/KnapSack/Logic/CommonGetItemCell.cs
+++ b/Main/System/KnapSack/Logic/CommonGetItemCell.cs
@@ -12,7 +12,7 @@
             if (index + i < showItems.Count)
             {
                 int itemId = showItems[index + i].id;
-                commonGetItems[i].Display(itemId);
+                commonGetItems[i].Display(itemId, showItems[index + i].useType);
                 commonGetItems[i].SetActive(true);
             }
             else
diff --git a/Main/System/KnapSack/Logic/ItemLogicUtility.cs b/Main/System/KnapSack/Logic/ItemLogicUtility.cs
index 58fa957..5ce49e8 100644
--- a/Main/System/KnapSack/Logic/ItemLogicUtility.cs
+++ b/Main/System/KnapSack/Logic/ItemLogicUtility.cs
@@ -1182,14 +1182,14 @@
     public bool isNameShow { get; private set; } // 鏄惁灞曠ず鐗╁搧鍚嶅瓧
 
     // 濡傛灉鍚屾椂鏈夊绉嶅鍔卞皝鍖咃紝鍚屼竴涓簨浠跺綊闆嗭紝涓嶅悓浜嬩欢鐩存帴椤舵帀鏄剧ず鏈�鏂�
-    public Dictionary<int, Item> totalShowItems = new Dictionary<int, Item>();
+    public Dictionary<Int2, Item> totalShowItems = new Dictionary<Int2, Item>();    //Int2 鐗╁搧ID+useType
     public event Action OnGetItemShowEvent;
     private string getItemEventName;
     public string sourceTip;    //棰嗗鍘熷洜
 
-
+    // isMergeItem 鏄惁鍚堝苟鐩稿悓ID鐨勭墿鍝� 榛樿鍚堝苟
     // 閫氱敤鏄剧ず鑾峰緱鐨勭墿鍝�
-    public void ShowGetItem(List<Item> items, string eventName = "default", bool isNameShow = true)
+    public void ShowGetItem(List<Item> items, string eventName = "default", bool isNameShow = true, bool isMergeItem = true)
     {
         if (getItemEventName != eventName)
         {
@@ -1206,14 +1206,19 @@
         for (int i = 0; i < items.Count; i++)
         {
             var id = items[i].id;
-            if (totalShowItems.ContainsKey(id))
+
+            var useType = isMergeItem ? 0 : items[i].useType;
+            Int2 idInfo = new Int2(id, useType);
+
+            if (totalShowItems.ContainsKey(idInfo))
             {
-                totalShowItems[id] = new Item(id, items[i].countEx + totalShowItems[id].countEx, items[i].bind, items[i].quality);
+                totalShowItems[idInfo] = new Item(id, items[i].countEx + totalShowItems[idInfo].countEx, useType, items[i].quality);
             }
             else
             {
-                totalShowItems.Add(id, items[i]);
+                totalShowItems.Add(idInfo, new Item(id, items[i].countEx, useType, items[i].quality));
             }
+
         }
 
         if (GeneralDefine.commonAwardTipDict.ContainsKey(eventName))
@@ -1236,50 +1241,50 @@
     }
 
     //鍙互鎸囧畾鎵撳紑鐨勭獥鍙�
-    public void ShowGetItemEx<T>(List<Item> items, string info = "", int seconds = 3, string btnName = "", Action func = null, bool isNameShow = true, string eventName = "default") where T : UIBase
-    {
-        if (getItemEventName != eventName)
-        {
-            if (UIManager.Instance.IsOpenedInList<T>())
-            {
-                //----------------------璁板緱鏀圭珛鍗冲叧闂�
-                UIManager.Instance.CloseWindow<T>();
-            }
+    // public void ShowGetItemEx<T>(List<Item> items, string info = "", int seconds = 3, string btnName = "", Action func = null, bool isNameShow = true, string eventName = "default") where T : UIBase
+    // {
+    //     if (getItemEventName != eventName)
+    //     {
+    //         if (UIManager.Instance.IsOpenedInList<T>())
+    //         {
+    //             //----------------------璁板緱鏀圭珛鍗冲叧闂�
+    //             UIManager.Instance.CloseWindow<T>();
+    //         }
 
-            totalShowItems.Clear();
-            getItemEventName = eventName;
-        }
+    //         totalShowItems.Clear();
+    //         getItemEventName = eventName;
+    //     }
 
-        //鐩稿悓ID 鍚堝苟鏁伴噺鏄剧ず
-        for (int i = 0; i < items.Count; i++)
-        {
-            var id = items[i].id;
-            if (totalShowItems.ContainsKey(id))
-            {
-                totalShowItems[id] = new Item(id, items[i].countEx + totalShowItems[id].countEx, items[i].bind, items[i].quality);
-            }
-            else
-            {
-                totalShowItems.Add(id, items[i]);
-            }
-        }
+    //     //鐩稿悓ID 鍚堝苟鏁伴噺鏄剧ず
+    //     for (int i = 0; i < items.Count; i++)
+    //     {
+    //         var id = items[i].id;
+    //         if (totalShowItems.ContainsKey(id))
+    //         {
+    //             totalShowItems[id] = new Item(id, items[i].countEx + totalShowItems[id].countEx, items[i].useType, items[i].quality);
+    //         }
+    //         else
+    //         {
+    //             totalShowItems.Add(id, items[i]);
+    //         }
+    //     }
 
 
-        getItemInfo = info;
-        OnGetItem = func;
-        if (btnName == "")
-            btnName = Language.Get("PopConfirmWin_OK");
-        getItemBtnText = btnName;
-        closeSeconds = seconds;
-        this.isNameShow = isNameShow;
-        OnGetItemShowEvent?.Invoke();
-        if (!UIManager.Instance.IsOpenedInList<T>())
-        {
-            UIManager.Instance.OpenWindow<T>();
-        }
+    //     getItemInfo = info;
+    //     OnGetItem = func;
+    //     if (btnName == "")
+    //         btnName = Language.Get("PopConfirmWin_OK");
+    //     getItemBtnText = btnName;
+    //     closeSeconds = seconds;
+    //     this.isNameShow = isNameShow;
+    //     OnGetItemShowEvent?.Invoke();
+    //     if (!UIManager.Instance.IsOpenedInList<T>())
+    //     {
+    //         UIManager.Instance.OpenWindow<T>();
+    //     }
 
-        ShowHeroLHWin(items);//鏈変紶濂囦互涓婅嫳闆勬樉绀虹珛缁�
-    }
+    //     ShowHeroLHWin(items);//鏈変紶濂囦互涓婅嫳闆勬樉绀虹珛缁�
+    // }
     public void ClearGetItem()
     {
         //涓嶆竻鐞嗙墿鍝侊紝涓嬫鏀跺埌鏁版嵁浼氳嚜鍔ㄦ竻鐞嗭紝鍙敼浜嬩欢鏂逛究鎵撳紑鐣岄潰娴嬭瘯
diff --git a/Main/System/MainLevel/MainLevelDropCell.cs b/Main/System/MainLevel/MainLevelDropCell.cs
index af83a4a..78bf0af 100644
--- a/Main/System/MainLevel/MainLevelDropCell.cs
+++ b/Main/System/MainLevel/MainLevelDropCell.cs
@@ -46,6 +46,10 @@
                     if (config.DailyBootyUpperList[i][0] == itemID)
                     {
                         maxValue = config.DailyBootyUpperList[i][1];
+                        if (maxValue < 1000000000)
+                        {
+                            maxValue += (int)(maxValue * (BeautyMMManager.Instance.GetTalentEffectByType(TalentEffectType.MainLine) *1f/100));
+                        }
                         break;
                     }
                 }

--
Gitblit v1.8.0