From a974a2621a6dcb90b8fe52b23d075814873c0960 Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期二, 23 十月 2018 20:53:49 +0800
Subject: [PATCH] Merge branch 'master' into leonard
---
System/OpenServerActivity/PoolItemCell.cs | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/System/OpenServerActivity/PoolItemCell.cs b/System/OpenServerActivity/PoolItemCell.cs
index 108079f..5f10ac1 100644
--- a/System/OpenServerActivity/PoolItemCell.cs
+++ b/System/OpenServerActivity/PoolItemCell.cs
@@ -1,6 +1,7 @@
锘縰sing UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
+using TableConfig;
namespace Snxxz.UI
{
@@ -8,7 +9,7 @@
{
[SerializeField] CommonItemBaisc itemBaisc;
[SerializeField] GameObject bestIconObj;
-
+ [SerializeField] Text nameText;
ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
WishingPoolModel wishingModel { get { return ModelCenter.Instance.GetModel<WishingPoolModel>(); } }
int index = -1;
@@ -22,15 +23,18 @@
public void Display(int index)
{
this.index = index;
- int id = 0;
- bool isPoolData = wishingModel.TryGetPoolDataByIndex(index,out id);
+ WishingPoolModel.WishingWellItem wellItem = null;
+ bool isPoolData = wishingModel.TryGetPoolDataByIndex(index,out wellItem);
+ ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(wellItem.itemId);
+ nameText.text = itemConfig.ItemName;
+ nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor);
bestIconObj.SetActive(false);
- ItemCellModel cellModel = new ItemCellModel(id);
+ ItemCellModel cellModel = new ItemCellModel(wellItem.itemId,false,(ulong)wellItem.itemCount,wellItem.isBind);
itemBaisc.Init(cellModel);
itemBaisc.cellBtn.RemoveAllListeners();
itemBaisc.cellBtn.AddListener(()=>
{
- ItemAttrData attrData = new ItemAttrData(id);
+ ItemAttrData attrData = new ItemAttrData(wellItem.itemId, true, (ulong)wellItem.itemCount, -1,wellItem.isBind);
tipsModel.SetItemTipsModel(attrData);
});
}
--
Gitblit v1.8.0