private void StoreItemClick(UnityEngine.GameObject goc) { foreach (storeInfo si in storeDic.Values) { if (si != null) { if (si.go == goc) { if (si.CanBuyTime == 0) { //已卖完 } else { //需要兑换 ArkCrossEngine.StoreConfig sc = ArkCrossEngine.StoreConfigProvider.Instance.GetDataById(si.ID); if (sc != null) { ArkCrossEngine.ItemConfig itemconfig = ArkCrossEngine.ItemConfigProvider.Instance.GetDataById(sc.m_ItemId); if (itemconfig != null) { if (itemconfig.m_CanWear) { EquipmentInfo ei = GamePokeyManager.GetEquipmentInfo(itemconfig.m_WearParts); if (ei != null) { UnityEngine.GameObject go = UIManager.Instance.GetWindowGoByName("ItemProperty"); if (go != null && !NGUITools.GetActive(go)) { ItemProperty ip = go.GetComponent <ItemProperty>(); if (ip != null) { ip.ExchangeGoodsCompare(currencySprite, si.ID, ei.id, ei.level, ei.propertyid, sc.m_ItemId, ei.level, ei.propertyid, itemconfig.m_WearParts, si.GetCurrency()); UIManager.Instance.ShowWindowByName("ItemProperty"); } } } } else { UnityEngine.GameObject go = UIManager.Instance.GetWindowGoByName("ItemProperty"); if (go != null && !NGUITools.GetActive(go)) { ItemProperty ip = go.GetComponent <ItemProperty>(); if (ip != null) { ip.ExchangeGoodsSetItemProperty(currencySprite, si.ID, sc.m_ItemId, 0, 0, 0, si.GetCurrency()); UIManager.Instance.ShowWindowByName("ItemProperty"); } } } } } } } } } }