| | |
| | | using System.Collections; |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System.Text; |
| | | using System; |
| | | using LitJson; |
| | | |
| | | public partial class ChatManager : GameSystemManager<ChatManager> |
| | |
| | | return true; |
| | | return false; |
| | | } |
| | | |
| | | // 0-系统 1-日期 2-自己 3-其他玩家 |
| | | public int GetTalkDataType(TalkData talkData) |
| | | { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | public void AddTalkData(ChatChannel type, TalkData data, bool isSendBullet) |
| | | { |
| | | //如果超过限制先删除旧数据 |
| | |
| | | } |
| | | } |
| | | |
| | | if (isSendBullet) |
| | | { |
| | | OnUpdateTalkEvent?.Invoke(type, data, isSendBullet); |
| | | } |
| | | OnUpdateTalkEvent?.Invoke(type, data, isSendBullet); |
| | | } |
| | | |
| | | public Dictionary<ChatChannel, int> currentDayDict = new Dictionary<ChatChannel, int>(); |
| | |
| | | return false; |
| | | } |
| | | |
| | | public void AddSysData(string msg, ArrayList infoList, ChatChannel type, bool isSendBullet) |
| | | public void AddSysData(string msg, ArrayList infoList, ChatChannel type) |
| | | { |
| | | int allSeconds = type == ChatChannel.CrossServer ? TimeUtility.GetCommServerTick(GuildManager.Instance.zoneID) : TimeUtility.AllSeconds; |
| | | // 如果隔天,增加日期行 |
| | | TryAddDate(allSeconds, type, isSendBullet); |
| | | |
| | | TryAddDate(allSeconds, type, false); |
| | | |
| | | if (!talkDict.ContainsKey(type)) |
| | | { |
| | | talkDict[type] = new List<TalkData>(); |
| | | } |
| | | |
| | | AddTalkData(type, new TalkData() |
| | | { |
| | | ChannelType = (byte)type, |
| | |
| | | BubbleBox = 1, |
| | | TalkTime = (uint)allSeconds, |
| | | InfoList = new ArrayList(infoList), |
| | | }, isSendBullet); |
| | | }, false); |
| | | } |
| | | |
| | | public void SendPureBullet(string msg, ArrayList infoList, ChatChannel type = ChatChannel.World) |
| | | { |
| | | TalkData talkData = new TalkData() |
| | | { |
| | | ChannelType = (byte)type, |
| | | isSystem = true, |
| | | Content = msg, |
| | | InfoList = infoList != null ? new ArrayList(infoList) : null |
| | | }; |
| | | |
| | | OnUpdateTalkEvent?.Invoke(type, talkData, true); |
| | | } |
| | | public void UpdateTalk(HB310_tagMCTalk vNetData) |
| | | { |
| | | if (!IsValidChatChannel(vNetData.ChannelType)) |