From c3e180d40c515a046dc0e8421bf910869103b010 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 25 九月 2018 15:48:15 +0800
Subject: [PATCH] 3564 聊天重新加回队伍和仙盟频道

---
 System/Chat/ChatCtrl.cs   |    6 ++++--
 System/Chat/ChatCenter.cs |    7 ++++---
 System/Chat/ChatWin.cs    |    1 +
 System/Chat/ChatTip.cs    |   22 +++-------------------
 4 files changed, 12 insertions(+), 24 deletions(-)

diff --git a/System/Chat/ChatCenter.cs b/System/Chat/ChatCenter.cs
index fb300b6..f619199 100644
--- a/System/Chat/ChatCenter.cs
+++ b/System/Chat/ChatCenter.cs
@@ -49,8 +49,10 @@
             chatChannels.Add(ChatInfoType.System);
             chatChannels.Add(ChatInfoType.World);
             chatChannels.Add(ChatInfoType.Area);
+            chatChannels.Add(ChatInfoType.Team);
             chatChannels.Add(ChatInfoType.Invite);
             chatChannels.Add(ChatInfoType.Trumpet);
+            chatChannels.Add(ChatInfoType.Fairy);
             chatChannels.Add(ChatInfoType.Friend);
         }
 
@@ -768,11 +770,10 @@
                 return;
             }
             openChatAfterCollect = false;
-            if (!WindowCenter.Instance.CheckOpen<SocialWin>())
+            if (!WindowCenter.Instance.CheckOpen<ChatWin>())
             {
                 ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
-                WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
-                WindowCenter.Instance.Open<SocialWin>();
+                WindowCenter.Instance.Open<ChatWin>();
             }
         }
         #endregion
diff --git a/System/Chat/ChatCtrl.cs b/System/Chat/ChatCtrl.cs
index b8eca6c..f71eee7 100644
--- a/System/Chat/ChatCtrl.cs
+++ b/System/Chat/ChatCtrl.cs
@@ -1029,13 +1029,15 @@
         switch (type)
         {
             case ChatInfoType.Team:
-                if (!WindowCenter.Instance.CheckOpen<TeamChatWin>())
+                if (!WindowCenter.Instance.CheckOpen<TeamChatWin>()
+                    && (!WindowCenter.Instance.CheckOpen<ChatWin>() || presentChatType != ChatInfoType.Team))
                 {
                     unReadChatCounts[ChatInfoType.Team] = Mathf.Min(unReadChatCounts[ChatInfoType.Team] + 1, 99);
                 }
                 break;
             case ChatInfoType.Fairy:
-                if (!WindowCenter.Instance.CheckOpen<FairyChatWin>())
+                if (!WindowCenter.Instance.CheckOpen<FairyChatWin>()
+                    && (!WindowCenter.Instance.CheckOpen<ChatWin>() || presentChatType != ChatInfoType.Fairy))
                 {
                     unReadChatCounts[ChatInfoType.Fairy] = Mathf.Min(unReadChatCounts[ChatInfoType.Fairy] + 1, 99);
                 }
diff --git a/System/Chat/ChatTip.cs b/System/Chat/ChatTip.cs
index bfb9a37..0cc5b43 100644
--- a/System/Chat/ChatTip.cs
+++ b/System/Chat/ChatTip.cs
@@ -145,7 +145,7 @@
 
     private void OnChatClick()
     {
-        if (WindowCenter.Instance.CheckOpen<ChatWin>() || WindowCenter.Instance.CheckOpen<SocialWin>())
+        if (WindowCenter.Instance.CheckOpen<ChatWin>())
         {
             return;
         }
@@ -154,9 +154,6 @@
         if (mapId == 31230)
         {
             ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
-            WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
-            WindowCenter.Instance.Open<SocialWin>();
-            return;
         }
         WindowCenter.Instance.Open<ChatWin>();
     }
@@ -214,7 +211,7 @@
 
     void OnChatDataClick(ChatData data)
     {
-        if (WindowCenter.Instance.CheckOpen<ChatWin>() || WindowCenter.Instance.CheckOpen<SocialWin>())
+        if (WindowCenter.Instance.CheckOpen<ChatWin>())
         {
             return;
         }
@@ -224,20 +221,7 @@
         {
             ChatCtrl.Inst.presentChatType = ChatInfoType.Fairy;
         }
-        switch (ChatCtrl.Inst.presentChatType)
-        {
-            case ChatInfoType.Team:
-                WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
-                WindowCenter.Instance.Open<SocialWin>(false, 2);
-                break;
-            case ChatInfoType.Fairy:
-                WindowCenter.Instance.CloseImmediately<MainInterfaceWin>();
-                WindowCenter.Instance.Open<SocialWin>();
-                break;
-            default:
-                WindowCenter.Instance.Open<ChatWin>();
-                break;
-        }
+        WindowCenter.Instance.Open<ChatWin>();
     }
 
     void OnRefreshChatTip(ChatInfoType type)
diff --git a/System/Chat/ChatWin.cs b/System/Chat/ChatWin.cs
index b250bc7..7be4a67 100644
--- a/System/Chat/ChatWin.cs
+++ b/System/Chat/ChatWin.cs
@@ -170,6 +170,7 @@
                     break;
             }
             m_ChatContent.chatType = ChatCtrl.Inst.presentChatType;
+            ChatCtrl.Inst.ViewChat(ChatCtrl.Inst.presentChatType);
         }
 
         private void OnChannelSelect(CellView _cell)

--
Gitblit v1.8.0