少年修仙传客户端代码仓库
client_Zxw
2019-01-15 4c6d58af44cd4235501e15a78bf79674ba2fcc4a
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)