summaryrefslogtreecommitdiff
path: root/Client/Assets/Scripts/XMainClient/Chat
diff options
context:
space:
mode:
Diffstat (limited to 'Client/Assets/Scripts/XMainClient/Chat')
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatAssetType.cs10
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatAssetType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatAssistBehaviour.cs39
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatAssistBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatAssistView.cs190
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatAssistView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatChannelType.cs26
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatChannelType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatEmotionBehaviour.cs27
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatEmotionBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatEmotionView.cs184
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatEmotionView.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatFriendData.cs63
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatFriendData.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatFriendItem.cs162
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatFriendItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatGroupBehaviour.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatGroupBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatGroupItem.cs70
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatGroupItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatGroupList.cs252
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatGroupList.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatHistoryItem.cs54
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatHistoryItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatInfo.cs202
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatInputStringBack.cs6
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatInputStringBack.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatInputType.cs10
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatInputType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatItem.cs313
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatItemInfo.cs25
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatItemInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatMemberBehaviour.cs22
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatMemberBehaviour.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatMemberList.cs187
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatMemberList.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatSelectStringBack.cs6
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatSelectStringBack.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs39
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatTextRecognizeInfo.cs23
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatTextRecognizeInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatType.cs12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatType.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatVoiceInfo.cs41
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatVoiceInfo.cs.meta12
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatVoicePrivateInfo.cs13
-rw-r--r--Client/Assets/Scripts/XMainClient/Chat/ChatVoicePrivateInfo.cs.meta12
50 files changed, 2301 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatAssetType.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatAssetType.cs
new file mode 100644
index 00000000..704648c6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatAssetType.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace XMainClient
+{
+ public enum ChatAssetType
+ {
+ EMOTION,
+ HISTOTY
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatAssetType.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatAssetType.cs.meta
new file mode 100644
index 00000000..c9686878
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatAssetType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8f004a9cb82077d46a1af51fd181cbb9
+timeCreated: 1611404132
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatAssistBehaviour.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatAssistBehaviour.cs
new file mode 100644
index 00000000..0491c7f4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatAssistBehaviour.cs
@@ -0,0 +1,39 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class ChatAssistBehaviour : DlgBehaviourBase
+ {
+ public IXUIButton m_btnEmotion;
+
+ public IXUIButton m_btnHistory;
+
+ public GameObject m_objEmotionTpl;
+
+ public XUIPool m_ChatEmotionPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ public IXUISprite m_sprBg;
+
+ public ILoopScrollView m_loophistoryView;
+
+ public GameObject m_objEmotion;
+
+ public GameObject m_objHistory;
+
+ private void Awake()
+ {
+ this.m_btnEmotion = (base.transform.Find("Tabs/SmallTab_emo").GetComponent("XUIButton") as IXUIButton);
+ this.m_btnHistory = (base.transform.Find("Tabs/SmallTab_his").GetComponent("XUIButton") as IXUIButton);
+ this.m_objEmotionTpl = base.transform.Find("ChatEmotion/template").gameObject;
+ this.m_sprBg = (base.transform.Find("Bg").GetComponent("XUISprite") as IXUISprite);
+ this.m_loophistoryView = (base.transform.Find("ChatHistory/loopscroll").GetComponent("LoopScrollView") as ILoopScrollView);
+ this.m_objEmotion = base.transform.Find("ChatEmotion").gameObject;
+ this.m_objHistory = base.transform.Find("ChatHistory").gameObject;
+ this.m_ChatEmotionPool.SetupPool(this.m_objEmotion, this.m_objEmotionTpl, 24u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatAssistBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatAssistBehaviour.cs.meta
new file mode 100644
index 00000000..6df2295b
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatAssistBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8e80e93063b98a84389229231d2b8b5a
+timeCreated: 1611404129
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatAssistView.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatAssistView.cs
new file mode 100644
index 00000000..274b5326
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatAssistView.cs
@@ -0,0 +1,190 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class ChatAssistView : DlgBase<ChatAssistView, ChatAssistBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/ChatAssistDlg";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private ChatInputStringBack m_func = null;
+
+ public ChatAssetType assetType = ChatAssetType.EMOTION;
+
+ private string m_Emotion = "fsbq_";
+
+ private string m_EmotionText = "z";
+
+ private const int CHAT_MAX_EMOTION_NUM = 24;
+
+ protected override void Init()
+ {
+ base.Init();
+ string[] array = new string[]
+ {
+ "z",
+ "g",
+ "f"
+ };
+ this.m_Emotion = "@2x";
+ this.m_EmotionText = array[0];
+ for (int i = 0; i < 24; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_ChatEmotionPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_ChatEmotionPool.TplPos.x + (float)(i % 8 * (base.uiBehaviour.m_ChatEmotionPool.TplWidth + 2)), base.uiBehaviour.m_ChatEmotionPool.TplPos.y - (float)(i / 8 * (base.uiBehaviour.m_ChatEmotionPool.TplHeight + 4)), base.uiBehaviour.m_ChatEmotionPool.TplPos.z);
+ IXUISprite ixuisprite = gameObject.transform.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(string.Format("{0:D3}", i) + this.m_Emotion);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectEmotion));
+ ixuisprite.ID = (ulong)((long)i);
+ }
+ GameObject tpl = base.uiBehaviour.m_loophistoryView.GetTpl();
+ bool flag = tpl != null && tpl.GetComponent<ChatHistoryItem>() == null;
+ if (flag)
+ {
+ tpl.AddComponent<ChatHistoryItem>();
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_btnEmotion.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnEmotionClick));
+ base.uiBehaviour.m_btnHistory.RegisterClickEventHandler(new ButtonClickEventHandler(this.OnHistoryClick));
+ base.uiBehaviour.m_sprBg.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.ClosePanel));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.transform.localPosition = new Vector3(-292f, -84f, 0f);
+ }
+
+ protected override void OnHide()
+ {
+ base.OnHide();
+ }
+
+ public void Close(string str)
+ {
+ bool flag = this.m_func != null;
+ if (flag)
+ {
+ this.m_func(str);
+ }
+ this.SetVisible(false, true);
+ }
+
+ public void Show(ChatInputStringBack func, ChatAssetType type)
+ {
+ this.SetVisible(true, true);
+ this.assetType = type;
+ this.m_func = func;
+ this.Toggle(type);
+ }
+
+ private bool OnEmotionClick(IXUIButton btn)
+ {
+ this.Toggle(ChatAssetType.EMOTION);
+ return true;
+ }
+
+ private bool OnHistoryClick(IXUIButton btn)
+ {
+ this.Toggle(ChatAssetType.HISTOTY);
+ return true;
+ }
+
+ private void Toggle(ChatAssetType type)
+ {
+ base.uiBehaviour.m_objEmotion.SetActive(type == ChatAssetType.EMOTION);
+ base.uiBehaviour.m_objHistory.SetActive(type == ChatAssetType.HISTOTY);
+ this.SetTabActive(base.uiBehaviour.m_btnEmotion.gameObject, type == ChatAssetType.EMOTION);
+ this.SetTabActive(base.uiBehaviour.m_btnHistory.gameObject, type == ChatAssetType.HISTOTY);
+ bool flag = type == ChatAssetType.HISTOTY;
+ if (flag)
+ {
+ this.RefreshHistoryList();
+ }
+ }
+
+ private void SetTabActive(GameObject go, bool active)
+ {
+ GameObject gameObject = go.transform.Find("InActivated").gameObject;
+ GameObject gameObject2 = go.transform.Find("Activated").gameObject;
+ gameObject.SetActive(!active);
+ gameObject2.SetActive(active);
+ }
+
+ private void OnSelectEmotion(IXUISprite sp)
+ {
+ ulong id = sp.ID;
+ string str = "/" + this.m_EmotionText + string.Format("{0:D2}", id);
+ bool flag = this.m_func != null;
+ if (flag)
+ {
+ this.m_func(str);
+ }
+ this.SetVisible(false, true);
+ }
+
+ private void RefreshHistoryList()
+ {
+ XChatDocument specificDocument = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
+ List<string> recentSendmsg = specificDocument.recentSendmsg;
+ List<LoopItemData> list = new List<LoopItemData>();
+ for (int i = recentSendmsg.Count - 1; i >= 0; i--)
+ {
+ RecentMsg recentMsg = new RecentMsg();
+ recentMsg.content = recentSendmsg[i];
+ recentMsg.LoopID = XSingleton<XCommon>.singleton.XHash(recentMsg.content);
+ list.Add(recentMsg);
+ }
+ base.uiBehaviour.m_loophistoryView.Init(list, new DelegateHandler(this.RefreshHistoryItem), null, 0, false);
+ }
+
+ private void RefreshHistoryItem(ILoopItemObject item, LoopItemData data)
+ {
+ RecentMsg recentMsg = data as RecentMsg;
+ bool flag = recentMsg != null;
+ if (flag)
+ {
+ item.GetObj().GetComponent<ChatHistoryItem>().Refresh(recentMsg.content);
+ }
+ else
+ {
+ XSingleton<XDebug>.singleton.AddErrorLog("history info is null", null, null, null, null, null);
+ }
+ }
+
+ private void ClosePanel(IXUISprite spr)
+ {
+ this.SetVisible(false, true);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatAssistView.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatAssistView.cs.meta
new file mode 100644
index 00000000..fc206db1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatAssistView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 99f2a3586916d6548bda9a7a441a97ad
+timeCreated: 1611404198
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatChannelType.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatChannelType.cs
new file mode 100644
index 00000000..1eb8d6be
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatChannelType.cs
@@ -0,0 +1,26 @@
+using System;
+
+namespace XMainClient
+{
+ public enum ChatChannelType
+ {
+ DEFAULT = -9999,
+ RecentContacts = -1,
+ ZeroChannel,
+ World,
+ Guild,
+ Friends,
+ System,
+ LampShort,
+ LampLong,
+ Team,
+ Camp,
+ Spectate,
+ Curr,
+ Partner,
+ Broadcast,
+ Battle,
+ Group,
+ ChannelNum
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatChannelType.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatChannelType.cs.meta
new file mode 100644
index 00000000..e24b52e0
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatChannelType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7acfb5cd268e74d4893007ed9d5b7b9b
+timeCreated: 1611403991
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionBehaviour.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionBehaviour.cs
new file mode 100644
index 00000000..3ee1e84c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionBehaviour.cs
@@ -0,0 +1,27 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class ChatEmotionBehaviour : DlgBehaviourBase
+ {
+ public IXUISprite m_sprEmotion;
+
+ public IXUISprite m_sprP;
+
+ public GameObject m_objEmotionTpl;
+
+ public XUIPool m_ChatEmotionPool = new XUIPool(XSingleton<XGameUI>.singleton.m_uiTool);
+
+ private void Awake()
+ {
+ this.m_sprEmotion = (base.transform.Find("Emotion").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprP = (base.transform.Find("P").GetComponent("XUISprite") as IXUISprite);
+ this.m_objEmotionTpl = base.transform.Find("Emotion/template").gameObject;
+ this.m_ChatEmotionPool.SetupPool(this.m_sprEmotion.gameObject, this.m_objEmotionTpl, 24u, false);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionBehaviour.cs.meta
new file mode 100644
index 00000000..0d01d193
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2e9c86a7733ab674cb3106ae1553ee52
+timeCreated: 1611403510
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionView.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionView.cs
new file mode 100644
index 00000000..0e8942aa
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionView.cs
@@ -0,0 +1,184 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient
+{
+ internal class ChatEmotionView : DlgBase<ChatEmotionView, ChatEmotionBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "Common/ChatEmotion";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ private string m_Emotion = "fsbq_";
+
+ private string m_EmotionText = "z";
+
+ private const int CHAT_MAX_EMOTION_NUM = 24;
+
+ private ChatSelectStringBack _func = null;
+
+ private List<string> emotion = new List<string>();
+
+ protected override void Init()
+ {
+ base.Init();
+ string[] array = new string[]
+ {
+ "z",
+ "g",
+ "f"
+ };
+ this.m_Emotion = "@2x";
+ this.m_EmotionText = array[0];
+ for (int i = 0; i < 24; i++)
+ {
+ GameObject gameObject = base.uiBehaviour.m_ChatEmotionPool.FetchGameObject(false);
+ gameObject.transform.localPosition = new Vector3(base.uiBehaviour.m_ChatEmotionPool.TplPos.x + (float)(i % 6 * base.uiBehaviour.m_ChatEmotionPool.TplWidth), base.uiBehaviour.m_ChatEmotionPool.TplPos.y - (float)(i / 6 * base.uiBehaviour.m_ChatEmotionPool.TplHeight), base.uiBehaviour.m_ChatEmotionPool.TplPos.z);
+ IXUISprite ixuisprite = gameObject.transform.GetComponent("XUISprite") as IXUISprite;
+ ixuisprite.SetSprite(string.Format("{0:D3}", i) + this.m_Emotion);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnSelectEmotion));
+ ixuisprite.ID = (ulong)((long)i);
+ }
+ }
+
+ public override void RegisterEvent()
+ {
+ base.RegisterEvent();
+ base.uiBehaviour.m_sprP.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.CloseEmotion));
+ }
+
+ public void ShowChatEmotion(ChatSelectStringBack func, Vector3 pos, int pivot)
+ {
+ this._func = func;
+ this.SetVisible(true, true);
+ base.uiBehaviour.m_sprEmotion.gameObject.transform.localPosition = pos;
+ this.SetPivot(pivot);
+ }
+
+ public void SetPivot(int pivot)
+ {
+ bool flag = pivot == 0;
+ if (flag)
+ {
+ this.m_uiBehaviour.m_sprEmotion.SetFlipVertical(false);
+ }
+ else
+ {
+ bool flag2 = pivot == 1;
+ if (flag2)
+ {
+ this.m_uiBehaviour.m_sprEmotion.SetFlipHorizontal(true);
+ }
+ else
+ {
+ bool flag3 = pivot == 2;
+ if (flag3)
+ {
+ this.m_uiBehaviour.m_sprEmotion.SetFlipVertical(true);
+ }
+ }
+ }
+ }
+
+ private void CloseEmotion(IXUISprite spr)
+ {
+ this.SetVisible(false, true);
+ }
+
+ public void OnSelectEmotion(IXUISprite sp)
+ {
+ ulong id = sp.ID;
+ string str = "/" + this.m_EmotionText + string.Format("{0:D2}", id);
+ bool flag = this._func != null;
+ if (flag)
+ {
+ this._func(str);
+ }
+ this.CloseEmotion(sp);
+ }
+
+ public string OnParseEmotion(string content)
+ {
+ this.emotion.Clear();
+ for (int i = 0; i < content.Length; i++)
+ {
+ bool flag = content[i] == '/' && i + 4 <= content.Length;
+ if (flag)
+ {
+ string s = content[i + 2].Equals('0') ? content.Substring(i + 3, 1) : content.Substring(i + 2, 2);
+ int num = 0;
+ bool flag2 = int.TryParse(s, out num);
+ if (flag2)
+ {
+ bool flag3 = num < 24;
+ if (flag3)
+ {
+ this.emotion.Add(content.Substring(i, 4));
+ }
+ }
+ }
+ }
+ for (int j = 0; j < this.emotion.Count; j++)
+ {
+ string text = this.emotion[j];
+ bool flag4 = text[1] == 'z' || text[1] == 'g' || text[1] == 'f';
+ if (flag4)
+ {
+ string str = "@2x";
+ string sprite = "0" + text.Substring(2, 2) + str;
+ string newValue = XLabelSymbolHelper.FormatImage("Chat/Chat", sprite);
+ content = content.Replace(text, newValue);
+ }
+ }
+ return content;
+ }
+
+ public string OnRemoveEmotion(string content)
+ {
+ this.emotion.Clear();
+ for (int i = 0; i < content.Length; i++)
+ {
+ bool flag = content[i] == '/' && i + 4 <= content.Length;
+ if (flag)
+ {
+ string s = content[i + 2].Equals('0') ? content.Substring(i + 3, 1) : content.Substring(i + 2, 2);
+ int num = 0;
+ bool flag2 = int.TryParse(s, out num);
+ if (flag2)
+ {
+ bool flag3 = num < 24;
+ if (flag3)
+ {
+ this.emotion.Add(content.Substring(i, 4));
+ }
+ }
+ }
+ }
+ for (int j = 0; j < this.emotion.Count; j++)
+ {
+ string text = this.emotion[j];
+ bool flag4 = text[1] == 'z' || text[1] == 'g' || text[1] == 'f';
+ if (flag4)
+ {
+ content = content.Replace(text, string.Empty);
+ }
+ }
+ return content;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionView.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionView.cs.meta
new file mode 100644
index 00000000..00f3c71e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatEmotionView.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 03dd8446d2f49504783e8353f517f2ac
+timeCreated: 1611402960
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatFriendData.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatFriendData.cs
new file mode 100644
index 00000000..3b055021
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatFriendData.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ public class ChatFriendData : LoopItemData
+ {
+ public uint degreelevel
+ {
+ get
+ {
+ return (this.friendData != null) ? this.friendData.degreeAll : 0u;
+ }
+ }
+
+ public int isOnline
+ {
+ get
+ {
+ return (this.online > 0u) ? 1 : 0;
+ }
+ }
+
+ public XFriendData friendData
+ {
+ get
+ {
+ List<XFriendData> friendData = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.friendData;
+ for (int i = 0; i < friendData.Count; i++)
+ {
+ bool flag = friendData[i].roleid == this.roleid;
+ if (flag)
+ {
+ return friendData[i];
+ }
+ }
+ return null;
+ }
+ }
+
+ public uint viplevel;
+
+ public uint profession;
+
+ public string name;
+
+ public uint powerpoint;
+
+ public ulong roleid;
+
+ public bool isfriend;
+
+ public List<uint> setid = new List<uint>();
+
+ public uint online;
+
+ public DateTime msgtime = DateTime.Today;
+
+ public bool hasOfflineRead = false;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatFriendData.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatFriendData.cs.meta
new file mode 100644
index 00000000..0d3d414a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatFriendData.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 877e6585a31607b4490add7948b2201f
+timeCreated: 1611404079
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatFriendItem.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatFriendItem.cs
new file mode 100644
index 00000000..ccd5ab5d
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatFriendItem.cs
@@ -0,0 +1,162 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ public class ChatFriendItem : MonoBehaviour
+ {
+ private ChatFriendData mFriendData;
+
+ public IXUISprite m_sprRoot;
+
+ public IXUILabel m_lblName;
+
+ public IXUISprite m_sprHead;
+
+ public IXUISprite m_sprFrame;
+
+ public IXUILabelSymbol m_lblMsg;
+
+ public IXUISprite m_sprRelation;
+
+ public IXUISprite m_sprChat;
+
+ public IXUISprite m_sprRedpoint;
+
+ public IXUISprite m_sprHeadColl;
+
+ public IXUISprite m_sprDel;
+
+ private void Awake()
+ {
+ this.m_sprRoot = (base.GetComponent("XUISprite") as IXUISprite);
+ this.m_sprHead = (base.transform.Find("headboard/head").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprFrame = (base.transform.Find("headboard/head/AvatarFrame").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprRedpoint = (base.transform.Find("msg/redpoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblName = (base.transform.Find("info/name").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblMsg = (base.transform.Find("info/lv").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_sprRelation = (base.transform.Find("relation").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprChat = (base.transform.Find("msg").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprHeadColl = (base.transform.Find("headboard").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprDel = (base.transform.Find("Del").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprChat.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChatClick));
+ }
+
+ public void Refresh(ChatFriendData data)
+ {
+ this.mFriendData = data;
+ this.m_lblName.SetText(data.name);
+ string text = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)data.profession);
+ bool flag = text == "";
+ if (flag)
+ {
+ text = "TXicon_01";
+ }
+ this.m_sprHead.SetSprite(text);
+ this.m_sprRelation.SetVisible(this.mFriendData.isfriend);
+ this.m_sprRelation.SetSprite(this.GetRelation());
+ this.m_lblMsg.InputText = this.GetRecentChatInfo(data.roleid);
+ this.m_sprRedpoint.SetVisible(DlgBase<XChatView, XChatBehaviour>.singleton.HasRedpointMsg(data.roleid));
+ this.m_sprHeadColl.ID = data.roleid;
+ this.m_sprHeadColl.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickFriendHead));
+ this.m_sprDel.ID = data.roleid;
+ this.m_sprDel.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnDeleteChat));
+ XSingleton<UiUtility>.singleton.ParseHeadIcon(data.setid, this.m_sprFrame);
+ }
+
+ private string GetRecentChatInfo(ulong roleid)
+ {
+ XChatDocument specificDocument = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
+ List<ChatInfo> friendChatInfoList = specificDocument.GetFriendChatInfoList(roleid);
+ bool flag = friendChatInfoList == null || friendChatInfoList.Count <= 0;
+ string result;
+ if (flag)
+ {
+ result = string.Empty;
+ }
+ else
+ {
+ string mContent = friendChatInfoList[friendChatInfoList.Count - 1].mContent;
+ string text = DlgBase<ChatEmotionView, ChatEmotionBehaviour>.singleton.OnParseEmotion(mContent);
+ int num = text.IndexOf("im=Chat");
+ bool flag2 = num > -1 && num < 12;
+ int num2 = 21;
+ int num3 = flag2 ? 30 : 12;
+ bool flag3 = flag2;
+ if (flag3)
+ {
+ bool flag4 = text.Length > num3 && text.Length > num + num2;
+ if (flag4)
+ {
+ text = text.Substring(0, num + num2) + "...";
+ }
+ }
+ else
+ {
+ bool flag5 = text.Length >= num3 - 3;
+ if (flag5)
+ {
+ text = text.Substring(0, num3 - 3) + "...";
+ }
+ }
+ result = text;
+ }
+ return result;
+ }
+
+ private string GetRelation()
+ {
+ bool isfriend = this.mFriendData.isfriend;
+ string result;
+ if (isfriend)
+ {
+ result = "tag_friend";
+ }
+ else
+ {
+ result = "tag_guild";
+ }
+ return result;
+ }
+
+ private void OnChatClick(IXUISprite spr)
+ {
+ spr.ID = this.mFriendData.roleid;
+ bool flag = DlgBase<XChatView, XChatBehaviour>.singleton.HasRedpointMsg(spr.ID);
+ bool flag2 = flag;
+ if (flag2)
+ {
+ PtcC2M_OpenPrivateChatNtf ptcC2M_OpenPrivateChatNtf = new PtcC2M_OpenPrivateChatNtf();
+ ptcC2M_OpenPrivateChatNtf.Data.roleid = spr.ID;
+ XSingleton<XClientNetwork>.singleton.Send(ptcC2M_OpenPrivateChatNtf);
+ }
+ DlgBase<XChatView, XChatBehaviour>.singleton.JumpToChats(spr);
+ }
+
+ private void OnDeleteChat(IXUISprite spr)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.OnSendClearFriend(spr.ID);
+ }
+
+ private void OnClickFriendHead(IXUISprite sp)
+ {
+ bool flag = XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall;
+ if (flag)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.ChatFriendId = this.mFriendData.roleid;
+ XChatDocument specificDocument = XDocuments.GetSpecificDocument<XChatDocument>(XChatDocument.uuID);
+ ChatFriendData chatFriendData = specificDocument.FindFriendData(sp.ID);
+ bool flag2 = chatFriendData != null;
+ if (flag2)
+ {
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(chatFriendData.roleid, false);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatFriendItem.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatFriendItem.cs.meta
new file mode 100644
index 00000000..0b086049
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatFriendItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 861adafd562a3e54cbf215d318091506
+timeCreated: 1611404053
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatGroupBehaviour.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupBehaviour.cs
new file mode 100644
index 00000000..264d27e8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupBehaviour.cs
@@ -0,0 +1,25 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient
+{
+ internal class ChatGroupBehaviour : DlgBehaviourBase
+ {
+ public IXUISprite m_sprClose;
+
+ public IXUIWrapContent m_wrap;
+
+ public IXUICheckBox m_add;
+
+ public IXUICheckBox m_rm;
+
+ private void Awake()
+ {
+ this.m_wrap = (base.transform.Find("Bg/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_sprClose = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ this.m_add = (base.transform.Find("Bg/tabs/tab1/template/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ this.m_rm = (base.transform.Find("Bg/tabs/tab2/template/Bg").GetComponent("XUICheckBox") as IXUICheckBox);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatGroupBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupBehaviour.cs.meta
new file mode 100644
index 00000000..38a44bf7
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 64211f0e363b7404281bc1b3f7c7e19a
+timeCreated: 1611403846
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatGroupItem.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupItem.cs
new file mode 100644
index 00000000..6fb8dd82
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupItem.cs
@@ -0,0 +1,70 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient
+{
+ public class ChatGroupItem : MonoBehaviour
+ {
+ private CBrifGroupInfo data;
+
+ public IXUILabel m_lblName;
+
+ public IXUILabel m_lblCnt;
+
+ public IXUILabel m_lblDate;
+
+ public IXUILabel m_lblRoleName;
+
+ public IXUILabelSymbol m_lblChat;
+
+ public IXUISprite m_sprRedpoint;
+
+ public IXUISprite m_sprRoot;
+
+ private void Awake()
+ {
+ this.m_lblName = (base.transform.Find("info/name").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblCnt = (base.transform.Find("info/cnt").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblDate = (base.transform.Find("info/time").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblRoleName = (base.transform.Find("info/role").GetComponent("XUILabel") as IXUILabel);
+ this.m_lblChat = (base.transform.Find("info/chat").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_sprRedpoint = (base.transform.Find("redpoint").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprRoot = (base.transform.GetComponent("XUISprite") as IXUISprite);
+ }
+
+ public void Refresh(CBrifGroupInfo d)
+ {
+ this.data = d;
+ this.m_lblName.SetText(d.name);
+ DateTime msgtime = d.msgtime;
+ TimeSpan timeSpan = DateTime.Now - msgtime;
+ string text = string.Format("{0:D2}:{1:D2}:{2:D2}", msgtime.Hour, msgtime.Minute, msgtime.Second);
+ bool flag = timeSpan.Days > 0;
+ if (flag)
+ {
+ text = XStringDefineProxy.GetString("CHAT_DAY", new object[]
+ {
+ timeSpan.Days
+ });
+ }
+ this.m_lblDate.SetText(text);
+ this.m_lblCnt.SetText(XStringDefineProxy.GetString("CHAT_GROUP_MEMBER", new object[]
+ {
+ d.memberCnt.ToString()
+ }));
+ this.m_lblRoleName.SetText(d.rolename);
+ this.m_lblChat.InputText = DlgBase<ChatEmotionView, ChatEmotionBehaviour>.singleton.OnParseEmotion(d.chat);
+ this.m_sprRedpoint.SetVisible(false);
+ this.m_sprRoot.ID = this.data.id;
+ this.m_sprRoot.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnItemClick));
+ }
+
+ public void OnItemClick(IXUISprite spr)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.ChatGroupId = spr.ID;
+ DlgBase<XChatView, XChatBehaviour>.singleton.JumpToGroupChat(spr);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatGroupItem.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupItem.cs.meta
new file mode 100644
index 00000000..b5654d80
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d6dee1f8d07259540b07e187f5725790
+timeCreated: 1611404633
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatGroupList.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupList.cs
new file mode 100644
index 00000000..fd21b2a5
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupList.cs
@@ -0,0 +1,252 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class ChatGroupList : DlgBase<ChatGroupList, ChatGroupBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/ChatGroupList";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ public ChatGroupList.State state = ChatGroupList.State.Add;
+
+ private List<CGroupPlayerInfo> players;
+
+ public enum State
+ {
+ Add,
+ Rm
+ }
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_wrap.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ base.uiBehaviour.m_sprClose.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClick));
+ base.uiBehaviour.m_add.ID = 1UL;
+ base.uiBehaviour.m_add.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabSelectionChanged));
+ base.uiBehaviour.m_rm.ID = 2UL;
+ base.uiBehaviour.m_rm.RegisterOnCheckEventHandler(new CheckBoxOnCheckEventHandler(this.OnTabSelectionChanged));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ GroupChatDocument specificDocument = XDocuments.GetSpecificDocument<GroupChatDocument>(GroupChatDocument.uuID);
+ specificDocument.ReqGetGroupInfo(DlgBase<XChatView, XChatBehaviour>.singleton.ChatGroupId);
+ }
+
+ protected override void OnHide()
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.OnFocus();
+ base.OnHide();
+ }
+
+ public void SetCB()
+ {
+ this.state = ChatGroupList.State.Add;
+ base.uiBehaviour.m_add.ForceSetFlag(true);
+ this.Refresh();
+ }
+
+ public void Refresh()
+ {
+ GroupChatDocument specificDocument = XDocuments.GetSpecificDocument<GroupChatDocument>(GroupChatDocument.uuID);
+ bool flag = specificDocument.players != null;
+ if (flag)
+ {
+ CGroupPlayerInfo[] array = new CGroupPlayerInfo[specificDocument.players.Count];
+ specificDocument.players.CopyTo(array);
+ this.SelectByState(array);
+ base.uiBehaviour.m_wrap.SetContentCount(this.players.Count, false);
+ }
+ }
+
+ private bool OnTabSelectionChanged(IXUICheckBox ckb)
+ {
+ bool bChecked = ckb.bChecked;
+ if (bChecked)
+ {
+ ulong id = ckb.ID;
+ bool flag = id == 1UL;
+ if (flag)
+ {
+ this.state = ChatGroupList.State.Add;
+ }
+ else
+ {
+ this.state = ChatGroupList.State.Rm;
+ }
+ this.Refresh();
+ }
+ return true;
+ }
+
+ private void SelectByState(CGroupPlayerInfo[] pp)
+ {
+ bool flag = this.players == null;
+ if (flag)
+ {
+ this.players = new List<CGroupPlayerInfo>();
+ }
+ else
+ {
+ this.players.Clear();
+ }
+ int i = 0;
+ int num = pp.Length;
+ while (i < num)
+ {
+ bool flag2 = this.state == ChatGroupList.State.Add;
+ if (flag2)
+ {
+ bool flag3 = pp[i].degree >= 0;
+ if (flag3)
+ {
+ this.players.Add(pp[i]);
+ }
+ }
+ else
+ {
+ bool flag4 = pp[i].degree < 0;
+ if (flag4)
+ {
+ bool flag5 = pp[i].roleid != XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag5)
+ {
+ this.players.Add(pp[i]);
+ }
+ }
+ }
+ i++;
+ }
+ bool flag6 = this.state == ChatGroupList.State.Add;
+ if (flag6)
+ {
+ this.players.Sort(new Comparison<CGroupPlayerInfo>(this.Sort));
+ }
+ }
+
+ private int Sort(CGroupPlayerInfo x, CGroupPlayerInfo y)
+ {
+ return y.degree - x.degree;
+ }
+
+ private void OnCloseClick(IXUISprite spr)
+ {
+ this.SetVisible(false, true);
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this.players == null || this.players[index] == null;
+ if (!flag)
+ {
+ IXUISprite ixuisprite = t.Find("head").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("level").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("UID").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("PPT").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUISprite ixuisprite2 = t.Find("agree").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel4 = t.Find("agree/T").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel5 = t.Find("guild").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite3 = t.Find("ProfIcon").GetComponent("XUISprite") as IXUISprite;
+ int profession = (int)this.players[index].profession;
+ ixuisprite3.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(profession);
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2(profession);
+ string text = (this.state == ChatGroupList.State.Add) ? XStringDefineProxy.GetString("CHAT_GROUP_PUSH") : XStringDefineProxy.GetString("CHAT_GROUP_TICKOUT");
+ ixuilabel4.SetText(text);
+ ixuisprite2.ID = this.players[index].roleid;
+ string text2 = this.players[index].guild;
+ bool flag2 = string.IsNullOrEmpty(text2);
+ if (flag2)
+ {
+ text2 = XStringDefineProxy.GetString("NONE");
+ }
+ ixuilabel5.SetText(text2);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OpItemClick));
+ ixuilabel.SetText(this.players[index].level.ToString());
+ ixuilabel3.SetText(this.players[index].ppt.ToString());
+ ixuilabelSymbol.InputText = this.players[index].rolename;
+ ixuilabel2.SetText(this.players[index].uid.ToString());
+ }
+ }
+
+ private void OpItemClick(IXUISprite spr)
+ {
+ GroupChatDocument specificDocument = XDocuments.GetSpecificDocument<GroupChatDocument>(GroupChatDocument.uuID);
+ CGroupPlayerInfo cgroupPlayerInfo = null;
+ bool flag = false;
+ for (int i = 0; i < this.players.Count; i++)
+ {
+ bool flag2 = this.players[i].roleid == spr.ID;
+ if (flag2)
+ {
+ cgroupPlayerInfo = this.players[i];
+ }
+ }
+ List<ulong> list = new List<ulong>();
+ List<ulong> list2 = new List<ulong>();
+ bool flag3 = cgroupPlayerInfo.degree == -1;
+ if (flag3)
+ {
+ CBrifGroupInfo currGroup = specificDocument.currGroup;
+ bool flag4 = currGroup != null && currGroup.leaderid == cgroupPlayerInfo.roleid;
+ if (flag4)
+ {
+ flag = true;
+ }
+ else
+ {
+ list2.Add(cgroupPlayerInfo.roleid);
+ }
+ }
+ else
+ {
+ list.Add(cgroupPlayerInfo.roleid);
+ }
+ bool flag5 = flag;
+ if (flag5)
+ {
+ DlgBase<XChatView, XChatBehaviour>.singleton.OnGroupQuitClick(null);
+ }
+ else
+ {
+ bool flag6 = DlgBase<XChatView, XChatBehaviour>.singleton.ChatGroupId > 0UL;
+ if (flag6)
+ {
+ specificDocument.ReqChangePlayer(DlgBase<XChatView, XChatBehaviour>.singleton.ChatGroupId, list, list2);
+ }
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatGroupList.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupList.cs.meta
new file mode 100644
index 00000000..63609a4e
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatGroupList.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 44391885d0da67a48b1189456206827e
+timeCreated: 1611403644
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatHistoryItem.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatHistoryItem.cs
new file mode 100644
index 00000000..5239de76
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatHistoryItem.cs
@@ -0,0 +1,54 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient
+{
+ public class ChatHistoryItem : MonoBehaviour
+ {
+ private const int LENGTH = 60;
+
+ private IXUILabelSymbol m_symbol;
+
+ private string mStr;
+
+ private void Awake()
+ {
+ this.m_symbol = (base.transform.Find("Content").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ }
+
+ public void Refresh(string chat)
+ {
+ this.mStr = chat;
+ string text = DlgBase<ChatEmotionView, ChatEmotionBehaviour>.singleton.OnParseEmotion(chat);
+ int num = text.IndexOf("im=Chat");
+ bool flag = num > -1 && num < 12;
+ int num2 = 21;
+ int num3 = flag ? 30 : 12;
+ bool flag2 = flag;
+ if (flag2)
+ {
+ bool flag3 = text.Length > num3 && text.Length > num + num2;
+ if (flag3)
+ {
+ text = text.Substring(0, num + num2) + "...";
+ }
+ }
+ else
+ {
+ bool flag4 = text.Length >= num3 - 3;
+ if (flag4)
+ {
+ text = text.Substring(0, num3 - 3) + "...";
+ }
+ }
+ this.m_symbol.InputText = text;
+ }
+
+ public void OnClick()
+ {
+ DlgBase<ChatAssistView, ChatAssistBehaviour>.singleton.Close(this.mStr);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatHistoryItem.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatHistoryItem.cs.meta
new file mode 100644
index 00000000..10e281ef
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatHistoryItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5221d119cb3eec140ab0cee648a9194a
+timeCreated: 1611403708
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatInfo.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatInfo.cs
new file mode 100644
index 00000000..fb3d20ff
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatInfo.cs
@@ -0,0 +1,202 @@
+using System;
+using KKSG;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ public class ChatInfo : LoopItemData
+ {
+ public bool isAudioChat
+ {
+ get
+ {
+ return this.mAudioId > 0UL;
+ }
+ }
+
+ public string AudioUrl
+ {
+ get
+ {
+ bool flag = this.url == "";
+ if (flag)
+ {
+ string[] array = this.mContent.Split(new char[]
+ {
+ '#'
+ });
+ bool flag2 = array.Length >= 5;
+ if (flag2)
+ {
+ this.url = array[2];
+ this.time = array[3];
+ this.tag = int.Parse(array[4]);
+ }
+ else
+ {
+ this.url = "";
+ this.time = "0";
+ this.tag = 0;
+ }
+ }
+ return this.url;
+ }
+ }
+
+ public int AudioIntTime
+ {
+ get
+ {
+ return (int)this.mAudioTime;
+ }
+ }
+
+ private int tag
+ {
+ get
+ {
+ return this._tag;
+ }
+ set
+ {
+ bool flag = value > 0;
+ if (flag)
+ {
+ this._tag = value;
+ }
+ }
+ }
+
+ public bool isAutoPlaying = false;
+
+ public float autoStartPlayTime = 0f;
+
+ public int id;
+
+ public ChatChannelType mChannelId;
+
+ public ulong mSenderId;
+
+ public int mSenderTeamId = 0;
+
+ public bool isFriend = false;
+
+ public bool isSelfSender;
+
+ public string mSenderName;
+
+ public string mContent;
+
+ public ulong mReceiverId = 0UL;
+
+ public string mReceiverName = "test";
+
+ public bool mRegression = false;
+
+ public uint CampDuelID = 0u;
+
+ public ChatType mChatType;
+
+ public GameObject mUIObject;
+
+ public uint mSenderVip;
+
+ public uint mSenderPaymemberid;
+
+ public uint mReceiverVip = 1u;
+
+ public uint mServerProfession;
+
+ public uint mRecieverProfession = 1u;
+
+ public uint mSenderPowerPoint;
+
+ public uint mReciverPowerPoint = 100u;
+
+ public bool isAudioPlayed = false;
+
+ public bool isUIShowed = false;
+
+ public DateTime mTime = DateTime.Now;
+
+ public ulong mAudioId = 0UL;
+
+ public uint mAudioTime = 0u;
+
+ public uint mHeroID = 0u;
+
+ public GroupChatTeamInfo group;
+
+ public uint mCoverDesignationID;
+
+ public string mSpecialDesignation;
+
+ public uint militaryRank;
+
+ public PayConsume payConsume;
+
+ public ChatVoiceInfo voice = null;
+
+ private string url = "";
+
+ private string time = "";
+
+ private int _tag = 0;
+
+ public byte[] AudioData;
+
+ public bool isPlayOver()
+ {
+ bool flag = this.autoStartPlayTime == 0f;
+ bool result;
+ if (flag)
+ {
+ result = false;
+ }
+ else
+ {
+ bool flag2 = Time.realtimeSinceStartup - this.autoStartPlayTime > (float)this.AudioIntTime;
+ result = flag2;
+ }
+ return result;
+ }
+
+ public ChatVoiceInfo GetVoice(ulong audid, uint aulen)
+ {
+ bool flag = audid <= 0UL;
+ ChatVoiceInfo result;
+ if (flag)
+ {
+ result = null;
+ }
+ else
+ {
+ result = new ChatVoiceInfo
+ {
+ voiceTime = (int)aulen,
+ txt = this.mContent
+ };
+ }
+ return result;
+ }
+
+ public string GetChannelName()
+ {
+ return "";
+ }
+
+ public void SetAudioText(string text)
+ {
+ this.mContent = text;
+ bool flag = DlgBase<XChatView, XChatBehaviour>.singleton.activeChannelType != this.mChannelId;
+ if (!flag)
+ {
+ IXUILabelSymbol ixuilabelSymbol = this.mUIObject.transform.Find("voice/content").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ ixuilabelSymbol.InputText = text;
+ }
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatInfo.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatInfo.cs.meta
new file mode 100644
index 00000000..e0211e0c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4982b846729a08542809b74f283b1c1a
+timeCreated: 1611403661
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatInputStringBack.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatInputStringBack.cs
new file mode 100644
index 00000000..dcf99ef1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatInputStringBack.cs
@@ -0,0 +1,6 @@
+using System;
+
+namespace XMainClient
+{
+ public delegate void ChatInputStringBack(string str);
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatInputStringBack.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatInputStringBack.cs.meta
new file mode 100644
index 00000000..db220103
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatInputStringBack.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c0bba2eaf717f0248b57b0a9da40999a
+timeCreated: 1611404487
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatInputType.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatInputType.cs
new file mode 100644
index 00000000..cdc076ac
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatInputType.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace XMainClient
+{
+ public enum ChatInputType
+ {
+ TEXT,
+ EMOTION
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatInputType.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatInputType.cs.meta
new file mode 100644
index 00000000..742bea14
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatInputType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cff442447e76af3409e3b1f01ba9257a
+timeCreated: 1611404583
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatItem.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatItem.cs
new file mode 100644
index 00000000..d8194d1c
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatItem.cs
@@ -0,0 +1,313 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ public class ChatItem : MonoBehaviour
+ {
+ private ChatInfo mChatInfo;
+
+ private int boardHeight = 144;
+
+ private IXUISprite m_sprHead;
+
+ private IXUISprite m_sprHost;
+
+ private IXUISprite m_sprFrame;
+
+ private IXUILabel m_lblTime;
+
+ private IXUILabelSymbol m_symContent;
+
+ private IXUILabel m_lblContent;
+
+ private IXUISprite m_sprBoard;
+
+ private GameObject m_objName;
+
+ private IXUILabelSymbol m_lblName;
+
+ private GameObject m_objVoice;
+
+ private IXUISprite m_sprRoot;
+
+ private Transform m_offset;
+
+ private IXUISprite m_regression;
+
+ private IXUISprite m_campDuel;
+
+ private void Awake()
+ {
+ this.m_sprHead = (base.transform.Find("head").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprHost = (base.transform.Find("head/hoster").GetComponent("XUISprite") as IXUISprite);
+ this.m_regression = (base.transform.Find("head/Regression").GetComponent("XUISprite") as IXUISprite);
+ this.m_sprFrame = (base.transform.Find("head/AvatarFrame").GetComponent("XUISprite") as IXUISprite);
+ this.m_campDuel = (base.transform.Find("head/CampDuel").GetComponent("XUISprite") as IXUISprite);
+ this.m_lblTime = (base.transform.Find("board/offset/time").GetComponent("XUILabel") as IXUILabel);
+ this.m_symContent = (base.transform.Find("board/offset/content").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_lblContent = (this.m_symContent.gameObject.GetComponent("XUILabel") as IXUILabel);
+ this.m_sprBoard = (base.transform.Find("board").GetComponent("XUISprite") as IXUISprite);
+ this.m_objName = base.transform.Find("board/offset/name").gameObject;
+ this.m_lblName = (base.transform.Find("board/offset/selfname").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_objVoice = base.transform.Find("board/offset/voice").gameObject;
+ this.m_sprRoot = (base.GetComponent("XUISprite") as IXUISprite);
+ this.m_offset = base.transform.Find("board/offset");
+ this.m_sprHead.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnClickChatHead));
+ }
+
+ public void Refresh(ChatInfo info)
+ {
+ bool flag = this.mChatInfo == info || this.m_lblTime == null;
+ if (!flag)
+ {
+ this.mChatInfo = info;
+ this.mChatInfo.id = (info.id = DlgBase<XChatView, XChatBehaviour>.singleton.ChatIdIndex);
+ this.mChatInfo.isUIShowed = (info.isUIShowed = true);
+ DateTime mTime = info.mTime;
+ TimeSpan timeSpan = DateTime.Now - mTime;
+ string text = string.Format("{0:D2}:{1:D2}:{2:D2}", mTime.Hour, mTime.Minute, mTime.Second);
+ bool flag2 = timeSpan.Days > 0;
+ if (flag2)
+ {
+ text = XStringDefineProxy.GetString("CHAT_DAY", new object[]
+ {
+ timeSpan.Days
+ });
+ }
+ bool flag3 = this.m_lblTime != null;
+ if (flag3)
+ {
+ this.m_lblTime.SetText(text);
+ }
+ IXUILabelSymbol ixuilabelSymbol = this.m_objName.GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ string text2 = XSingleton<UiUtility>.singleton.GetChatDesignation(info.mCoverDesignationID, info.mSpecialDesignation, info.mSenderName);
+ text2 = XSingleton<XCommon>.singleton.StringCombine(text2, XWelfareDocument.GetMemberPrivilegeIconString(info.mSenderPaymemberid));
+ ixuilabelSymbol.InputText = XMilitaryRankDocument.GetMilitaryRankWithFormat(info.militaryRank, text2, false);
+ this.m_regression.SetVisible(info.mRegression);
+ this.m_campDuel.SetVisible(info.CampDuelID > 0u);
+ bool flag4 = info.CampDuelID == 1u;
+ if (flag4)
+ {
+ this.m_campDuel.SetSprite(XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelChatLeftIcon"));
+ }
+ bool flag5 = info.CampDuelID == 2u;
+ if (flag5)
+ {
+ this.m_campDuel.SetSprite(XSingleton<XGlobalConfig>.singleton.GetValue("CampDuelChatRightIcon"));
+ }
+ bool isSelfSender = info.isSelfSender;
+ if (isSelfSender)
+ {
+ this.m_sprHead.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)XSingleton<XEntityMgr>.singleton.Player.PlayerAttributes.Profession));
+ bool flag6 = info.payConsume != null && info.payConsume.setid != null;
+ if (flag6)
+ {
+ XSingleton<UiUtility>.singleton.ParseHeadIcon(info.payConsume.setid, this.m_sprFrame);
+ }
+ else
+ {
+ this.m_sprFrame.SetVisible(false);
+ }
+ }
+ else
+ {
+ bool flag7 = info.mSenderId == 0UL && info.mChannelId == ChatChannelType.Guild;
+ if (flag7)
+ {
+ this.m_sprHead.SetSprite("zy_0_0");
+ this.m_sprFrame.SetVisible(false);
+ }
+ else
+ {
+ bool flag8 = info.mSenderId == 0UL && info.mChannelId == ChatChannelType.Team;
+ if (flag8)
+ {
+ this.m_sprHead.SetSprite("zy_0_1");
+ this.m_sprFrame.SetVisible(false);
+ }
+ else
+ {
+ this.m_sprHead.SetSprite(XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2((int)info.mServerProfession));
+ bool flag9 = info.payConsume != null && info.payConsume.setid != null;
+ if (flag9)
+ {
+ XSingleton<UiUtility>.singleton.ParseHeadIcon(info.payConsume.setid, this.m_sprFrame);
+ }
+ else
+ {
+ this.m_sprFrame.SetVisible(false);
+ }
+ }
+ }
+ }
+ bool flag10 = !info.isSelfSender && (info.mChannelId == ChatChannelType.Guild || info.mChannelId == ChatChannelType.World || info.mChannelId == ChatChannelType.Team);
+ bool flag11 = flag10;
+ if (flag11)
+ {
+ IXUILabelSymbol ixuilabelSymbol2 = this.m_objName.GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ string text3 = XSingleton<UiUtility>.singleton.GetChatDesignation(info.mCoverDesignationID, info.mSpecialDesignation, info.mSenderName);
+ text3 = XSingleton<XCommon>.singleton.StringCombine(text3, XWelfareDocument.GetMemberPrivilegeIconString(info.mSenderPaymemberid));
+ ixuilabelSymbol2.InputText = XMilitaryRankDocument.GetMilitaryRankWithFormat(info.militaryRank, text3, false);
+ }
+ else
+ {
+ bool flag12 = this.m_lblName != null;
+ if (flag12)
+ {
+ bool flag13 = info.mSenderId == 0UL && info.mChannelId == ChatChannelType.Guild;
+ if (flag13)
+ {
+ this.m_lblName.InputText = XStringDefineProxy.GetString("CHAT_GUILD_NEW");
+ }
+ else
+ {
+ bool flag14 = info.mChatType == ChatType.OtherText || info.mChatType == ChatType.OtherVoice;
+ if (flag14)
+ {
+ this.m_lblName.InputText = ((info.mChannelId == ChatChannelType.Friends) ? XStringDefineProxy.GetString("CHAT_FRIENDS2", new object[]
+ {
+ info.mReceiverName
+ }) : info.mSenderName);
+ }
+ else
+ {
+ string text4 = XSingleton<XCommon>.singleton.StringCombine(XSingleton<XAttributeMgr>.singleton.XPlayerData.Name, XWelfareDocument.GetMemberPrivilegeIconString(info.mSenderPaymemberid));
+ text4 = XMilitaryRankDocument.GetMilitaryRankWithFormat(info.militaryRank, text4, false);
+ this.m_lblName.InputText = ((info.mChannelId == ChatChannelType.Friends) ? XStringDefineProxy.GetString("CHAT_FRIENDS1", new object[]
+ {
+ info.mReceiverName
+ }) : text4);
+ }
+ }
+ }
+ }
+ this.m_objVoice.SetActive(info.isAudioChat);
+ bool isAudioChat = info.isAudioChat;
+ if (isAudioChat)
+ {
+ this.InitAudioUI();
+ }
+ else
+ {
+ this.InitTextUI();
+ }
+ float num = (float)(info.isAudioChat ? -16 : 30);
+ float num2 = (float)(info.isSelfSender ? 14 : 24);
+ this.m_lblContent.gameObject.transform.localPosition = new Vector3(num2, num, 0f);
+ this.SetPivot();
+ XChatView singleton = DlgBase<XChatView, XChatBehaviour>.singleton;
+ int chatIdIndex = singleton.ChatIdIndex;
+ singleton.ChatIdIndex = chatIdIndex + 1;
+ XRadioDocument specificDocument = XDocuments.GetSpecificDocument<XRadioDocument>(XRadioDocument.uuID);
+ this.m_sprHost.SetVisible(specificDocument.hostIDs.Contains(this.mChatInfo.mSenderId) && this.mChatInfo.mChannelId == ChatChannelType.Broadcast);
+ }
+ }
+
+ private void SetPivot()
+ {
+ this.m_sprBoard.SetFlipHorizontal(this.mChatInfo.isSelfSender);
+ float num = (float)(this.mChatInfo.isSelfSender ? -215 : -145);
+ this.m_sprBoard.gameObject.transform.localPosition = new Vector3(num, -30f, 0f);
+ this.m_objName.SetActive(!this.mChatInfo.isSelfSender);
+ this.m_lblName.SetVisible(this.mChatInfo.isSelfSender);
+ num = (float)(this.mChatInfo.isSelfSender ? 175 : -180);
+ float num2 = this.m_offset.transform.localPosition.y + this.m_sprBoard.gameObject.transform.localPosition.y;
+ float num3 = this.m_lblTime.gameObject.transform.localPosition.y + num2 + 4f;
+ this.m_sprHead.gameObject.transform.localPosition = new Vector3(num, num3, 0f);
+ }
+
+ private void InitAudioUI()
+ {
+ this.mChatInfo.mUIObject = this.m_objVoice;
+ IXUISprite ixuisprite = this.m_objVoice.transform.Find("board").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite2 = this.m_objVoice.transform.Find("redpoint").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = this.m_objVoice.transform.Find("time").GetComponent("XUILabel") as IXUILabel;
+ IXUIButton ixuibutton = this.m_objVoice.transform.Find("sendFlower").GetComponent("XUIButton") as IXUIButton;
+ ixuibutton.ID = (ulong)((long)this.mChatInfo.id);
+ ixuibutton.RegisterClickEventHandler(new ButtonClickEventHandler(DlgBase<XChatView, XChatBehaviour>.singleton.UIOP.OnSendFlowerClicked));
+ ixuibutton.SetVisible(!this.mChatInfo.isSelfSender && !DlgBase<SpectateSceneView, SpectateSceneBehaviour>.singleton.IsLoaded());
+ ixuilabel.SetText((this.mChatInfo.mAudioTime / 1000u + 1u).ToString() + "\"");
+ string mContent = this.mChatInfo.mContent;
+ this.m_symContent.InputText = ChatItem.ParsePayComsume(this.mChatInfo, mContent, false);
+ ixuisprite.ID = (ulong)((long)this.mChatInfo.id);
+ ixuisprite.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(DlgBase<XChatView, XChatBehaviour>.singleton.UIOP.OnStartPlayAudio));
+ ixuisprite2.SetVisible(!this.mChatInfo.isUIShowed);
+ this.m_sprBoard.spriteHeight = 56 + this.m_lblContent.spriteHeight;
+ this.m_sprRoot.spriteHeight = this.m_sprBoard.spriteHeight + 40;
+ this.m_offset.transform.localPosition = new Vector3(0f, (float)((this.m_sprBoard.spriteHeight - this.boardHeight) / 2 + 30), 0f);
+ IXUISpriteAnimation ixuispriteAnimation = this.m_objVoice.transform.Find("sign").GetComponent("XUISpriteAnimation") as IXUISpriteAnimation;
+ ixuispriteAnimation.SetFrameRate(0);
+ }
+
+ private void InitTextUI()
+ {
+ this.mChatInfo.mContent = DlgBase<ChatEmotionView, ChatEmotionBehaviour>.singleton.OnParseEmotion(this.mChatInfo.mContent);
+ XLabelSymbolHelper.RegisterHyperLinkClicks(this.m_symContent);
+ string mContent = this.mChatInfo.mContent;
+ this.m_symContent.InputText = ChatItem.ParsePayComsume(this.mChatInfo, mContent, false);
+ this.m_sprBoard.spriteHeight = ((this.mChatInfo.mChannelId != ChatChannelType.System) ? (20 + this.m_lblContent.spriteHeight) : (10 + this.m_lblContent.spriteHeight));
+ this.m_sprRoot.spriteHeight = ((this.mChatInfo.mChannelId != ChatChannelType.System) ? (60 + this.m_lblContent.spriteHeight) : (10 + this.m_lblContent.spriteHeight));
+ this.m_offset.transform.localPosition = new Vector3(0f, (float)((this.m_sprBoard.spriteHeight - this.boardHeight) / 2 + 30), 0f);
+ }
+
+ private void OnClickChatHead(IXUISprite sp)
+ {
+ bool flag = !this.mChatInfo.isSelfSender && this.mChatInfo.mSenderId != 0UL && XSingleton<XGame>.singleton.CurrentStage.Stage == EXStage.Hall;
+ if (flag)
+ {
+ bool flag2 = this.mChatInfo.mChannelId == ChatChannelType.Broadcast;
+ if (!flag2)
+ {
+ XCharacterCommonMenuDocument.ReqCharacterMenuInfo(this.mChatInfo.mSenderId, false);
+ }
+ }
+ }
+
+ public static string ParsePayComsume(ChatInfo info, string txt, bool ismini)
+ {
+ bool flag = info != null && info.payConsume != null;
+ if (flag)
+ {
+ string text = string.Empty;
+ string text2 = string.Empty;
+ string text3 = XPrerogativeDocument.ConvertTypeToPreContent(PrerogativeType.PreStart, info.payConsume.setid);
+ string[] array = text3.Split(new char[]
+ {
+ '='
+ });
+ bool flag2 = !string.IsNullOrEmpty(text3);
+ if (flag2)
+ {
+ text = array[0];
+ bool flag3 = ismini && array.Length > 1;
+ if (flag3)
+ {
+ text = array[1];
+ }
+ }
+ text2 = XPrerogativeDocument.ConvertTypeToPreContent(PrerogativeType.PreChatAdorn, info.payConsume.setid);
+ bool flag4 = !string.IsNullOrEmpty(text2);
+ if (flag4)
+ {
+ text2 = XLabelSymbolHelper.FormatImage("Chat/Chat", text2);
+ }
+ bool flag5 = !string.IsNullOrEmpty(text2);
+ if (flag5)
+ {
+ txt = text2 + txt + text2;
+ }
+ bool flag6 = !string.IsNullOrEmpty(text);
+ if (flag6)
+ {
+ txt = string.Format("[c][{0}]{1}[/c]", text, DlgBase<ChatEmotionView, ChatEmotionBehaviour>.singleton.OnParseEmotion(txt));
+ }
+ }
+ return txt;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatItem.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatItem.cs.meta
new file mode 100644
index 00000000..45d7b482
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b9740d4624daa644e81b9c07c976fcec
+timeCreated: 1611404410
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatItemInfo.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatItemInfo.cs
new file mode 100644
index 00000000..9aef7cc9
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatItemInfo.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace XMainClient
+{
+ public class ChatItemInfo
+ {
+ public string itemInfoStr = "";
+
+ public byte[] speakData;
+
+ public string speakUrl;
+
+ public bool isVoiceLocalPath = false;
+
+ public bool isLeft = false;
+
+ public int cachedPlayerID;
+
+ public string cachedPlayerName;
+
+ public int cachedTeamId;
+
+ public bool cachedIsFriend = false;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatItemInfo.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatItemInfo.cs.meta
new file mode 100644
index 00000000..ca46ba2f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatItemInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4b274201de87961469eb704db86ee902
+timeCreated: 1611403685
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatMemberBehaviour.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatMemberBehaviour.cs
new file mode 100644
index 00000000..f9f25246
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatMemberBehaviour.cs
@@ -0,0 +1,22 @@
+using System;
+using UILib;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient
+{
+ internal class ChatMemberBehaviour : DlgBehaviourBase
+ {
+ public IXUISprite m_sprClose;
+
+ public IXUIWrapContent m_wrap;
+
+ public IXUIScrollView m_scroll;
+
+ private void Awake()
+ {
+ this.m_scroll = (base.transform.Find("Bg/ScrollView").GetComponent("XUIScrollView") as IXUIScrollView);
+ this.m_wrap = (base.transform.Find("Bg/ScrollView/WrapContent").GetComponent("XUIWrapContent") as IXUIWrapContent);
+ this.m_sprClose = (base.transform.Find("Bg/Close").GetComponent("XUISprite") as IXUISprite);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatMemberBehaviour.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatMemberBehaviour.cs.meta
new file mode 100644
index 00000000..49ea14f6
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatMemberBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d56276e2fbc28604baec3e16da40685d
+timeCreated: 1611404627
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatMemberList.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatMemberList.cs
new file mode 100644
index 00000000..0cc9c80a
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatMemberList.cs
@@ -0,0 +1,187 @@
+using System;
+using System.Collections.Generic;
+using UILib;
+using UnityEngine;
+using XMainClient.UI;
+using XMainClient.UI.UICommon;
+using XUtliPoolLib;
+
+namespace XMainClient
+{
+ internal class ChatMemberList : DlgBase<ChatMemberList, ChatMemberBehaviour>
+ {
+ public override string fileName
+ {
+ get
+ {
+ return "GameSystem/ChatMemberList";
+ }
+ }
+
+ public override bool autoload
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+ public override bool isHideChat
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ private List<CGroupPlayerInfo> players;
+
+ protected override void Init()
+ {
+ base.Init();
+ }
+
+ public override void RegisterEvent()
+ {
+ base.uiBehaviour.m_wrap.RegisterItemUpdateEventHandler(new WrapItemUpdateEventHandler(this.WrapContentItemUpdated));
+ base.uiBehaviour.m_sprClose.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnCloseClick));
+ }
+
+ protected override void OnShow()
+ {
+ base.OnShow();
+ base.uiBehaviour.m_scroll.ResetPosition();
+ GroupChatDocument specificDocument = XDocuments.GetSpecificDocument<GroupChatDocument>(GroupChatDocument.uuID);
+ specificDocument.ReqGetGroupInfo(DlgBase<XChatView, XChatBehaviour>.singleton.ChatGroupId);
+ }
+
+ public void Refresh()
+ {
+ GroupChatDocument specificDocument = XDocuments.GetSpecificDocument<GroupChatDocument>(GroupChatDocument.uuID);
+ bool flag = specificDocument.players != null;
+ if (flag)
+ {
+ CGroupPlayerInfo[] array = new CGroupPlayerInfo[specificDocument.players.Count];
+ specificDocument.players.CopyTo(array);
+ this.SelectByState(array);
+ base.uiBehaviour.m_wrap.SetContentCount(this.players.Count, false);
+ }
+ }
+
+ private void SelectByState(CGroupPlayerInfo[] pp)
+ {
+ bool flag = this.players == null;
+ if (flag)
+ {
+ this.players = new List<CGroupPlayerInfo>();
+ }
+ else
+ {
+ this.players.Clear();
+ }
+ int i = 0;
+ int num = pp.Length;
+ while (i < num)
+ {
+ bool flag2 = pp[i].degree < 0;
+ if (flag2)
+ {
+ bool flag3 = pp[i].roleid != XSingleton<XAttributeMgr>.singleton.XPlayerData.RoleID;
+ if (flag3)
+ {
+ this.players.Add(pp[i]);
+ }
+ }
+ i++;
+ }
+ }
+
+ private void OnCloseClick(IXUISprite spr)
+ {
+ this.SetVisible(false, true);
+ }
+
+ private void WrapContentItemUpdated(Transform t, int index)
+ {
+ bool flag = this.players == null || this.players[index] == null;
+ if (!flag)
+ {
+ IXUISprite ixuisprite = t.Find("head").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel = t.Find("level").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel2 = t.Find("UID").GetComponent("XUILabel") as IXUILabel;
+ IXUILabel ixuilabel3 = t.Find("PPT").GetComponent("XUILabel") as IXUILabel;
+ IXUILabelSymbol ixuilabelSymbol = t.Find("name").GetComponent("XUILabelSymbol") as IXUILabelSymbol;
+ IXUISprite ixuisprite2 = t.Find("Btn_chat").GetComponent("XUISprite") as IXUISprite;
+ IXUISprite ixuisprite3 = t.Find("add").GetComponent("XUISprite") as IXUISprite;
+ IXUILabel ixuilabel4 = t.Find("guild").GetComponent("XUILabel") as IXUILabel;
+ IXUISprite ixuisprite4 = t.Find("ProfIcon").GetComponent("XUISprite") as IXUISprite;
+ int profession = (int)this.players[index].profession;
+ ixuisprite4.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfIcon(profession);
+ ixuisprite.spriteName = XSingleton<XProfessionSkillMgr>.singleton.GetProfHeadIcon2(profession);
+ ixuisprite2.ID = this.players[index].roleid;
+ ixuisprite3.ID = this.players[index].roleid;
+ string text = this.players[index].guild;
+ bool flag2 = string.IsNullOrEmpty(text);
+ if (flag2)
+ {
+ text = XStringDefineProxy.GetString("NONE");
+ }
+ ixuilabel4.SetText(text);
+ ixuisprite2.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnChatClick));
+ ixuisprite3.RegisterSpriteClickEventHandler(new SpriteClickEventHandler(this.OnFriendClick));
+ bool flag3 = DlgBase<XFriendsView, XFriendsBehaviour>.singleton.IsMyFriend(this.players[index].roleid);
+ ixuisprite3.SetVisible(!flag3);
+ ixuilabel.SetText(this.players[index].level.ToString());
+ ixuilabel3.SetText(this.players[index].ppt.ToString());
+ ixuilabelSymbol.InputText = this.players[index].rolename;
+ ixuilabel2.SetText(this.players[index].uid.ToString());
+ }
+ }
+
+ private void OnChatClick(IXUISprite spr)
+ {
+ this.SetVisible(false, true);
+ bool flag = !XSingleton<XGameSysMgr>.singleton.IsSystemOpened(XSysDefine.XSys_Friends);
+ if (flag)
+ {
+ int sysid = XFastEnumIntEqualityComparer<XSysDefine>.ToInt(XSysDefine.XSys_Friends);
+ int sysOpenLevel = XSingleton<XGameSysMgr>.singleton.GetSysOpenLevel(sysid);
+ XSingleton<UiUtility>.singleton.ShowSystemTip(XStringDefineProxy.GetString("EXPEDITION_REQUIRED_LEVEL", new object[]
+ {
+ sysOpenLevel
+ }) + XSingleton<XGameSysMgr>.singleton.GetSysName(sysid), "fece00");
+ }
+ else
+ {
+ CGroupPlayerInfo player = this.GetPlayer(spr.ID);
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.SetPlayerInfo(spr.ID, player.rolename, player.setid, player.ppt, player.profession);
+ DlgBase<XOtherPlayerInfoView, XOtherPlayerInfoBehaviour>.singleton.PrivateChat(null);
+ }
+ }
+
+ private void OnFriendClick(IXUISprite spr)
+ {
+ ulong id = spr.ID;
+ DlgBase<XFriendsView, XFriendsBehaviour>.singleton.AddFriendById(id);
+ }
+
+ private CGroupPlayerInfo GetPlayer(ulong roleid)
+ {
+ bool flag = this.players != null;
+ if (flag)
+ {
+ foreach (CGroupPlayerInfo cgroupPlayerInfo in this.players)
+ {
+ bool flag2 = cgroupPlayerInfo.roleid == roleid;
+ if (flag2)
+ {
+ //List<CGroupPlayerInfo>.Enumerator enumerator;
+ //return enumerator.Current;
+ return cgroupPlayerInfo;
+ }
+ }
+ }
+ return null;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatMemberList.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatMemberList.cs.meta
new file mode 100644
index 00000000..ceaf1c5f
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatMemberList.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3ba1e7043316171408606cdd0631452f
+timeCreated: 1611403599
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatSelectStringBack.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatSelectStringBack.cs
new file mode 100644
index 00000000..9d0b7004
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatSelectStringBack.cs
@@ -0,0 +1,6 @@
+using System;
+
+namespace XMainClient
+{
+ public delegate void ChatSelectStringBack(string str);
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatSelectStringBack.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatSelectStringBack.cs.meta
new file mode 100644
index 00000000..64a6fbc1
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatSelectStringBack.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 49dff112ca31b5b4e9d36044262af0ce
+timeCreated: 1611403662
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs
new file mode 100644
index 00000000..ae0a72d3
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs
@@ -0,0 +1,39 @@
+using System;
+using UILib;
+using UnityEngine;
+using XMainClient.UI.UICommon;
+
+namespace XMainClient
+{
+ public class ChatSystemItem : MonoBehaviour
+ {
+ private IXUILabelSymbol m_symContent;
+
+ private ChatInfo mChatInfo;
+
+ private IXUISprite m_sprRoot;
+
+ private IXUILabel m_lblContent;
+
+ private Transform m_transTitle;
+
+ private void Awake()
+ {
+ this.m_sprRoot = (base.GetComponent("XUISprite") as IXUISprite);
+ this.m_transTitle = base.transform.Find("title");
+ this.m_symContent = (base.transform.Find("title/content").GetComponent("XUILabelSymbol") as IXUILabelSymbol);
+ this.m_lblContent = (this.m_symContent.gameObject.GetComponent("XUILabel") as IXUILabel);
+ }
+
+ public void Refresh(ChatInfo info)
+ {
+ this.mChatInfo = info;
+ this.m_symContent.InputText = DlgBase<ChatEmotionView, ChatEmotionBehaviour>.singleton.OnParseEmotion(info.mContent);
+ XLabelSymbolHelper.RegisterHyperLinkClicks(this.m_symContent);
+ this.m_sprRoot.spriteHeight = 56 + this.m_lblContent.spriteHeight;
+ int spriteHeight = this.m_sprRoot.spriteHeight;
+ float num = (float)spriteHeight / 2f - 23f;
+ this.m_transTitle.localPosition = new Vector3(-180f, num, 0f);
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs.meta
new file mode 100644
index 00000000..5db9f6ad
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatSystemItem.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 837dcc1c0b0d6f445a37c4b1b2ad0aa3
+timeCreated: 1611404044
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatTextRecognizeInfo.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatTextRecognizeInfo.cs
new file mode 100644
index 00000000..444281b8
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatTextRecognizeInfo.cs
@@ -0,0 +1,23 @@
+using System;
+
+namespace XMainClient
+{
+ public class ChatTextRecognizeInfo
+ {
+ public ChatInfo chatInfo;
+
+ public ChatItemInfo chatItemInfo;
+
+ public ChatTextRecognizeInfo(ChatInfo chatInfo, ChatItemInfo chatItemInfo)
+ {
+ this.chatInfo = chatInfo;
+ this.chatItemInfo = chatItemInfo;
+ }
+
+ public void Clear()
+ {
+ this.chatInfo = null;
+ this.chatItemInfo = null;
+ }
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatTextRecognizeInfo.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatTextRecognizeInfo.cs.meta
new file mode 100644
index 00000000..87121956
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatTextRecognizeInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 47553c1445f03ea4bb8e8c8b3f50c8e4
+timeCreated: 1611403653
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatType.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatType.cs
new file mode 100644
index 00000000..bab7f6be
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatType.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace XMainClient
+{
+ public enum ChatType
+ {
+ SelfText = 1,
+ SelfVoice,
+ OtherText,
+ OtherVoice
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatType.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatType.cs.meta
new file mode 100644
index 00000000..35ed98e2
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatType.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 78eb8585616754f4daab1b3e84942f3c
+timeCreated: 1611403983
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatVoiceInfo.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatVoiceInfo.cs
new file mode 100644
index 00000000..d38167c4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatVoiceInfo.cs
@@ -0,0 +1,41 @@
+using System;
+
+namespace XMainClient
+{
+ public class ChatVoiceInfo
+ {
+ public ulong sendIndexId;
+
+ public int sendUserId;
+
+ public string sendName;
+
+ public string sendProf;
+
+ public string filePath;
+
+ public string url;
+
+ public int voiceTime;
+
+ public ChatChannelType channel;
+
+ public string wildCard;
+
+ public bool isLocalPath;
+
+ public int type;
+
+ public string txt;
+
+ public bool isPlayed;
+
+ public bool isTextRecognize;
+
+ public ulong acceptIndexId;
+
+ public int acceptUserId;
+
+ public string acceptName;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatVoiceInfo.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatVoiceInfo.cs.meta
new file mode 100644
index 00000000..f4fe73d4
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatVoiceInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e04ba00f90c91424aab95d4ca49d6fd8
+timeCreated: 1611404697
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatVoicePrivateInfo.cs b/Client/Assets/Scripts/XMainClient/Chat/ChatVoicePrivateInfo.cs
new file mode 100644
index 00000000..0bc8a994
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatVoicePrivateInfo.cs
@@ -0,0 +1,13 @@
+using System;
+
+namespace XMainClient
+{
+ public class ChatVoicePrivateInfo
+ {
+ public ChatVoiceInfo voice;
+
+ public string name;
+
+ public ulong sendId;
+ }
+}
diff --git a/Client/Assets/Scripts/XMainClient/Chat/ChatVoicePrivateInfo.cs.meta b/Client/Assets/Scripts/XMainClient/Chat/ChatVoicePrivateInfo.cs.meta
new file mode 100644
index 00000000..0fa5f134
--- /dev/null
+++ b/Client/Assets/Scripts/XMainClient/Chat/ChatVoicePrivateInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 827aa142882cac447bf3c476f58eadfb
+timeCreated: 1611404040
+licenseType: Free
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: