From e37f7e2c018abc3ce93dc793d2379befb20bb330 Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期二, 15 一月 2019 16:19:53 +0800
Subject: [PATCH] 5725【1.5】跨服聊天
---
System/Chat/ChatCenter.cs | 52 ++++++++++++++--------------------------------------
1 files changed, 14 insertions(+), 38 deletions(-)
diff --git a/System/Chat/ChatCenter.cs b/System/Chat/ChatCenter.cs
index 6a12ace..5393b3d 100644
--- a/System/Chat/ChatCenter.cs
+++ b/System/Chat/ChatCenter.cs
@@ -59,6 +59,7 @@
chatChannels = new List<ChatInfoType>();
chatChannels.Add(ChatInfoType.System);
chatChannels.Add(ChatInfoType.World);
+ chatChannels.Add(ChatInfoType.CrossServer);
chatChannels.Add(ChatInfoType.Area);
chatChannels.Add(ChatInfoType.Team);
chatChannels.Add(ChatInfoType.Invite);
@@ -327,7 +328,7 @@
}
if (_chat.chatType != ChatInfoType.World && _chat.chatType != ChatInfoType.Area
&& _chat.chatType != ChatInfoType.Fairy && _chat.chatType != ChatInfoType.Friend
- && _chat.chatType != ChatInfoType.Team)
+ && _chat.chatType != ChatInfoType.Team && _chat.chatType != ChatInfoType.CrossServer)
{
m_VoiceChatDict.Remove(_instance);
return;
@@ -573,42 +574,6 @@
public string voiceID;
public string playerID;
public string content;
- }
-
- byte GetPakChannelType(ChatInfoType _type)
- {
- switch (_type)
- {
- case ChatInfoType.World:
- return 1;
- case ChatInfoType.Area:
- return 5;
- case ChatInfoType.Team:
- return 4;
- case ChatInfoType.Fairy:
- return 2;
- case ChatInfoType.Friend:
- return 3;
- }
- return 1;
- }
-
- ChatInfoType GetPakChannelType(byte _type)
- {
- switch (_type)
- {
- case 5:
- return ChatInfoType.Area;
- case 1:
- return ChatInfoType.World;
- case 2:
- return ChatInfoType.Fairy;
- case 3:
- return ChatInfoType.Friend;
- case 4:
- return ChatInfoType.Team;
- }
- return ChatInfoType.World;
}
private void OnNetStatusChanged(NetworkReachability _state)
@@ -920,7 +885,9 @@
var vipLevel = PlayerDatas.Instance.baseData.VIPLv;
var job = PlayerDatas.Instance.baseData.Job;
var bubbleId = PlayerDatas.Instance.baseData.bubbleId;
- return StringUtility.Contact(vipLevel.ToString().PadLeft(2, '0'), 0, job, bubbleId.ToString().PadLeft(2, '0'));
+ var serverGroupId = PlayerDatas.Instance.baseData.ServerGroupId;
+ return StringUtility.Contact(vipLevel.ToString().PadLeft(2, '0'), 0, job,
+ bubbleId.ToString().PadLeft(2, '0'), serverGroupId.ToString().PadLeft(7, '0'));
}
public void HandleChatBanned(ChatInfoType channel, string message, int toPlayer)
@@ -949,6 +916,15 @@
SrcName = playerName,
});
break;
+ case ChatInfoType.CrossServer:
+ ChatCtrl.Inst.RevChatInfo(new H0208_tagTalkCountry()
+ {
+ Content = message,
+ Extras = SetChatExtra(),
+ PlayerID = playerId,
+ Name = playerName,
+ });
+ break;
case ChatInfoType.Team:
ChatCtrl.Inst.RevChatInfo(new H0205_tagTalkDui()
{
--
Gitblit v1.8.0