Esempio n. 1
0
    void StartAutoFight()
    {
        if (m_bIsEnterCopy)
        {
            CopyDataBase cdb = GameTableManager.Instance.GetTableItem <CopyDataBase>(m_uEnterCopyID);
            if (cdb != null)
            {
                //进入副本 如果还是组队跟随状态 跟随状态挂起,进入挂机状态
                Client.IControllerSystem cs = Client.ClientGlobal.Instance().GetControllerSystem();
                if (cs != null)
                {
                    Client.ICombatRobot robot = cs.GetCombatRobot();
                    if (robot != null) //&& robot.Status != Client.CombatRobotStatus.STOP)
                    {
                        if (DataManager.Manager <TeamDataManager>().IsJoinTeam&& DataManager.Manager <TeamDataManager>().IsFollow)
                        {
                            robot.StartInCopy(m_uEnterCopyID, LaskSkillWave, LastTransmitWave);
                        }

                        if (cdb.IsAutoFight)
                        {
                            robot.StartInCopy(m_uEnterCopyID, LaskSkillWave, LastTransmitWave);
                        }
                    }
                }
            }
        }
    }
Esempio n. 2
0
    void onClick_BtnAI_Btn(GameObject caster)
    {
        Client.IControllerSystem cs = Client.ClientGlobal.Instance().GetControllerSystem();
        if (cs == null)
        {
            Engine.Utility.Log.Error("ExecuteCmd: ControllerSystem is null");
            return;
        }

        Client.ICombatRobot robot = cs.GetCombatRobot();
        if (robot.Status == Client.CombatRobotStatus.STOP)
        {
            ComBatCopyDataManager comBat = DataManager.Manager <ComBatCopyDataManager>();
            if (comBat.IsEnterCopy && comBat.EnterCopyID != 0)
            {
                robot.StartInCopy(comBat.EnterCopyID, comBat.LaskSkillWave, comBat.LastTransmitWave);
            }
            else
            {
                robot.Start();
            }
        }
        else
        {
            robot.Stop();
        }
    }