コード例 #1
0
        public override void Deserialize(IDataReader reader)
        {
            Type = reader.ReadSByte();
            var DestinationsCount = reader.ReadShort();

            Destinations = new List <TeleportDestination>();
            for (var i = 0; i < DestinationsCount; i++)
            {
                var objectToAdd = new TeleportDestination();
                objectToAdd.Deserialize(reader);
                Destinations.Add(objectToAdd);
            }
        }
コード例 #2
0
        public override void Deserialize(ICustomDataInput reader)
        {
            Type = reader.ReadByte();
            var countDestinations = reader.ReadShort();

            Destinations = new List <TeleportDestination>();
            for (short i = 0; i < countDestinations; i++)
            {
                TeleportDestination type = new TeleportDestination();
                type.Deserialize(reader);
                Destinations.Add(type);
            }
        }
コード例 #3
0
        public override void Deserialize(IDataReader reader)
        {
            this.type = (uint)reader.ReadByte();
            if (this.type < 0U)
            {
                throw new Exception("Forbidden value (" + (object)this.type + ") on element of TeleportDestinationsMessage.type.");
            }
            uint num = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num; ++index)
            {
                TeleportDestination teleportDestination = new TeleportDestination();
                teleportDestination.Deserialize(reader);
                this.destinations.Add(teleportDestination);
            }
        }