void UpdateHeroItem(int index, RectTransform cell)
        {
            HeroItemData    objHero = heroDatas[index];
            UI_HeroListItem uiIt    = cell.gameObject.GetComponent <UI_HeroListItem>();

            if (uiIt == null)
            {
                uiIt = cell.gameObject.AddComponent <UI_HeroListItem>();
                heroList.Add(uiIt);
            }

            // 有一个空
            if (ObjectSelf.GetInstance().HeroContainerBag.GetHeroList().Count % 2 != 0 && index == ObjectSelf.GetInstance().HeroContainerBag.GetHeroList().Count)
            {
                uiIt.index = index;
                uiIt.m_id  = index;
                uiIt.Initialize(objHero, ItemType.Empty);
            }
            else
            {
                uiIt.index = index;
                uiIt.m_id  = index;
                uiIt.Initialize(objHero);
            }
//
//			if (index < ObjectSelf.GetInstance ().HeroContainerBag.GetHeroList ().Count) {
//								uiIt.index = index;
//								uiIt.m_id = index;
//								uiIt.Initialize (objHero);
//						}
//			//else if(index ==
//			else
//			{
//				uiIt.index = index;
//				uiIt.m_id = index;
//				uiIt.Initialize(objHero);
//			}

//            if (index == noGetHeros.Count && (noGetHeros.Count % 2 != 0))   //当显示未获取的英雄时  需要空出一个空格
//            {
//                uiIt.index = index;
//                uiIt.m_id = index;
//                uiIt.Initialize(objHero, ItemType.Empty);
//            }
//            else
//            {
//                uiIt.index = index;
//                uiIt.m_id = index;
//                uiIt.Initialize(objHero);
//            }
        }
        void TranHeroList(List <ObjectCard> list)
        {
            heroDatas.Clear();
            Dictionary <int, int> noGetIDs = new Dictionary <int, int>();

            noGetHeros.Clear();
            //先显示已拥有英雄
            foreach (ObjectCard oc in list)
            {
                HeroItemData data = new HeroItemData();
                data.objcet      = oc;
                data.heroTableID = -1;
                heroDatas.Add(data);
                noGetIDs.Add(GameUtils.GetHeroIDNum(oc.GetHeroRow().GetID()), -1);
            }

            // 插入一条无用数据
            if (ObjectSelf.GetInstance().HeroContainerBag.GetHeroList().Count % 2 != 0)
            {
                heroDatas.Add(new HeroItemData());
            }

            //再显示未获得英雄
            Dictionary <int, IExcelBean> table = DataTemplate.GetInstance().m_HeroTable.getData();
            int id = -1;

            foreach (var item in table)
            {
                string endChar = item.Key.ToString().Substring(item.Key.ToString().Length - 1, 1);
                string paixuId = ((HeroTemplate)item.Value).getPaxid().ToString();
                // Debug.LogError("substring:" + endChar + "---paixun:" + paixuId);
                if (endChar.Contains(paixuId) && !noGetIDs.TryGetValue(GameUtils.GetHeroIDNum(item.Key), out id))
                {
                    noGetHeros.Add((HeroTemplate)item.Value);
                    noGetIDs.Add(GameUtils.GetHeroIDNum(item.Key), -1);
                }
            }
            //排序
            noGetHeros.Sort(new NotHeroComparer());
            for (int i = 0; i < noGetHeros.Count; i++)
            {
                HeroItemData data = new HeroItemData();
                data.objcet      = null;
                data.heroTableID = noGetHeros[i].GetID();
                heroDatas.Add(data);
            }
        }