private static void NewChatMessage(Packet p) { ushort msglen = p.ReadUShort(); int color = (int)p.ReadUInt(); string message = p.ReadASCII(msglen); string username = p.ReadASCII(p.ReadByte()); UserObject user = RenderObjectsManager.GetUser(username); ChatManager.Add(username, message); user.UpdateLifeTime(); UOClientManager.SysMessage("[Chat][" + username + "]: " + message, 83); }
private static void ChatMessageResponse(Packet p) { if (p.ReadBool()) { if (_messagesQueue.Count < 1) { return; } lock (_messagesQueue) { string msg = _messagesQueue.Dequeue(); if (!string.IsNullOrEmpty(msg)) { UOClientManager.SysMessage("[Chat][" + Global.PlayerInstance.Name + "]: " + msg, 83); ChatManager.Add(Global.PlayerInstance.Name, msg); } } } }