public void SendWordMessage(string content, int sysType, OpenWhichChat type)//systype (文字 图片 语音) fromType(0 世界 1 公会 2组队等) { if (modulePlayer.BanChat == 2) { moduleGlobal.ShowMessage(630, 0); return; } if (type == OpenWhichChat.WorldChat) { moduleChat.CanChatWord = false; var b = moduleChat.SetWorldSend(content, sysType); if (word_chat_mes.Count > ChatNum) { word_chat_mes.Dequeue(); } word_chat_mes.Enqueue(b); CsChatRoomMessage p = SetWorldSession(content, sysType); Send(p); } else if (type == OpenWhichChat.UnionChat) { var b = moduleChat.SetUnionSend(content, sysType); if (m_unionChat.Count > ChatNum) { word_chat_mes.Dequeue(); } m_unionChat.Enqueue(b); CsChatGroup p = SetUnionSession(content, sysType); Send(p); } }
private CsChatRoomMessage SetWorldSession(string content, int sysType)//systype (文字 图片 语音)世界聊天 { CsChatRoomMessage p = PacketObject.Create <CsChatRoomMessage>(); p.content = content; p.type = (sbyte)sysType; p.tag = ChatTag(); return(p); }