public virtual void Deserialize(BigEndianReader reader) { var limit = reader.ReadUShort(); quantities = new int[limit]; for (int i = 0; i < limit; i++) { quantities[i] = reader.ReadVarInt(); } limit = reader.ReadUShort(); types = new int[limit]; for (int i = 0; i < limit; i++) { types[i] = reader.ReadVarInt(); } taxPercentage = reader.ReadFloat(); taxModificationPercentage = reader.ReadFloat(); maxItemLevel = reader.ReadByte(); if (maxItemLevel < 0 || maxItemLevel > 255) { throw new Exception("Forbidden value on maxItemLevel = " + maxItemLevel + ", it doesn't respect the following condition : maxItemLevel < 0 || maxItemLevel > 255"); } maxItemPerAccount = reader.ReadVarInt(); if (maxItemPerAccount < 0) { throw new Exception("Forbidden value on maxItemPerAccount = " + maxItemPerAccount + ", it doesn't respect the following condition : maxItemPerAccount < 0"); } npcContextualId = reader.ReadInt(); unsoldDelay = reader.ReadVarShort(); if (unsoldDelay < 0) { throw new Exception("Forbidden value on unsoldDelay = " + unsoldDelay + ", it doesn't respect the following condition : unsoldDelay < 0"); } }
public virtual void Deserialize(BigEndianReader reader) { this.objectUID = reader.ReadVarInt(); this.bonusMin = reader.ReadFloat(); this.bonusMax = reader.ReadFloat(); var limit = reader.ReadUShort(); for (int i = 0; i < limit; i++) { this.runesId.Add(reader.ReadVarShort()); } var newLimit = reader.ReadUShort(); for (int i = 0; i < newLimit; i++) { this.runesQty.Add(reader.ReadVarInt()); } }
public override void Deserialize(BigEndianReader reader) { part = new Types.ContentPart(); part.Deserialize(reader); installationPercent = reader.ReadFloat(); }