yyl
2025-05-27 8331b2adfe9c841a345b6ab0b2ec0ebf31a66f0d
Main/System/Chat/ChatData.cs
@@ -1,21 +1,20 @@
using 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; }