/// <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); } }
public void Execute(GameCmd.stAddListTeamMemberRelationUserCmd_S cmd) { DataManager.Manager <TeamDataManager>().OnAddTeamMemberList(cmd); }