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); } }
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); } }
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); } }