少年修仙传客户端代码仓库
5743 【前端】【1.5】本地聊天记录仅保留48小时内的消息,聊天面板去除vip具体等级显示,只显示vip
7个文件已修改
38 ■■■■ 已修改文件
System/Chat/ChatCenter.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatMineVoiceCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatOtherVoiceCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatPlayerMineCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatPlayerOtherCell.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatTip.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/LocalChatHistory.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Chat/ChatCenter.cs
@@ -79,6 +79,10 @@
            if (config != null)
            {
                LocalChatHistory.localSaveCount = int.Parse(config.Numerical1);
                if (!string.IsNullOrEmpty(config.Numerical2))
                {
                    LocalChatHistory.localChatKeepHour = int.Parse(config.Numerical2);
                }
            }
        }
System/Chat/ChatMineVoiceCell.cs
@@ -40,7 +40,7 @@
            m_ChatTime.text = _data.createTime.ToString("yyyy-MM-dd HH:mm");
            if (_data.vipLv > 0)
            {
                m_VipLevel.text = string.Format("V{0}", _data.vipLv);
                m_VipLevel.text = "Vip";//string.Format("V{0}", _data.vipLv);
            }
            else
            {
System/Chat/ChatOtherVoiceCell.cs
@@ -45,7 +45,7 @@
            m_ChatTime.text = _data.createTime.ToString("yyyy-MM-dd HH:mm");
            if (_data.vipLv > 0)
            {
                m_VipLevel.text = string.Format("V{0}", _data.vipLv);
                m_VipLevel.text = "Vip";//string.Format("V{0}", _data.vipLv);
            }
            else
            {
System/Chat/ChatPlayerMineCell.cs
@@ -45,7 +45,7 @@
            m_ChatTime.text = data.createTime.ToString("yyyy-MM-dd HH:mm");
            if (chatUserData.vipLv > 0)
            {
                m_VipLv.text = string.Format("V{0}", chatUserData.vipLv);
                m_VipLv.text = "Vip";//string.Format("V{0}", chatUserData.vipLv);
            }
            else
            {
System/Chat/ChatPlayerOtherCell.cs
@@ -43,7 +43,7 @@
            m_ChatTime.text = data.createTime.ToString("yyyy-MM-dd HH:mm");
            if (chatUserData.vipLv > 0)
            {
                m_VipLv.text = string.Format("V{0}", chatUserData.vipLv);
                m_VipLv.text = "Vip";//string.Format("V{0}", chatUserData.vipLv);
            }
            else
            {
System/Chat/ChatTip.cs
@@ -273,7 +273,7 @@
                    chatName = chatUserData.name;
                    if (chatUserData.vipLv > 0)
                    {
                        vipLv = StringUtility.Contact("V", chatUserData.vipLv);
                        vipLv = "Vip";//StringUtility.Contact("V", chatUserData.vipLv);
                    }
                    break;
                }
@@ -283,7 +283,7 @@
                    chatName = chatUserData.name;
                    if (chatUserData.vipLv > 0)
                    {
                        vipLv = StringUtility.Contact("V", chatUserData.vipLv);
                        vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
                    }
                    break;
                }
@@ -293,7 +293,7 @@
                    chatName = chatUserData.name;
                    if (chatUserData.vipLv > 0)
                    {
                        vipLv = StringUtility.Contact("V", chatUserData.vipLv);
                        vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
                    }
                    break;
                }
@@ -303,7 +303,7 @@
                    chatName = chatUserData.name;
                    if (chatUserData.vipLv > 0)
                    {
                        vipLv = StringUtility.Contact("V", chatUserData.vipLv);
                        vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
                    }
                    break;
                }
@@ -313,7 +313,7 @@
                    chatName = chatUserData.name;
                    if (chatUserData.vipLv > 0)
                    {
                        vipLv = StringUtility.Contact("V", chatUserData.vipLv);
                        vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
                    }
                    break;
                }
System/Chat/LocalChatHistory.cs
@@ -15,6 +15,7 @@
        const string fileName = "ChatHistory";
        public static int localSaveCount = 50;
        public static int localChatKeepHour = 48;
        static StringBuilder sb = new StringBuilder();
@@ -202,6 +203,11 @@
                                case ChatInfoType.Fairy:
                                    {
                                        LocalChat localChat = LitJson.JsonMapper.ToObject<LocalChat>(line);
                                        var ts = DateTime.Now - localChat.time;
                                        if (ts.TotalHours >= localChatKeepHour)
                                        {
                                            continue;
                                        }
                                        if (type == ChatInfoType.World)
                                        {
                                            chat = new ChatWorldData(localChat.content, localChat.player, localChat.name, localChat.extra);
@@ -224,6 +230,11 @@
                                case ChatInfoType.Trumpet:
                                    {
                                        LocalTrumpetChat localChat = LitJson.JsonMapper.ToObject<LocalTrumpetChat>(line);
                                        var ts = DateTime.Now - localChat.time;
                                        if (ts.TotalHours >= localChatKeepHour)
                                        {
                                            continue;
                                        }
                                        chat = new ChatTrumpetData(localChat.content, localChat.player, localChat.name,
                                            localChat.extra, localChat.speakType, localChat.accId);
                                        chat.createTime = localChat.time;
@@ -232,6 +243,11 @@
                                case ChatInfoType.Friend:
                                    {
                                        LocalFriendChat localChat = LitJson.JsonMapper.ToObject<LocalFriendChat>(line);
                                        var ts = DateTime.Now - localChat.time;
                                        if (ts.TotalHours >= localChatKeepHour)
                                        {
                                            continue;
                                        }
                                        chat = new ChatFriendData(localChat.content, localChat.player, localChat.name,
                                            localChat.extra, localChat.toName, localChat.talkType, (uint)localChat.toPlayer);
                                        chat.createTime = localChat.time;