| | |
| | | if (!obj) |
| | | { |
| | | nowChatChannel = ChatChannel.World; |
| | | nowChatTab = ChatTab.World; |
| | | nowChatTab = ChatChannel.World; |
| | | if (talkDict.ContainsKey(ChatChannel.Guild)) |
| | | { |
| | | talkDict[ChatChannel.Guild].Clear(); |
| | |
| | | lastTalkDataDict.Clear(); |
| | | currentDayDict.Clear(); |
| | | nowChatChannel = ChatChannel.World; |
| | | nowChatTab = ChatTab.World; |
| | | nowChatTab = ChatChannel.World; |
| | | } |
| | | |
| | | private void OnBeforePlayerDataInitializeEventOnRelogin() |
| | |
| | | bool isOpen = GetBulletSetting(channelType); |
| | | if (!isOpen) |
| | | continue; |
| | | if (channelType == ChatChannel.Guild && !IsTabOpen(ChatTab.Guild, false)) |
| | | if (channelType == ChatChannel.Guild && !IsTabOpen(ChatChannel.Guild, false)) |
| | | continue; |
| | | if (data == null || talkData.TalkTime > data.TalkTime) |
| | | { |
| | |
| | | } |
| | | #region 标签页 |
| | | // 当前展示的频道入口 |
| | | private ChatTab m_NowChatTab; |
| | | public ChatTab nowChatTab |
| | | private ChatChannel m_NowChatTab; |
| | | public ChatChannel nowChatTab |
| | | { |
| | | get { return m_NowChatTab; } |
| | | set |
| | |
| | | } |
| | | } |
| | | |
| | | public event Action<ChatTab> OnChatTabChangeEvent; |
| | | public event Action<ChatChannel> OnChatTabChangeEvent; |
| | | |
| | | // 频道入口的展示顺序 |
| | | public readonly List<ChatTab> tabShowList = new List<ChatTab>() |
| | | public readonly List<ChatChannel> tabShowList = new List<ChatChannel>() |
| | | { |
| | | ChatTab.World, |
| | | ChatTab.Guild, |
| | | ChatTab.CrossServer, |
| | | ChatChannel.World, |
| | | ChatChannel.Guild, |
| | | ChatChannel.CrossServer, |
| | | // ChatTab.Person, |
| | | // ChatTab.BlackList, |
| | | }; |
| | | |
| | | public bool IsTabOpen(ChatTab chatTab, bool isTip = false) |
| | | public bool IsTabOpen(ChatChannel chatTab, bool isTip = false) |
| | | { |
| | | if (!tabShowList.Contains(chatTab)) |
| | | return false; |
| | | |
| | | switch (chatTab) |
| | | { |
| | | case ChatTab.Guild: |
| | | case ChatChannel.Guild: |
| | | //没有公会 |
| | | if (!PlayerDatas.Instance.fairyData.HasFairy) |
| | | { |
| | |
| | | return false; |
| | | } |
| | | return true; |
| | | case ChatTab.CrossServer: |
| | | case ChatChannel.CrossServer: |
| | | //没有合服 |
| | | if (GuildManager.Instance.zoneID <= 0) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public bool IsSelectChatTab(ChatTab chatTab) |
| | | public bool IsSelectChatTab(ChatChannel chatTab) |
| | | { |
| | | return nowChatTab == chatTab; |
| | | } |
| | | |
| | | public bool IsValidChatTab(int chatTab) |
| | | { |
| | | return Enum.IsDefined(typeof(ChatTab), chatTab); |
| | | return Enum.IsDefined(typeof(ChatChannel), chatTab); |
| | | } |
| | | |
| | | public string GetChatTabName(ChatTab chatTab) |
| | | public string GetChatTabName(ChatChannel chatTab) |
| | | { |
| | | return Language.Get(StringUtility.Concat("ChatTab", ((int)chatTab).ToString())); |
| | | } |
| | | |
| | | public string GetChatTabSelectIcon(ChatTab chatTab, bool isSelect) |
| | | public string GetChatTabSelectIcon(ChatChannel chatTab, bool isSelect) |
| | | { |
| | | return StringUtility.Concat(isSelect ? "ChatTabSelect" : "ChatTabUnSelect", ((int)chatTab).ToString()); |
| | | } |
| | |
| | | |
| | | } |
| | | |
| | | public enum ChatTab |
| | | { |
| | | World = 0, //世界 |
| | | Guild = 1, //公会 |
| | | CrossServer = 2, //跨服 |
| | | Person = 3, //私聊 |
| | | BlackList = 4, //黑名单 |
| | | } |
| | | |
| | | public enum ChatChannel |
| | | { |
| | | World = 0, //世界 |