From 09bc892c7283df8757a07b646d5af21ddaa263d1 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期四, 06 十一月 2025 18:22:34 +0800
Subject: [PATCH] 164 天子的考验-客户端

---
 Main/System/Chat/ChatData.cs |  142 ++++++++++++++++++++++------------------------
 1 files changed, 68 insertions(+), 74 deletions(-)

diff --git a/Main/System/Chat/ChatData.cs b/Main/System/Chat/ChatData.cs
index ffe5a31..97018fe 100644
--- a/Main/System/Chat/ChatData.cs
+++ b/Main/System/Chat/ChatData.cs
@@ -1,21 +1,20 @@
 锘縰sing System.Text;
 using System.Collections;
-using vnxbqy.UI;
 using System;
 
 public class ChatData
 {
-    // public ChatData(string content)
-    // {
-    //     _content = content;
-    //     if (ChatCenter.s_VoiceRegex.IsMatch(_content))
-    //     {
-    //         _content = ChatCenter.s_VoiceRegex.Replace(_content, string.Empty);
-    //     }
-    //     richText = new StringBuilder();
-    //     richText.Length = 0;
-    //     createTime = DateTime.Now;
-    // }
+    public ChatData(string content)
+    {
+        _content = content;
+        if (ChatCenter.s_VoiceRegex.IsMatch(_content))
+        {
+            _content = ChatCenter.s_VoiceRegex.Replace(_content, string.Empty);
+        }
+        richText = new StringBuilder();
+        richText.Length = 0;
+        createTime = DateTime.Now;
+    }
 
     private string _content = string.Empty;
 
@@ -35,22 +34,22 @@
         }
     }
 
-    // public ChatInfoType type { get; protected set; }
+    public ChatInfoType type { get; protected set; }
 
-    // public DateTime createTime { get; set; }
+    public DateTime createTime { get; set; }
 
-    // private ChatInfoType m_DetailType = ChatInfoType.World;
-    // public ChatInfoType detailType
-    // {
-    //     get
-    //     {
-    //         return m_DetailType;
-    //     }
-    //     set
-    //     {
-    //         m_DetailType = value;
-    //     }
-    // }
+    private ChatInfoType m_DetailType = ChatInfoType.World;
+    public ChatInfoType detailType
+    {
+        get
+        {
+            return m_DetailType;
+        }
+        set
+        {
+            m_DetailType = value;
+        }
+    }
 
     public StringBuilder richText;
 
@@ -59,12 +58,7 @@
 
 public class ChatUeseData : ChatData
 {
-    public ChatUeseData()
-    {
-
-    }
-
-    public ChatUeseData(string _content, int player, string name, string extra)// : base(_content)
+    public ChatUeseData(string _content, int player, string name, string extra) : base(_content)
     {
         this.player = player;
         this.name = name;
@@ -127,10 +121,10 @@
 
 public class ChatSystemData : ChatData
 {
-    // public ChatSystemData(string content) : base(content)
-    // {
-    //     type = ChatInfoType.System;
-    // }
+    public ChatSystemData(string content) : base(content)
+    {
+        type = ChatInfoType.System;
+    }
 }
 
 
@@ -151,72 +145,72 @@
 
 public class ChatWorldData : ChatUeseData
 {
-    // public ChatWorldData(string content, int player, string name, string extra) : base(content, player, name, extra)
-    // {
-    //     type = ChatInfoType.World;
-    // }
+    public ChatWorldData(string content, int player, string name, string extra) : base(content, player, name, extra)
+    {
+        type = ChatInfoType.World;
+    }
 }
 
 public class ChatAreaData : ChatUeseData
 {
-    // public ChatAreaData(string content, int player, string name, string extra) : base(content, player, name, extra)
-    // {
-    //     type = ChatInfoType.Area;
-    // }
+    public ChatAreaData(string content, int player, string name, string extra) : base(content, player, name, extra)
+    {
+        type = ChatInfoType.Area;
+    }
 }
 
 public class ChatCrossServerData : ChatUeseData
 {
-    // public ChatCrossServerData(string content, int player, string name, string extra) : base(content, player, name, extra)
-    // {
-    //     type = ChatInfoType.CrossServer;
-    // }
+    public ChatCrossServerData(string content, int player, string name, string extra) : base(content, player, name, extra)
+    {
+        type = ChatInfoType.CrossServer;
+    }
 }
 
 public class ChatFactionData : ChatUeseData
 {
-    // public ChatFactionData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.default1) : base(content, player, name, extra)
-    // {
-    //     type = ChatInfoType.default1;
-    //     this.detailType = detailType;
-    // }
+    public ChatFactionData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.default1) : base(content, player, name, extra)
+    {
+        type = ChatInfoType.default1;
+        this.detailType = detailType;
+    }
 }
 
 public class ChatTeamData : ChatUeseData
 {
-    // public ChatTeamData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.Team) : base(content, player, name, extra)
-    // {
-    //     type = ChatInfoType.Team;
-    //     this.detailType = detailType;
-    // }
+    public ChatTeamData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.Team) : base(content, player, name, extra)
+    {
+        type = ChatInfoType.Team;
+        this.detailType = detailType;
+    }
 }
 
 public class ChatFamilyData : ChatUeseData
 {
-    // public ChatFamilyData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.Fairy) : base(content, player, name, extra)
-    // {
-    //     type = ChatInfoType.Fairy;
-    //     this.detailType = detailType;
-    // }
+    public ChatFamilyData(string content, int player, string name, string extra, ChatInfoType detailType = ChatInfoType.Fairy) : base(content, player, name, extra)
+    {
+        type = ChatInfoType.Fairy;
+        this.detailType = detailType;
+    }
 }
 
 public class ChatInviteData : ChatUeseData
 {
-    // public ChatInviteData(string content, int player, string name, string extra) : base(content, player, name, extra)
-    // {
-    //     type = ChatInfoType.Invite;
-    // }
+    public ChatInviteData(string content, int player, string name, string extra) : base(content, player, name, extra)
+    {
+        type = ChatInfoType.Invite;
+    }
 }
 
 public class ChatFriendData : ChatUeseData
 {
-    // public ChatFriendData(string content, int player, string name, string extra, string toName, byte talkType, uint toPlayer) : base(content, player, name, extra)
-    // {
-    //     type = ChatInfoType.Friend;
-    //     this.toName = toName;
-    //     this.talkType = talkType;
-    //     this.toPlayer = (int)toPlayer;
-    // }
+    public ChatFriendData(string content, int player, string name, string extra, string toName, byte talkType, uint toPlayer) : base(content, player, name, extra)
+    {
+        type = ChatInfoType.Friend;
+        this.toName = toName;
+        this.talkType = talkType;
+        this.toPlayer = (int)toPlayer;
+    }
 
     public string toName { get; protected set; }
 

--
Gitblit v1.8.0