public override void Deserialize(IDataReader reader) { NpcSellerId = reader.ReadDouble(); TokenId = reader.ReadVarUhShort(); var objectsInfosCount = reader.ReadUShort(); ObjectsInfos = new List <ObjectItemToSellInNpcShop>(); for (var objectsInfosIndex = 0; objectsInfosIndex < objectsInfosCount; objectsInfosIndex++) { var objectToAdd = new ObjectItemToSellInNpcShop(); objectToAdd.Deserialize(reader); ObjectsInfos.Add(objectToAdd); } }
public override void Deserialize(ICustomDataInput reader) { NpcSellerId = reader.ReadDouble(); TokenId = reader.ReadVarShort(); var countObjectsInfos = reader.ReadShort(); ObjectsInfos = new List <ObjectItemToSellInNpcShop>(); for (short i = 0; i < countObjectsInfos; i++) { ObjectItemToSellInNpcShop type = new ObjectItemToSellInNpcShop(); type.Deserialize(reader); ObjectsInfos.Add(type); } }
public override void Deserialize(IDataReader reader) { int objectsInfosCount = reader.ReadUShort(); int objectsInfosIndex; m_objectsInfos = new System.Collections.Generic.List <ObjectItemToSellInNpcShop>(); for (objectsInfosIndex = 0; (objectsInfosIndex < objectsInfosCount); objectsInfosIndex = (objectsInfosIndex + 1)) { ObjectItemToSellInNpcShop objectToAdd = new ObjectItemToSellInNpcShop(); objectToAdd.Deserialize(reader); m_objectsInfos.Add(objectToAdd); } m_npcSellerId = reader.ReadDouble(); m_tokenId = reader.ReadVarUhShort(); }
public override void Deserialize(IDataReader reader) { this.npcSellerId = reader.ReadDouble(); if (this.npcSellerId < -9.00719925474099E+15 || this.npcSellerId > 9.00719925474099E+15) { throw new Exception("Forbidden value (" + (object)this.npcSellerId + ") on element of ExchangeStartOkNpcShopMessage.npcSellerId."); } this.tokenId = (uint)reader.ReadVarUhShort(); if (this.tokenId < 0U) { throw new Exception("Forbidden value (" + (object)this.tokenId + ") on element of ExchangeStartOkNpcShopMessage.tokenId."); } uint num = (uint)reader.ReadUShort(); for (int index = 0; (long)index < (long)num; ++index) { ObjectItemToSellInNpcShop itemToSellInNpcShop = new ObjectItemToSellInNpcShop(); itemToSellInNpcShop.Deserialize(reader); this.objectsInfos.Add(itemToSellInNpcShop); } }