Beispiel #1
0
        public override void OnMessage(WndMsgID msgID, UIMsgData data)
        {
            switch (msgID)
            {
            case WndMsgID.WND_MSG_LEGENDCUP_BLACKLIST_SHOW:
            {
                SetVisible(true);

                LegendCupIDData cmdData = (LegendCupIDData)data;
                if (m_wndView != null)
                {
                    m_wndView.OnOpenBlacklistWnd(cmdData.nLegendCupID);
                }
            }
            break;

            case WndMsgID.WND_MSG_LEGENDCUP_BLACKLIST_BLACKLIST:
            {
                if (m_wndView != null)
                {
                    LegendCupIDData cmdData = (LegendCupIDData)data;
                    m_wndView.OnRecvBlacklist(cmdData.nLegendCupID);
                }
            }
            break;

            default:
                break;
            }
        }
Beispiel #2
0
        public override void OnMessage(WndMsgID msgID, UIMsgData data)
        {
            switch (msgID)
            {
            case WndMsgID.WND_MSG_LEGENDCUP_PASSWORD_SHOW:
            {
                SetVisible(true);

                LegendCupIDData cmdData = (LegendCupIDData)data;
                if (m_wndView != null)
                {
                    m_wndView.OnAddLegendCup(cmdData.nLegendCupID);
                }
            }
            break;

            case WndMsgID.WND_MSG_LEGENDCUP_PASSWORD_CLOSE:
            {
                if (m_wndView != null)
                {
                    UnloadView();
                }
            }
            break;

            default:
                break;
            }
        }
Beispiel #3
0
        public void OnClickViewBlackListBtn()
        {
            LegendCupIDData uiData = new LegendCupIDData();

            uiData.nLegendCupID = nLegendCupID;
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_BLACKLIST_SHOW, uiData);
        }
Beispiel #4
0
        private bool OnConfirmAddCup()
        {
            cmd_legendcup_recv_cuplist_node cupBaseData = LogicDataCenter.legendCupDataManager.GetSingleLegendCupNode(nLegendCupID);

            if (cupBaseData.nLegendCupID == 0)
            {
                return(false);
            }

            if (cupBaseData.nIsLock > 0)
            {
                LegendCupIDData uiData = new LegendCupIDData();
                uiData.nLegendCupID = nLegendCupID;
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_PASSWORD_SHOW, uiData);
            }
            else
            {
                cmd_legendcup_add_regist_kinlist addcup = new cmd_legendcup_add_regist_kinlist();
                addcup.nLegendCupID    = nLegendCupID;
                addcup.nKinID          = LogicDataCenter.kinDataManager.KinBaseData.nKinID;
                addcup.nActorID        = EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID);
                addcup.byCreateCupType = cupBaseData.byCreateCupType;
                addcup.szPassword      = "";
                ViewEventHelper.Instance.SendCommand <cmd_legendcup_add_regist_kinlist>(GameLogicDef.GVIEWCMD_LEGENDCUP_ADD_REGIST_KINLIST, ref addcup);
            }

            return(true);
        }
Beispiel #5
0
 public void OnClickCompetitionAwardRT(string eventName)
 {
     if (eventName == "CompetitionAward")
     {
         LegendCupIDData uiData = new LegendCupIDData();
         uiData.nLegendCupID = m_LegendCupID;
         UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_PRIZE_SHOW, uiData);
     }
 }
Beispiel #6
0
        public void UpdateCupCompetitionInfo(IntPtr ptrParam, int nPtrLen)
        {
            IntPtrVaArgParseHelper helper            = new IntPtrVaArgParseHelper(ptrParam, nPtrLen);
            long llegendCupId                        = helper.get <long>();
            cmd_legendcup_recv_competition_node node = helper.get <cmd_legendcup_recv_competition_node>();

            // 自己战队dida相关
            if (!(CheckIsSelfInCompetitionMember(node.nKin1ID) == false && CheckIsSelfInCompetitionMember(node.nKin2ID) == false))
            {
                bool bDida = (node.byCompetitionNodeState == (byte)ECompetitionNodeState.emNodeState_CanEnter);
                SetLegendCupDIDA(bDida, llegendCupId, node.nRoundID, node.nSearchID);
            }

            // 更新节点信息
            cmd_legendcup_recv_cuplist_node cupBaseData = LogicDataCenter.legendCupDataManager.GetSingleLegendCupNode(llegendCupId);

            if (cupBaseData.nLegendCupID == 0)
            {
                return;
            }

            if (!m_legendCupCompetitionDic.ContainsKey(llegendCupId))
            {
                return;
            }
            SingleCompetitionInfo competitionInfo = m_legendCupCompetitionDic[llegendCupId];

            if (competitionInfo == null || competitionInfo.nodeInfo == null)
            {
                return;
            }

            for (int i = 0; i < competitionInfo.nodeInfo.Count; i++)
            {
                if (competitionInfo.nodeInfo[i].nSearchID == node.nSearchID)
                {
                    competitionInfo.nodeInfo[i] = node;
                    break;
                }
            }

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

            uiData.nLegendCupID = competitionInfo.headInfo.nLegendCupID;
            if (competitionInfo.headInfo.byCompetitionType == (int)ERoundCompetitionType.emType_GroupCompetition)
            {
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_GROUP_UPDATE, uiData);
            }
            else if (competitionInfo.headInfo.byCompetitionType == (int)ERoundCompetitionType.emType_KnockoutCompetition)
            {
                // 大淘汰赛、小淘汰赛界面合并
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_SMALLKNOCKOUT_UPDATE, uiData);
            }
        }
Beispiel #7
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 #8
0
        public void RecvCupRegistBlacklist(IntPtr ptrParam, int nPtrLen)
        {
            SingleRegistBlacklistInfo info   = new SingleRegistBlacklistInfo();
            IntPtrVaArgParseHelper    helper = new IntPtrVaArgParseHelper(ptrParam, nPtrLen);

            info.headInfo = helper.get <cmd_legendcup_recv_regist_balcklisthead>();
            info.nodeInfo = new List <cmd_legendcup_recv_regist_balcklistnode>();
            for (int i = 0; i < info.headInfo.nCurBlacklistNum; ++i)
            {
                cmd_legendcup_recv_regist_balcklistnode data = helper.get <cmd_legendcup_recv_regist_balcklistnode>();
                info.nodeInfo.Add(data);
            }
            m_legendCupRegistBlacklistDic[info.headInfo.nLegendCupID] = info;

            LegendCupIDData uiData = new LegendCupIDData();

            uiData.nLegendCupID = info.headInfo.nLegendCupID;
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_LEGENDCUP_BLACKLIST_BLACKLIST, uiData);
        }
Beispiel #9
0
        public override void OnMessage(WndMsgID msgID, UIMsgData data)
        {
            switch (msgID)
            {
            case WndMsgID.WND_MSG_LEGENDCUP_PRIZE_SHOW:
            {
                SetVisible(true);

                if (m_wndView != null)
                {
                    LegendCupIDData cupIDData = (LegendCupIDData)data;
                    m_wndView.OnShowLegndCupPrizeWnd(cupIDData.nLegendCupID);
                }
            }
            break;

            default:
                break;
            }
        }
Beispiel #10
0
        public override void OnMessage(WndMsgID msgID, UIMsgData data)
        {
            switch (msgID)
            {
            case WndMsgID.WND_MSG_LEGENDCUP_GROUP_SHOW:
            {
                SetVisible(true);

                if (m_wndView != null)
                {
                    LegendCupIDData cmdData = (LegendCupIDData)data;
                    m_wndView.OnShowGroupWnd(cmdData.nLegendCupID);
                }
            }
            break;

            case WndMsgID.WND_MSG_LEGENDCUP_GROUP_UPDATE:
            {
                if (m_wndView != null)
                {
                    LegendCupIDData cmdData = (LegendCupIDData)data;
                    m_wndView.OnShowGroupWnd(cmdData.nLegendCupID);
                }
            }
            break;

            case WndMsgID.WND_MSG_COMMON_LOGINMOBA:
            {
                if (m_wndView != null)
                {
                    m_wndView.OnClickCloseBtn();
                }
            }
            break;

            default:
                break;
            }
        }
Beispiel #11
0
        public override void OnMessage(WndMsgID msgID, UIMsgData data)
        {
            switch (msgID)
            {
            case WndMsgID.WND_MSG_LEGENDCUP_REGIST_KINLIST:
            {
                SetVisible(true);

                if (m_wndView != null)
                {
                    LegendCupIDData cmdData = (LegendCupIDData)data;
                    m_wndView.OnRecvKinList(cmdData.nLegendCupID);
                }
            }
            break;

            //case WndMsgID.WND_MSG_LEGENDCUP_REGIST_MEMBERLIST:
            //    {
            //        if (m_wndView != null)
            //        {
            //            UIMsgCmdData cmdData = (UIMsgCmdData)data;
            //            m_wndView.OnRecvKinMemberList(cmdData.nParam);
            //        }
            //    }
            //    break;
            case WndMsgID.WND_MSG_LEGENDCUP_REGIST_CLOSE:
            case WndMsgID.WND_MSG_LEGENDCUP_CUPLIST_SYSTEM_CANCEL:
            {
                m_wndView.OnClickCloseBtn();
            }
            break;

            default:
                break;
            }
        }