From 92eac12c1db108ed0158fa187fa3a66091e142db Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期三, 17 七月 2019 10:23:24 +0800
Subject: [PATCH] 4519 【主干】拍卖行展示装备tips错误

---
 System/Auction/MyAuctionCell.cs          |    3 +++
 System/Auction/MyFocusCell.cs            |    3 +++
 System/ItemTip/ItemTipUtility.cs         |   33 +++++++++++++++++++++++++++++++++
 System/Auction/FamilyAuctioncell.cs      |    3 +++
 System/Auction/FullServiceAuctioncell.cs |    3 +++
 5 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/System/Auction/FamilyAuctioncell.cs b/System/Auction/FamilyAuctioncell.cs
index 0e5d43d..1d825a4 100644
--- a/System/Auction/FamilyAuctioncell.cs
+++ b/System/Auction/FamilyAuctioncell.cs
@@ -102,6 +102,9 @@
                 {
                     itemId = auctionItem.itemId,
                     compare = true,
+                    legendProperty = ItemLogicUtility.Instance.IsRealmEquip(auctionItem.itemId) ?
+                    ItemTipUtility.GetLegendProperty(auctionItem.itemId, auctionItem.userDataDict)
+                    : default(ItemTipUtility.LegendProperty),
                 });
             });
 
diff --git a/System/Auction/FullServiceAuctioncell.cs b/System/Auction/FullServiceAuctioncell.cs
index 51654c1..d1d5fef 100644
--- a/System/Auction/FullServiceAuctioncell.cs
+++ b/System/Auction/FullServiceAuctioncell.cs
@@ -123,6 +123,9 @@
                 {
                     itemId = auctionItem.itemId,
                     compare = true,
+                    legendProperty = ItemLogicUtility.Instance.IsRealmEquip(auctionItem.itemId) ?
+                    ItemTipUtility.GetLegendProperty(auctionItem.itemId, auctionItem.userDataDict)
+                    : default(ItemTipUtility.LegendProperty),
                 });
             });
 
diff --git a/System/Auction/MyAuctionCell.cs b/System/Auction/MyAuctionCell.cs
index d39049f..e5aa80b 100644
--- a/System/Auction/MyAuctionCell.cs
+++ b/System/Auction/MyAuctionCell.cs
@@ -111,6 +111,9 @@
                 {
                     itemId = auctionItem.itemId,
                     compare = true,
+                    legendProperty = ItemLogicUtility.Instance.IsRealmEquip(auctionItem.itemId) ?
+                    ItemTipUtility.GetLegendProperty(auctionItem.itemId, auctionItem.userDataDict)
+                    : default(ItemTipUtility.LegendProperty),
                 });
             });
             m_ItemName.text = UIHelper.GetItemName(auctionItem.itemId, true);
diff --git a/System/Auction/MyFocusCell.cs b/System/Auction/MyFocusCell.cs
index c342b28..87d5574 100644
--- a/System/Auction/MyFocusCell.cs
+++ b/System/Auction/MyFocusCell.cs
@@ -104,6 +104,9 @@
                 {
                     itemId = auctionItem.itemId,
                     compare = true,
+                    legendProperty = ItemLogicUtility.Instance.IsRealmEquip(auctionItem.itemId) ?
+                    ItemTipUtility.GetLegendProperty(auctionItem.itemId, auctionItem.userDataDict)
+                    : default(ItemTipUtility.LegendProperty),
                 });
             });
 
diff --git a/System/ItemTip/ItemTipUtility.cs b/System/ItemTip/ItemTipUtility.cs
index 3791838..ff1bcbb 100644
--- a/System/ItemTip/ItemTipUtility.cs
+++ b/System/ItemTip/ItemTipUtility.cs
@@ -197,6 +197,7 @@
             public int itemId;
             public bool compare;
             public bool unfoldGetWay;
+            public LegendProperty legendProperty;
         }
 
         static PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
@@ -251,6 +252,10 @@
             {
                 case TipType.Equip:
                     mainTipData = CreateNormalEquipData(itemId);
+                    if (!item.legendProperty.Equals(default(LegendProperty)))
+                    {
+                        mainTipData.legendProperty = item.legendProperty;
+                    }
 
                     if (item.compare)
                     {
@@ -1190,6 +1195,34 @@
             return data;
         }
 
+        public static LegendProperty GetLegendProperty(int itemId, Dictionary<int, List<int>> userData)
+        {
+            var data = new LegendProperty();
+            data.isPreview = false;
+            data.itemId = itemId;
+
+            List<int> ids = null;
+            List<int> values = null;
+            if (userData != null)
+            {
+                userData.TryGetValue(17, out ids);
+                userData.TryGetValue(17, out values);
+            }
+            if (!ids.IsNullOrEmpty() && !values.IsNullOrEmpty())
+            {
+                var properties = new List<Int2>();
+                var count = Mathf.Min(ids.Count, values.Count);
+                for (int i = 0; i < count; i++)
+                {
+                    properties.Add(new Int2(ids[i], values[i]));
+                }
+
+                data.properties = properties;
+            }
+
+            return data;
+        }
+
         private static SuitInfo GetSuitInfo(int itemId)
         {
             var config = ItemConfig.Get(itemId);

--
Gitblit v1.8.0