public void postChat(MessageChannel channel, string content) { // 向服务器请求的代码 if (channel == MessageChannel.ChannelPrivate || channel == MessageChannel.ChannelWorld || channel == MessageChannel.ChannelGuild) { Protocol.C2SChatMessageReq chatRequest = new Protocol.C2SChatMessageReq(); chatRequest.chat_type = (int)channel; if (channel == MessageChannel.ChannelPrivate) { chatRequest.chat_target_guid = 439715978; // > Debug } chatRequest.chat_content = Encoding.UTF8.GetBytes(content); NetworkEvent.sendPacket <Protocol.C2SChatMessageReq>(chatRequest); } else { writeLine(MessageChannel.ChannelSystem, "错误", SystemUid, "信息“" + content + "”发送失败!"); } }
public void postChat(MessageChannel channel,string content) { // 向服务器请求的代码 if (channel == MessageChannel.ChannelPrivate || channel == MessageChannel.ChannelWorld || channel == MessageChannel.ChannelGuild) { Protocol.C2SChatMessageReq chatRequest = new Protocol.C2SChatMessageReq(); chatRequest.chat_type = (int)channel; if (channel == MessageChannel.ChannelPrivate) { chatRequest.chat_target_guid = 439715978; // > Debug } chatRequest.chat_content = Encoding.UTF8.GetBytes(content); NetworkEvent.sendPacket<Protocol.C2SChatMessageReq>(chatRequest); } else { writeLine(MessageChannel.ChannelSystem, "错误", SystemUid, "信息“" + content + "”发送失败!" ); } }