/// <summary> /// 遍历比较好的id 合并Ieam相同的id /// 所有在开启时间内的活动都要显示 不管有没有数据 /// 服务器返回的数据 只是开启活动的数据 没有开启的也要显示 所以有了 m_ActivityBannerData /// </summary> public void SelectTeam() { m_ActivityBannerData.Clear(); for (int i = 0; i < m_OpenActivityID.Count; i++) { ActivityBannerData temp = new ActivityBannerData(); if (m_ActivityOverviewMar.m_ActivityOverviewData.ContainsKey(m_OpenActivityID[i])) { temp._ActivityOverviewData = m_ActivityOverviewMar.m_ActivityOverviewData[m_OpenActivityID[i]]; temp.m_Key = m_OpenActivityID[i]; } else { ActivityOverviewData _ActivityOverviewData = new ActivityOverviewData(); _ActivityOverviewData.m_id = m_OpenActivityID[i]; temp.m_Key = m_OpenActivityID[i]; temp._ActivityOverviewData = _ActivityOverviewData; } m_ActivityBannerData.Add(temp); GameactivityTemplate _gt = (GameactivityTemplate)DataTemplate.GetInstance().m_GameactivityTable.getTableData(m_OpenActivityID[i]); if (m_MergeData.ContainsKey(_gt.getTeam())) { List <int> _temp = m_MergeData[_gt.getTeam()]; _temp.Add(_gt.getId()); m_MergeData[_gt.getTeam()] = _temp; } else { List <int> _temp = new List <int>(); _temp.Add(_gt.getId()); m_MergeData.Add(_gt.getTeam(), _temp); } } //foreach (KeyValuePair<int, List<int>> kvp in m_MergeData) //{ // Debug.Log("m_MergeData.key" + kvp.Key); //} }