/// <summary> /// 填充队伍数据 /// </summary> public void SetTeamData(TeamMemberVO infoVO, UISocialList.SocialType socialType, Vector2Int vector2Int) { UIUtil.SetIconImage(m_TeamPosImage, (uint)m_TeamPosIcons[vector2Int.y]); if (infoVO.UID > 0) { m_NullElelment.gameObject.SetActive(false); m_Elelment.gameObject.SetActive(true); m_SocialType = socialType; SetContent(); m_LevelText.text = string.Format(TableUtil.GetLanguageString("character_text_1019"), infoVO.Level.ToString()); m_DanText.text = string.Format(TableUtil.GetLanguageString("social_text_1004"), infoVO.DanLevel.ToString()); m_PlayerName.text = infoVO.Name; if (infoVO.IsOnline) { m_TeamOnLineImage.gameObject.SetActive(true); } if (infoVO.TID > 0) { if (m_CfgEternityProxy.GetPlayerByItemTId(infoVO.TID) != null) { UIUtil.SetIconImage(m_TeamHeardImage, (uint)m_CfgEternityProxy.GetPlayerByItemTId(infoVO.TID).Value.HeadPortrait); } } if (m_FriendProxy.GetFriend(infoVO.UID) != null) //好友 { m_TeamFriendImage.gameObject.SetActive(true); } else { m_TeamFriendImage.gameObject.SetActive(false); } if (m_TeamProxy.GetMember(infoVO.UID) == null) { m_TeamHeaderImage.gameObject.SetActive(false); } else { if (m_TeamProxy.GetMember(infoVO.UID).IsLeader) //队长 { m_TeamHeaderImage.gameObject.SetActive(true); } else { m_TeamHeaderImage.gameObject.SetActive(false); } } } else { m_NullElelment.gameObject.SetActive(true); m_Elelment.gameObject.SetActive(false); } }
/// <summary> /// 刷新热键 /// </summary> public void RefreshHotKey() { if (m_SelectVoUid > 0) { SetHotKeyEnabled(UIAction.Social_AddBlacklist, true, true); SetHotKeyEnabled(UIAction.Social_Delete_RemoveBlacklist, true, true); SetHotKeyEnabled(UIAction.Team_Kick_Leave, true, true); SetHotKeyEnabled(UIAction.Social_Inspect_AddFriend, true); SetHotKeyEnabled(UIAction.Social_PrivateChat, true); SetHotKeyEnabled(UIAction.Team_Promote, true); SetHotKeyEnabled(UIAction.Team_Invite, true); State.GetAction(UIAction.Social_Inspect_AddFriend).Visible = true; } SetHotKeyEnabled(UIAction.Team_Mute_Unmute_MicOn_MicOff, true); switch (m_SocialType) { case SocialType.Team: SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 1); SetHotKeyDescription(UIAction.Team_Promote, 0); SetHotKeyDescription(UIAction.Team_Invite, 0); if (m_TeamProxy.GetMember(m_SelectVoUid) != null) { if (!m_TeamProxy.GetMember(m_SelectVoUid).IsOnline) { SetHotKeyEnabled(UIAction.Social_Inspect_AddFriend, false); SetHotKeyEnabled(UIAction.Social_PrivateChat, false); SetHotKeyEnabled(UIAction.Team_Promote, false); SetHotKeyEnabled(UIAction.Team_Invite, false); SetHotKeyEnabled(UIAction.Team_Mute_Unmute_MicOn_MicOff, false); } } if (IsCaptainBySelf()) //自己是队长 { if (m_SelectVoUid == m_ServerListProxy.GetCurrentCharacterVO().UId) //选自己 { SetHotKeyDescription(UIAction.Social_Delete_RemoveBlacklist, 1, true); SetHotKeyDescription(UIAction.Team_Kick_Leave, 1, true); if (m_TeamProxy.GetMember(m_SelectVoUid) != null) { if (m_TeamProxy.GetMember(m_SelectVoUid).IsMute) { SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 3); } else { SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 2); } } SetHotKeyEnabled(UIAction.Social_Inspect_AddFriend, false); SetHotKeyEnabled(UIAction.Social_AddBlacklist, false, true); SetHotKeyEnabled(UIAction.Social_PrivateChat, false); SetHotKeyEnabled(UIAction.Team_Promote, false); SetHotKeyEnabled(UIAction.Team_Invite, false); SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 0); } else { SetHotKeyDescription(UIAction.Social_Delete_RemoveBlacklist, 0, true); SetHotKeyDescription(UIAction.Team_Kick_Leave, 0, true); if (m_TeamProxy.GetMember(m_SelectVoUid) != null) { if (m_TeamProxy.GetMember(m_SelectVoUid).IsMute) { SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 1); } } SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 0); if (m_FriendProxy.GetFriend(m_SelectVoUid) != null) //好友 { SetHotKeyEnabled(UIAction.Social_Inspect_AddFriend, false); SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 0); } else { SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 1); } if (m_FriendProxy.GetBlack(m_SelectVoUid) != null) { SetHotKeyEnabled(UIAction.Social_AddBlacklist, false, true); } } } else { SetHotKeyEnabled(UIAction.Team_Promote, false); SetHotKeyEnabled(UIAction.Team_Invite, false); if (m_SelectVoUid == m_ServerListProxy.GetCurrentCharacterVO().UId) //选自己 { SetHotKeyDescription(UIAction.Social_Delete_RemoveBlacklist, 1, true); SetHotKeyDescription(UIAction.Team_Kick_Leave, 1, true); SetHotKeyEnabled(UIAction.Social_Inspect_AddFriend, false); SetHotKeyEnabled(UIAction.Social_AddBlacklist, false, true); SetHotKeyEnabled(UIAction.Social_PrivateChat, false); SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 0); if (m_TeamProxy.GetMember(m_SelectVoUid) != null) { if (m_TeamProxy.GetMember(m_SelectVoUid).IsMute) { SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 3); } else { SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 2); } } } else { SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 0); SetHotKeyDescription(UIAction.Social_Delete_RemoveBlacklist, 0, true); SetHotKeyDescription(UIAction.Team_Kick_Leave, 0, true); SetHotKeyEnabled(UIAction.Social_Delete_RemoveBlacklist, false, true); SetHotKeyEnabled(UIAction.Team_Kick_Leave, false, true); if (m_FriendProxy.GetFriend(m_SelectVoUid) != null) //好友 { SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 0); SetHotKeyEnabled(UIAction.Social_Inspect_AddFriend, false); } else { SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 1); } if (m_FriendProxy.GetBlack(m_SelectVoUid) != null) { SetHotKeyEnabled(UIAction.Social_AddBlacklist, false, true); } } } if (m_TeamProxy.GetMember(m_ServerListProxy.GetCurrentCharacterVO().UId) == null) { SetHotKeyEnabled(UIAction.Social_Delete_RemoveBlacklist, false, true); SetHotKeyEnabled(UIAction.Team_Kick_Leave, false, true); SetHotKeyEnabled(UIAction.Team_Mute_Unmute_MicOn_MicOff, false); SetHotKeyEnabled(UIAction.Social_AddBlacklist, false, true); if (m_SelectVoUid == m_ServerListProxy.GetCurrentCharacterVO().UId) { SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 2); } else { SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 0); } } if (m_SelectVoUid <= 0) { SetHotKeyEnabled(UIAction.Team_Mute_Unmute_MicOn_MicOff, false); } break; case SocialType.Friend: SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 1); State.GetAction(UIAction.Social_Inspect_AddFriend).Visible = false; SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 0); SetHotKeyDescription(UIAction.Social_Delete_RemoveBlacklist, 0, true); SetHotKeyDescription(UIAction.Team_Kick_Leave, 0, true); SetHotKeyDescription(UIAction.Team_Promote, 0); SetHotKeyDescription(UIAction.Team_Invite, 0); if (m_FriendProxy.GetBlack(m_SelectVoUid) != null) { SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 1); SetHotKeyEnabled(UIAction.Social_AddBlacklist, false, true); SetHotKeyDescription(UIAction.Social_Delete_RemoveBlacklist, 1, true); SetHotKeyDescription(UIAction.Team_Kick_Leave, 1, true); SetHotKeyEnabled(UIAction.Social_Inspect_AddFriend, false); } else { SetHotKeyDescription(UIAction.Social_Delete_RemoveBlacklist, 0, true); SetHotKeyDescription(UIAction.Team_Kick_Leave, 0, true); } if (m_FriendProxy.GetFriend(m_SelectVoUid) != null) { SetHotKeyEnabled(UIAction.Social_Inspect_AddFriend, false); if (m_FriendProxy.GetFriend(m_SelectVoUid).Status == FriendInfoVO.FriendState.LEAVE) { SetHotKeyEnabled(UIAction.Social_PrivateChat, false); SetHotKeyEnabled(UIAction.Team_Promote, false); SetHotKeyEnabled(UIAction.Team_Invite, false); } } if (m_TeamProxy.GetMember(m_SelectVoUid) != null) { SetHotKeyEnabled(UIAction.Team_Promote, false); SetHotKeyEnabled(UIAction.Team_Invite, false); } break; case SocialType.Ship: break; case SocialType.Other: SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 1); SetHotKeyDescription(UIAction.Team_Mute_Unmute_MicOn_MicOff, 0); SetHotKeyDescription(UIAction.Social_Delete_RemoveBlacklist, 0, true); SetHotKeyDescription(UIAction.Team_Kick_Leave, 0, true); SetHotKeyDescription(UIAction.Team_Promote, 0); SetHotKeyDescription(UIAction.Team_Invite, 0); SetHotKeyEnabled(UIAction.Social_Delete_RemoveBlacklist, false, true); SetHotKeyEnabled(UIAction.Team_Kick_Leave, false, true); if (m_FriendProxy.GetBlack(m_SelectVoUid) != null) { SetHotKeyEnabled(UIAction.Social_AddBlacklist, false, true); if (m_FriendProxy.GetBlack(m_SelectVoUid).Status == FriendInfoVO.FriendState.LEAVE) { SetHotKeyEnabled(UIAction.Team_Invite, false); } } if (m_FriendProxy.GetFriend(m_SelectVoUid) != null) { SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 0); SetHotKeyEnabled(UIAction.Social_Inspect_AddFriend, false); State.GetAction(UIAction.Social_Inspect_AddFriend).Visible = false; if (m_FriendProxy.GetFriend(m_SelectVoUid).Status == FriendInfoVO.FriendState.LEAVE) { SetHotKeyEnabled(UIAction.Social_PrivateChat, false); SetHotKeyEnabled(UIAction.Team_Promote, false); SetHotKeyEnabled(UIAction.Team_Invite, false); } } else { if (m_FriendProxy.GetRecent(m_SelectVoUid) != null) { if (m_FriendProxy.GetRecent(m_SelectVoUid).Status == FriendInfoVO.FriendState.LEAVE) { State.GetAction(UIAction.Social_Inspect_AddFriend).Visible = false; } } SetHotKeyDescription(UIAction.Social_Inspect_AddFriend, 1); } if (m_TeamProxy.GetMember(m_SelectVoUid) != null) { SetHotKeyEnabled(UIAction.Team_Promote, false); SetHotKeyEnabled(UIAction.Team_Invite, false); } break; default: break; } if (m_SelectVoUid <= 0) { SetHotKeyEnabled(UIAction.Social_AddBlacklist, false, true); SetHotKeyEnabled(UIAction.Social_Delete_RemoveBlacklist, false, true); SetHotKeyEnabled(UIAction.Team_Kick_Leave, false, true); SetHotKeyEnabled(UIAction.Social_Inspect_AddFriend, false); State.GetAction(UIAction.Social_Inspect_AddFriend).Visible = false; SetHotKeyEnabled(UIAction.Social_PrivateChat, false); SetHotKeyEnabled(UIAction.Team_Promote, false); SetHotKeyEnabled(UIAction.Team_Invite, false); } }