Exemplo n.º 1
0
        public override void Deserialize(Packet rawPacket)
        {
            this.rawPacket = rawPacket;
            var reader = new ArrayPacketReader(rawPacket.Payload);

            reader.ReadByte();
            reader.ReadUShort();
            Type     = (SpeechType)reader.ReadByte();
            Color    = reader.ReadUShort();
            Font     = reader.ReadUShort();
            Language = reader.ReadString(4);
            if (((int)Type & 0xC0) != 0)
            {
                ushort rawBytes     = reader.ReadUShort();
                int    keywordCount = (rawBytes & 0x0FFF) >> 4;
                if (keywordCount > 0)
                {
                    reader.ReadByte();
                    keywordCount--;
                }
                while (keywordCount != 0)
                {
                    reader.ReadUShort();
                    keywordCount--;
                }

                Text = reader.ReadNullTerminatedString();
            }
            else
            {
                Text = reader.ReadNullTerminatedUnicodeString();
            }
        }
Exemplo n.º 2
0
        public override void Deserialize(Packet rawPacket)
        {
            this.rawPacket = rawPacket;
            var reader = new ArrayPacketReader(rawPacket.Payload);

            reader.Skip(3);

            Id       = reader.ReadObjectId();
            Model    = reader.ReadModelId();
            Type     = (SpeechType)reader.ReadByte();
            Color    = (Color)reader.ReadUShort();
            Font     = reader.ReadUShort();
            Language = reader.ReadString(4);
            Name     = reader.ReadString(30);
            Message  = reader.ReadNullTerminatedUnicodeString();
        }
Exemplo n.º 3
0
        public override void Deserialize(Packet rawPacket)
        {
            this.rawPacket = rawPacket;

            var reader = new ArrayPacketReader(rawPacket.Payload);

            reader.Skip(3);

            SpeakerId   = reader.ReadObjectId();
            SpeakerBody = reader.ReadModelId();
            Type        = (SpeechType)reader.ReadByte();
            Color       = reader.ReadColor();
            Font        = reader.ReadUShort();
            MessageId   = new MessageId(reader.ReadInt());
            Name        = reader.ReadString(29);
            Arguments   = reader.ReadNullTerminatedUnicodeString();
        }