コード例 #1
0
ファイル: CombatCopy_Protocol.cs プロジェクト: zuojiashun/src
 public void OnEnterCopy(stEntertCopyUserCmd_S cmd)
 {
     DataManager.Manager <ComBatCopyDataManager>().OnEnterCopy(cmd);
 }
コード例 #2
0
    public void OnEnterCopy(stEntertCopyUserCmd_S cmd)
    {
        m_dicTeammateStatus.Clear();
        m_dicEnterZoneStatus.Clear();
        m_dicSendEnterZoneTime.Clear();

        CopyDataBase cdb = GameTableManager.Instance.GetTableItem <CopyDataBase>(cmd.copy_base_id);

        if (cdb != null)
        {
            m_uEnterCopyID = cmd.copy_base_id;

            uint campCopyId = 4001;   //阵营战
            if (m_uEnterCopyID != campCopyId)
            {
                m_uCopyCountDown = cdb.keepTime - cmd.copy_live_time;
            }

            Client.IMapSystem mapsys = ClientGlobal.Instance().GetMapSystem();
            if (mapsys != null)
            {
                mapsys.SetEnterZoneCallback(OnEnterZone);
            }

            //进入副本时 初始化波数数据
            InitWaveIdListByCopyId();

            //进入副本接口
            ICopy copy = GetCopyByCopyID(m_uEnterCopyID);
            if (copy != null)
            {
                copy.EnterCopy();
            }
            else
            {
                stCopyInfo info = new stCopyInfo();
                info.bShow = true;
                info.bShowBattleInfoBtn = false;

                DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MainPanel, UIMsgID.eShowCopyInfo, info);

                this.CopyCDAndExitData = new CopyCDAndExitInfo {
                    bShow = true, bShowBattleInfoBtn = false
                };
            }

            //副本中关闭消息推送界面
            if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.MessagePushPanel))
            {
                DataManager.Manager <UIPanelManager>().HidePanel(PanelID.MessagePushPanel);
            }

            if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.MissionAndTeamPanel))
            {
                DataManager.Manager <UIPanelManager>().SendMsg(PanelID.MissionAndTeamPanel, UIMsgID.eCopyEnter, null);
            }

            Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.COMBOT_ENTER_EXIT, new Client.stCombotCopy()
            {
                copyid = cmd.copy_base_id, enter = true
            });

            //进入副本标志
            m_bIsEnterCopy = true;
        }
    }