少年修仙传客户端代码仓库
client_linchunjie
2019-01-11 16cda7bbd7574cd9c4c94fa1dc97d639f51ca0cd
5725 【1.5】跨服聊天界面不显示组队,队伍频道
1个文件已修改
22 ■■■■■ 已修改文件
System/Chat/ChatWin.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatWin.cs
@@ -45,6 +45,11 @@
        protected override void OnPreOpen()
        {
            if (!IsSatisfyShowChannel(ChatCtrl.Inst.presentChatType))
            {
                ChatCtrl.Inst.presentChatType = ChatInfoType.System;
            }
            m_ChatSend.parent = this;
            ChatCtrl.Inst.lockUpdate = false;
            ChatCtrl.Inst.OnPteChatChangeEvent += OnPteChatChangeEvent;
@@ -97,7 +102,10 @@
                m_ChannelControl.Refresh();
                for (int i = 0; i < chatCenter.chatChannels.Count; i++)
                {
                    m_ChannelControl.AddCell(ScrollerDataType.Normal, (int)chatCenter.chatChannels[i], OnChannelSelect);
                    if (IsSatisfyShowChannel(chatCenter.chatChannels[i]))
                    {
                        m_ChannelControl.AddCell(ScrollerDataType.Normal, (int)chatCenter.chatChannels[i], OnChannelSelect);
                    }
                }
                m_ChannelControl.Restart();
            }
@@ -107,6 +115,18 @@
            }
        }
        private bool IsSatisfyShowChannel(ChatInfoType channel)
        {
            if (CrossServerUtility.IsCrossServer())
            {
                if (channel == ChatInfoType.Team || channel == ChatInfoType.Invite)
                {
                    return false;
                }
            }
            return true;
        }
        private void OnPteChatChangeEvent()
        {
            if (ChatCtrl.Inst.presentChatType == ChatInfoType.Friend)