Example #1
0
        private void ViewLegendCupDetail(long nLegendCupID)
        {
            cmd_legendcup_view_single_cup cupdata = new cmd_legendcup_view_single_cup();

            cupdata.nLegendCupID = nLegendCupID;
            ViewEventHelper.Instance.SendCommand <cmd_legendcup_view_single_cup>(GameLogicDef.GVIEWCMD_LEGENDCUP_VIEW_SINGLE_CUP, ref cupdata);
        }
Example #2
0
        public void OnClanLegendCupBtnClick()
        {
            cmd_clan_basedata cmdBasedata = LogicDataCenter.clanDataManager.ClanBaseData;
            int nSelfID = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID);

            if (cmdBasedata.lLegendCupID > 0)               // 比赛中
            {
                cmd_legendcup_view_single_cup cupdata = new cmd_legendcup_view_single_cup();
                cupdata.nLegendCupID = cmdBasedata.lLegendCupID;
                ViewEventHelper.Instance.SendCommand <cmd_legendcup_view_single_cup>(GameLogicDef.GVIEWCMD_LEGENDCUP_VIEW_SINGLE_CUP, ref cupdata);
            }
            else
            {
                if (nSelfID == cmdBasedata.nShaikhID)       // 免费发布、付费发布
                {
                    //UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_CREATETYPE_SHOW, null);
                    // 直接选择联盟杯赛
                    cmd_legendcup_req_create_cup_type cupType = new cmd_legendcup_req_create_cup_type();
                    cupType.byLegendCupType = (byte)ELegendCupType.emCupType_Clan;      // 杯赛创建类型
                    cupType.nActorID        = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID);
                    ViewEventHelper.Instance.SendCommand <cmd_legendcup_req_create_cup_type>(GameLogicDef.GVIEWCMD_LEGENDCUP_CREATE_TYPE_REQ, ref cupType);
                }
                else                                        // 等待发布
                {
                    UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_LEGENDCUP_CLAN_WAIT_SHAIKH_CREATE);
                }
            }
        }
Example #3
0
        public void RecvCupPublicSuccess()
        {
            if (!UISystem.Instance.IsWndVisible(WndID.WND_ID_LEGENDCUP_REGIST))
            {
                return;
            }

            // 关闭注册界面  打开相应的杯赛阶段界面
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_REGIST_CLOSE, null);

            if (m_legendCupSelfInNodeDic.Count == 1)
            {
                cmd_legendcup_view_single_cup cupdata = new cmd_legendcup_view_single_cup();
                cupdata.nLegendCupID = m_legendCupSelfInNodeDic.ElementAt(0).Value.nLegendCupID;
                ViewEventHelper.Instance.SendCommand <cmd_legendcup_view_single_cup>(GameLogicDef.GVIEWCMD_LEGENDCUP_VIEW_SINGLE_CUP, ref cupdata);
            }
        }
Example #4
0
        public void UpdateSingleCup(IntPtr ptrParam, int nPtrLen)
        {
            IntPtrVaArgParseHelper          helper = new IntPtrVaArgParseHelper(ptrParam, nPtrLen);
            cmd_legendcup_recv_cuplist_node data   = helper.get <cmd_legendcup_recv_cuplist_node>();

            if (m_legendCupListType == (int)ELegendCupListType.ELCLT_Clan && data.nIsClanLimit <= 0)
            {
                return;
            }

            List <cmd_legendcup_recv_cuplist_node> tempList = new List <cmd_legendcup_recv_cuplist_node>(m_legendCupNodeList);
            bool bIsIn = false;

            for (int i = 0; i < tempList.Count; i++)
            {
                if (tempList[i].nLegendCupID == data.nLegendCupID)
                {
                    tempList[i] = data;
                    bIsIn       = true;
                    break;
                }
            }
            if (!bIsIn)
            {
                tempList.Add(data);
            }
            SetLegendCupListBySequence(tempList);

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_CUPLIST_UPDATELIST, null);
            if (data.nIsNewCreate > 0)
            {
                // 关闭创建界面
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_MSGBOXCREATE_CLOSE, null);
                // 打开详细界面
                cmd_legendcup_view_single_cup cupdata = new cmd_legendcup_view_single_cup();
                cupdata.nLegendCupID = data.nLegendCupID;
                ViewEventHelper.Instance.SendCommand <cmd_legendcup_view_single_cup>(GameLogicDef.GVIEWCMD_LEGENDCUP_VIEW_SINGLE_CUP, ref cupdata);
            }
        }