Example #1
0
        //发送飞鸽信息
        private void Send(PigeonInfo info)
        {
            short msgLen = 28;

            msgLen += (short)(Coding.GetDefauleCoding().GetBytes(info.name).Length + 1);
            msgLen += 17;
            msgLen += (short)(Coding.GetDefauleCoding().GetBytes(info.text).Length + 1);
            GameBase.Network.PacketOut outpack = new GameBase.Network.PacketOut();
            outpack.WriteInt16(msgLen);
            outpack.WriteInt16(1004);
            outpack.WriteInt32(0xffffff);
            outpack.WriteInt32(2017);
            outpack.WriteInt32(1419);
            outpack.WriteInt32(-1);
            outpack.WriteInt32(0);
            outpack.WriteByte(4); //四个字符串数组
            outpack.WriteString(info.name);
            outpack.WriteString("ALLUSERS");
            outpack.WriteString("1241350");
            outpack.WriteString(info.text);
            outpack.WriteByte(0);
            outpack.WriteByte(0);
            outpack.WriteByte(0);
            UserEngine.Instance().BrocatBuffer(outpack.Flush());
        }
Example #2
0
 //发送飞鸽信息
 private void Send(PigeonInfo info)
 {
     short msgLen = 28;
     msgLen += (short)(Coding.GetDefauleCoding().GetBytes(info.name).Length + 1);
     msgLen += 17;
     msgLen += (short)(Coding.GetDefauleCoding().GetBytes(info.text).Length + 1);
     GameBase.Network.PacketOut outpack = new GameBase.Network.PacketOut();
     outpack.WriteInt16(msgLen);
     outpack.WriteInt16(1004);
     outpack.WriteInt32(0xffffff);
     outpack.WriteInt32(2017);
     outpack.WriteInt32(1419);
     outpack.WriteInt32(-1);
     outpack.WriteInt32(0);
     outpack.WriteByte(4); //四个字符串数组
     outpack.WriteString(info.name);
     outpack.WriteString("ALLUSERS");
     outpack.WriteString("1241350");
     outpack.WriteString(info.text);
     outpack.WriteByte(0);
     outpack.WriteByte(0);
     outpack.WriteByte(0);
     UserEngine.Instance().BrocatBuffer(outpack.Flush());
 }