public override void Deserialize(IDataReader reader) { base.Deserialize(reader); this.objectGID = (uint)reader.ReadVarUhShort(); if (this.objectGID < 0U) { throw new Exception("Forbidden value (" + (object)this.objectGID + ") on element of ObjectItemToSell.objectGID."); } uint num = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num; ++index) { ObjectEffect instance = ProtocolTypeManager.GetInstance <ObjectEffect>((uint)reader.ReadUShort()); instance.Deserialize(reader); this.effects.Add(instance); } this.objectUID = reader.ReadVarUhInt(); if (this.objectUID < 0U) { throw new Exception("Forbidden value (" + (object)this.objectUID + ") on element of ObjectItemToSell.objectUID."); } this.quantity = reader.ReadVarUhInt(); if (this.quantity < 0U) { throw new Exception("Forbidden value (" + (object)this.quantity + ") on element of ObjectItemToSell.quantity."); } this.objectPrice = (double)reader.ReadVarUhLong(); if (this.objectPrice < 0.0 || this.objectPrice > 9.00719925474099E+15) { throw new Exception("Forbidden value (" + (object)this.objectPrice + ") on element of ObjectItemToSell.objectPrice."); } }
public override void Deserialize(IDataReader reader) { base.Deserialize(reader); this.position = (uint)reader.ReadShort(); if (this.position < 0U) { throw new Exception("Forbidden value (" + (object)this.position + ") on element of ObjectItem.position."); } this.objectGID = (uint)reader.ReadVarUhShort(); if (this.objectGID < 0U) { throw new Exception("Forbidden value (" + (object)this.objectGID + ") on element of ObjectItem.objectGID."); } uint num = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num; ++index) { ObjectEffect instance = ProtocolTypeManager.GetInstance <ObjectEffect>((uint)reader.ReadUShort()); instance.Deserialize(reader); this.effects.Add(instance); } this.objectUID = reader.ReadVarUhInt(); if (this.objectUID < 0U) { throw new Exception("Forbidden value (" + (object)this.objectUID + ") on element of ObjectItem.objectUID."); } this.quantity = reader.ReadVarUhInt(); if (this.quantity < 0U) { throw new Exception("Forbidden value (" + (object)this.quantity + ") on element of ObjectItem.quantity."); } }
public virtual void Deserialize(IDataReader reader) { this.objectUID = reader.ReadVarUhInt(); if (this.objectUID < 0U) { throw new Exception("Forbidden value (" + (object)this.objectUID + ") on element of BidExchangerObjectInfo.objectUID."); } this.objectGID = reader.ReadVarUhShort(); if (this.objectGID < 0) { throw new Exception("Forbidden value (" + this.objectGID + ") on element of BidExchangerObjectInfo.objectGID."); } this.objectType = (uint)reader.ReadInt(); if (this.objectType < 0) { throw new Exception("Forbidden value (" + this.objectType + ") on element of BidExchangerObjectInfo.objectType."); } uint num1 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num1; ++index) { ObjectEffect instance = ProtocolTypeManager.GetInstance <ObjectEffect>((uint)reader.ReadUShort()); instance.Deserialize(reader); this.effects.Add(instance); } uint num2 = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num2; ++index) { double num3 = (double)reader.ReadVarUhLong(); if (num3 < 0.0 || num3 > 9.00719925474099E+15) { throw new Exception("Forbidden value (" + (object)num3 + ") on elements of prices."); } this.prices.Add(num3); } }