private void ResetData() { if (null != m_growCost) { m_growCost.SetGridData(0); } if (null != cardArray) { UICompoundSelectAttrGrid tempGrid = null; for (int i = 0, max = cardArray.Length; i < max; i++) { if (null == tempGrid) { continue; } tempGrid.SetData(false); } } }
private void ShowResult() { GameCmd.stEquipComposeItemWorkUserCmd_CS compoundData = emgr.CompoundData; if (null == compoundData.index_info || compoundData.index_info.Count != cardArray.Length) { return; } table.EquipComposeDataBase equipComposeDB = DataManager.Manager <ItemManager>().GetLocalDataBase <table.EquipComposeDataBase>(compoundData.new_item); if (null == equipComposeDB) { return; } m_assistID = equipComposeDB.assistId; m_assistNeedNum = equipComposeDB.assistNum; List <EquipManager.CompoudSelectAttrData> cardDatas = new List <EquipManager.CompoudSelectAttrData>(); int replaceCoinNum = (int)DataManager.Manager <MallManager>().GetDQPriceByItem(m_assistID); List <GameCmd.PairNumber> attrs = null; bool isBind = false; GameCmd.PropIndexInfo tempIndexInfo = null; EquipManager.CompoudSelectAttrData tempSelectAttrData = null;; GameCmd.PairNumber tempPair = null; GameCmd.PropIndexInfo.PropPair tempPropPair = null; for (int i = 0, max = compoundData.index_info.Count; i < max; i++) { isBind = false; tempIndexInfo = compoundData.index_info[i]; tempSelectAttrData = new EquipManager.CompoudSelectAttrData(); tempSelectAttrData.Index = tempIndexInfo.index; tempSelectAttrData.BaseID = compoundData.new_item; attrs = null; if (null != tempIndexInfo.value) { attrs = new List <GameCmd.PairNumber>(); for (int j = 0, maxJ = tempIndexInfo.value.Count; j < maxJ; j++) { tempPropPair = tempIndexInfo.value[j]; if (tempPropPair.key == (uint)GameCmd.eItemAttribute.Item_Attribute_FightPower) { continue; } if (tempPropPair.key == (uint)GameCmd.eItemAttribute.Item_Attribute_Bind) { if (ItemDefine.IsBind(tempPropPair.value)) { isBind = true; } continue; } tempPair = new GameCmd.PairNumber() { id = tempPropPair.key, value = tempPropPair.value, }; attrs.Add(tempPair); } } tempSelectAttrData.CostItemID = equipComposeDB.assistId; tempSelectAttrData.CostItemNum = (int)equipComposeDB.assistNum; tempSelectAttrData.ReplaceCostMoneyType = GameCmd.MoneyType.MoneyType_Coin; tempSelectAttrData.ReplaceCostMoneyNum = replaceCoinNum; tempSelectAttrData.Attrs = attrs; tempSelectAttrData.IsBind = isBind; cardDatas.Add(tempSelectAttrData); } bool isOpen = false; bool freeGet = (emgr.CompoundSelectIndex == 0); bool select = false; UICompoundSelectAttrGrid tempGrid = null; for (int i = 0, max = cardArray.Length; i < max; i++) { select = false; isOpen = false; tempGrid = cardArray[i]; if (null == tempGrid) { continue; } tempSelectAttrData = cardDatas[i]; if (!freeGet) { isOpen = emgr.IsEquipCompoundResultOpen(tempSelectAttrData.Index); if (isOpen) { select = (emgr.CompoundSelectIndex == tempSelectAttrData.Index); } } tempGrid.SetData(isOpen, data: tempSelectAttrData, select: select, freeGet: freeGet); } UpdateAssistData(); }