Пример #1
0
        public static void SendChangeAway(string message)
        {
            int Unicode_Message_Len = use.GetUnicodeCharsCount(message);

            BufferClass.Buffer SendBuff = new BufferClass.Buffer(Unicode_Message_Len + 5);
            SendBuff.WriteByte((byte)Packets.S_SUBPROTO_MESSAGE.MESSAGE_ChangeAway);
            SendBuff.WriteInt((uint)Unicode_Message_Len);
            SendBuff.WriteUnicodeString(message);
            SendData(OBJ.Connection, Packets.PROTO_ENUM.PROTO_MESSAGE, SendBuff.GetWrittenBuffer());
        }
Пример #2
0
        public static bool SendMessage(int id, string message)
        {
            int Unicode_Message_Len = use.GetUnicodeCharsCount(message);

            BufferClass.Buffer SendBuff = new BufferClass.Buffer(Unicode_Message_Len + 9);
            SendBuff.WriteByte((byte)Packets.S_SUBPROTO_MESSAGE.MESSAGE_SendMessage);
            SendBuff.WriteInt((uint)id);
            SendBuff.WriteInt((uint)Unicode_Message_Len);
            SendBuff.WriteUnicodeString(message);
            SendData(OBJ.Connection, Packets.PROTO_ENUM.PROTO_MESSAGE, SendBuff.GetWrittenBuffer());
            return(true);
        }