public override void Deserialize(IDataReader reader)
        {
            npcSellerId = reader.ReadDouble();
            tokenId     = reader.ReadVarUhShort();
            var limit = (ushort)reader.ReadUShort();

            objectsInfos = new Types.ObjectItemToSellInNpcShop[limit];
            for (int i = 0; i < limit; i++)
            {
                objectsInfos[i] = new Types.ObjectItemToSellInNpcShop();
                objectsInfos[i].Deserialize(reader);
            }
        }
 public override void Deserialize(BigEndianReader reader)
 {
     npcSellerId = reader.ReadInt();
     tokenId = reader.ReadVarShort();
     if (tokenId < 0)
         throw new Exception("Forbidden value on tokenId = " + tokenId + ", it doesn't respect the following condition : tokenId < 0");
     var limit = reader.ReadUShort();
     objectsInfos = new Types.ObjectItemToSellInNpcShop[limit];
     for (int i = 0; i < limit; i++)
     {
          objectsInfos[i] = new Types.ObjectItemToSellInNpcShop();
          objectsInfos[i].Deserialize(reader);
     }
 }
Beispiel #3
0
        public override void Deserialize(IDataReader reader)
        {
            npcSellerId = reader.ReadInt();
            tokenId     = reader.ReadInt();
            if (tokenId < 0)
            {
                throw new Exception("Forbidden value on tokenId = " + tokenId + ", it doesn't respect the following condition : tokenId < 0");
            }
            var limit = reader.ReadUShort();

            objectsInfos = new Types.ObjectItemToSellInNpcShop[limit];
            for (int i = 0; i < limit; i++)
            {
                objectsInfos[i] = new Types.ObjectItemToSellInNpcShop();
                objectsInfos[i].Deserialize(reader);
            }
        }
Beispiel #4
0
        public override void Deserialize(ICustomDataInput reader)
        {
            npcSellerId = reader.ReadDouble();
            if (npcSellerId < -9007199254740990 || npcSellerId > 9007199254740990)
            {
                throw new Exception("Forbidden value on npcSellerId = " + npcSellerId + ", it doesn't respect the following condition : npcSellerId < -9007199254740990 || npcSellerId > 9007199254740990");
            }
            tokenId = reader.ReadVarUhShort();
            if (tokenId < 0)
            {
                throw new Exception("Forbidden value on tokenId = " + tokenId + ", it doesn't respect the following condition : tokenId < 0");
            }
            var limit = reader.ReadUShort();

            objectsInfos = new Types.ObjectItemToSellInNpcShop[limit];
            for (int i = 0; i < limit; i++)
            {
                objectsInfos[i] = new Types.ObjectItemToSellInNpcShop();
                objectsInfos[i].Deserialize(reader);
            }
        }