Exemplo n.º 1
0
        public void RequestEnterMap(uint nmapId, uint cost = 0)
        {
            if (nmapId == mapID)
            {
                Client.ITipsManager tips = m_ClientGlobal.GetTipsManager();
                if (tips != null)
                {
                    tips.ShowTipsById(514);
                }
                return;
            }

            if (m_ClientGlobal.netService != null)
            {
                // 请求传送地图 先让主角停止
                if (m_ClientGlobal.MainPlayer != null)
                {
                    m_ClientGlobal.MainPlayer.SendMessage(EntityMessage.EntityCommand_StopMove, m_ClientGlobal.MainPlayer.GetPos());
                }

                m_ClientGlobal.netService.Send(new GameCmd.stChangeMapScreenUserCmd_CS()
                {
                    map_id = nmapId,
                    type   = cost,
                });
            }
        }
Exemplo n.º 2
0
        private void OnResume(bool bShowTip)
        {
            if (m_status == CombatRobotStatus.RUNNING)
            {
                return;
            }

            IPlayer mainPlayer = ControllerSystem.m_ClientGlobal.MainPlayer;

            if (mainPlayer == null)
            {
                return;
            }


            //如果挂机打指定怪的时候跑到别的地方 找不到指定怪则不打指定怪了
            if (m_nTargetID != 0)
            {
                IEntitySystem es  = ControllerSystem.m_ClientGlobal.GetEntitySystem();
                INPC          npc = es.FindNPCByBaseId(m_nTargetID);
                if (npc == null)
                {
                    m_nTargetID = 0;
                }
            }

            ChangeStatus(CombatRobotStatus.RUNNING);
            ChangeRoleAction(RoleAction.NONE);
            if (bShowTip)
            {
                Client.ITipsManager tip = ControllerSystem.m_ClientGlobal.GetTipsManager();
                if (tip != null)
                {
                    tip.ShowTipsById(702);
                }
            }

            m_centerPos = mainPlayer.GetPos();
            m_fStopTime = 0;

            AddEventListener(GameEventID.SKILLINFO_REFRESH);
            AddEventListener(GameEventID.SKILLNONESTATE_ENTER);
            AddEventListener(GameEventID.ROBOTCOMBAT_NEXTCMD);

            Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.ROBOTCOMBAT_START, null);
        }
Exemplo n.º 3
0
        private void OnPause(bool bShowTip)
        {
            if (m_status == CombatRobotStatus.PAUSE)
            {
                return;
            }

            ChangeStatus(CombatRobotStatus.PAUSE);
            ChangeRoleAction(RoleAction.NONE);
            if (bShowTip)
            {
                Client.ITipsManager tip = ControllerSystem.m_ClientGlobal.GetTipsManager();
                if (tip != null)
                {
                    tip.ShowTipsById(701);
                }
            }
            CmdManager.Instance().Clear();//清空指令
            RemoveListener(GameEventID.SKILLINFO_REFRESH);
            RemoveListener(GameEventID.SKILLNONESTATE_ENTER);
            RemoveListener(GameEventID.ROBOTCOMBAT_NEXTCMD);
        }