Beispiel #1
0
        public void RecvCupCompetitionInfo(IntPtr ptrParam, int nPtrLen)
        {
            IntPtrVaArgParseHelper helper = new IntPtrVaArgParseHelper(ptrParam, nPtrLen);

            cmd_legendcup_recv_competition_head head = helper.get <cmd_legendcup_recv_competition_head>();
            long nLegendCupID = head.nLegendCupID;

            if (!m_legendCupCompetitionDic.ContainsKey(nLegendCupID))
            {
                SingleCompetitionInfo info = new SingleCompetitionInfo();
                m_legendCupCompetitionDic.Add(nLegendCupID, info);
            }

            m_legendCupCompetitionDic[nLegendCupID].headInfo = head;

            // 时间不从这里获取,改为单独下发RecvCupCompetitionAllRoundTime()
            //m_legendCupCompetition.roundInfo = new List<cmd_legendcup_recv_competition_roundinfo>();
            for (int i = 0; i < head.nRoundID; i++)
            {
                cmd_legendcup_recv_competition_roundinfo roundData = helper.get <cmd_legendcup_recv_competition_roundinfo>();
                //m_legendCupCompetition.roundInfo.Add(roundData);
            }
            m_legendCupCompetitionDic[nLegendCupID].nodeInfo = new List <cmd_legendcup_recv_competition_node>();
            for (int i = 0; i < head.nCompetitionNodeCount; ++i)
            {
                cmd_legendcup_recv_competition_node nodeData = helper.get <cmd_legendcup_recv_competition_node>();
                m_legendCupCompetitionDic[nLegendCupID].nodeInfo.Add(nodeData);
            }

            // 通知相应界面
            LegendCupIDData uiData = new LegendCupIDData();

            uiData.nLegendCupID = nLegendCupID;
            if (head.byCompetitionType == (int)ERoundCompetitionType.emType_GroupCompetition)
            {
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_GROUP_SHOW, uiData);
            }
            else if (head.byCompetitionType == (int)ERoundCompetitionType.emType_KnockoutCompetition)
            {
                // 大淘汰赛、小淘汰赛界面合并
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_SMALLKNOCKOUT_SHOW, uiData);
            }
        }
Beispiel #2
0
        public void RecvCupCompetitionAllRoundTime(IntPtr ptrParam, int nPtrLen)
        {
            IntPtrVaArgParseHelper helper = new IntPtrVaArgParseHelper(ptrParam, nPtrLen);

            cmd_legendcup_competition_kinmemberhead headData = helper.get <cmd_legendcup_competition_kinmemberhead>();
            long nLegendCupID = headData.nLegendCupID;

            if (!m_legendCupCompetitionDic.ContainsKey(nLegendCupID))
            {
                SingleCompetitionInfo info = new SingleCompetitionInfo();
                m_legendCupCompetitionDic.Add(nLegendCupID, info);
            }

            // 时间从这里获取
            m_legendCupCompetitionDic[nLegendCupID].roundInfo = new List <cmd_legendcup_recv_competition_roundinfo>();
            for (int i = 0; i < headData.nMemberCount; i++)
            {
                cmd_legendcup_recv_competition_roundinfo roundData = helper.get <cmd_legendcup_recv_competition_roundinfo>();
                m_legendCupCompetitionDic[nLegendCupID].roundInfo.Add(roundData);
            }
        }