示例#1
0
    /// <summary>
    /// 设置拾取模式
    /// </summary>
    /// <param name="pickMode"></param>
    public void ReqPickMode(GameCmd.TeamItemMode pickMode)
    {
        stChangeTeamModeRelationUserCmd_CS cmd = new stChangeTeamModeRelationUserCmd_CS();

        cmd.byItemMode = (uint)pickMode;
        NetService.Instance.Send(cmd);
    }
示例#2
0
    public void OnPickMode(stChangeTeamModeRelationUserCmd_CS cmd)
    {
        m_teamItemMode = (GameCmd.TeamItemMode)cmd.byItemMode;

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

        if (m_teamItemMode == GameCmd.TeamItemMode.TeamItemMode_Free)
        {
            TipsManager.Instance.ShowTips(LocalTextType.Team_Recruit_ziyoushiqu);//自由拾取模式
        }
        else if (m_teamItemMode == GameCmd.TeamItemMode.TeamItemMode_Leader)
        {
            TipsManager.Instance.ShowTips(LocalTextType.Team_Recruit_duizhangshiqu);//队长分配模式
        }
    }
示例#3
0
    /// <summary>
    ///  新加入的人收到所有人的list
    /// </summary>
    /// <param name="cmd"></param>
    public void OnAddTeamMemberList(GameCmd.stAddListTeamMemberRelationUserCmd_S cmd)
    {
        CleanConvenientTeamData();//清便捷组队数据
        if (m_bIsJoinTeam)
        {
            ClearTeamData();  //清之前的队伍数据
        }

        m_bIsJoinTeam  = true;
        m_teamId       = cmd.dwTeamID;
        m_leaderName   = cmd.byTeamName;
        m_leaderId     = cmd.dwLeaderID;
        m_teamItemMode = (GameCmd.TeamItemMode)cmd.byItemMode;
        Engine.Utility.EventEngine.Instance().DispatchEvent((int)Client.GameEventID.TEAM_JOIN, new Client.stTeamJoin()
        {
            teamId = cmd.dwTeamID, teamName = cmd.byTeamName
        });

        for (int i = 0; i < cmd.data.Count; i++)
        {
            TeamMemberInfo memberInfo = new TeamMemberInfo(cmd.data[i].dwUserID, cmd.data[i].byUserName, cmd.data[i].byLevel, cmd.data[i].byProfession, cmd.data[i].byOnline, cmd.data[i].wdFace, cmd.data[i].suit_data);
            DataManager.Manager <TeamDataManager>().AddTeamMember(memberInfo);
        }

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

        if (!MainPlayerIsLeader())
        {
            TipsManager.Instance.ShowTips(LocalTextType.Team_Join_chenggongjiarudongwu);//成功加入了队伍

            if (DataManager.Manager <UIPanelManager>().IsShowPanel(PanelID.ConvenientTeamPanel))
            {
                DataManager.Manager <UIPanelManager>().HidePanel(PanelID.ConvenientTeamPanel);//如果打开了便捷组队,现在关闭
            }
        }

        if (MainPlayerIsLeader())
        {
            DataManager.Manager <UIPanelManager>().ShowPanel(PanelID.TeamPanel);
        }
    }