using UnityEngine; using UnityEngine.UI; using System.Collections; using GCGame.Table; using Games.Mission; using Games.Events; using Games.Item; public class MarketFindHistoryItem : UIItemBase { public Text _ItemName; public override void Show(Hashtable hash) { base.Show(); bool isShowInBlack = true; if (hash.ContainsKey("IsShowInBlack")) { isShowInBlack = (bool)hash["IsShowInBlack"]; } if (hash["InitObj"] is Tab_CommonItem) { var commonItem = (Tab_CommonItem)hash["InitObj"]; if (commonItem != null) InitItem(commonItem, isShowInBlack); } else { var commonItemID = (int)hash["InitObj"]; if (commonItemID > 0) { InitItem(commonItemID, isShowInBlack); } } } protected void InitItem(Tab_CommonItem itemParam, bool isShowInBlack) { _ItemName.text = GCGame.Utils.GetItemQualityName(itemParam.Quality, itemParam.Name, isShowInBlack); } protected void InitItem(int itemID, bool isShowInBlack) { var commonItem = TableManager.GetCommonItemByID(itemID, 0); _ItemName.text = GCGame.Utils.GetItemQualityName(commonItem.Quality, commonItem.Name, isShowInBlack); } }