public void Deserialize(IDataReader reader) { RideId = reader.ReadVarInt(); BoostToUpdateList = new UpdateMountBoost[reader.ReadShort()]; for (var i = 0; i < BoostToUpdateList.Length; i++) { (BoostToUpdateList[i] = new UpdateMountBoost()).Deserialize(reader); } }
public override void Serialize(IDataWriter writer) { writer.WriteVarInt(this.rideId); writer.WriteShort((short)((int)this.boostToUpdateList.Length)); UpdateMountBoost[] updateMountBoostArray = this.boostToUpdateList; for (int i = 0; i < (int)updateMountBoostArray.Length; i++) { UpdateMountBoost updateMountBoost = updateMountBoostArray[i]; writer.WriteShort(updateMountBoost.TypeId); updateMountBoost.Serialize(writer); } }
public override void Deserialize(IDataReader reader) { rideId = reader.ReadVarInt(); var limit = reader.ReadShort(); var boostToUpdateList_ = new UpdateMountBoost[limit]; for (int i = 0; i < limit; i++) { boostToUpdateList_[i] = Types.ProtocolTypeManager.GetInstance <UpdateMountBoost>(reader.ReadShort()); boostToUpdateList_[i].Deserialize(reader); } boostToUpdateList = boostToUpdateList_; }
public override void Serialize(IDataWriter writer) { writer.WriteShort(((short)(m_boostToUpdateList.Count))); int boostToUpdateListIndex; for (boostToUpdateListIndex = 0; (boostToUpdateListIndex < m_boostToUpdateList.Count); boostToUpdateListIndex = (boostToUpdateListIndex + 1)) { UpdateMountBoost objectToSend = m_boostToUpdateList[boostToUpdateListIndex]; writer.WriteUShort(((ushort)(objectToSend.TypeID))); objectToSend.Serialize(writer); } writer.WriteVarInt(m_rideId); }
public override void Deserialize(IDataReader reader) { int boostToUpdateListCount = reader.ReadUShort(); int boostToUpdateListIndex; m_boostToUpdateList = new System.Collections.Generic.List <UpdateMountBoost>(); for (boostToUpdateListIndex = 0; (boostToUpdateListIndex < boostToUpdateListCount); boostToUpdateListIndex = (boostToUpdateListIndex + 1)) { UpdateMountBoost objectToAdd = ProtocolTypeManager.GetInstance <UpdateMountBoost>(reader.ReadUShort()); objectToAdd.Deserialize(reader); m_boostToUpdateList.Add(objectToAdd); } m_rideId = reader.ReadVarInt(); }