public override void Deserialize(IDataReader reader)
        {
            collectorName = reader.ReadUTF();
            worldX        = reader.ReadShort();
            if (worldX < -255 || worldX > 255)
            {
                throw new Exception("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
            }
            worldY = reader.ReadShort();
            if (worldY < -255 || worldY > 255)
            {
                throw new Exception("Forbidden value on worldY = " + worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
            }
            mapId     = reader.ReadInt();
            subAreaId = reader.ReadShort();
            if (subAreaId < 0)
            {
                throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
            }
            userName   = reader.ReadUTF();
            experience = reader.ReadDouble();
            var limit = reader.ReadUShort();

            objectsInfos = new Types.ObjectItemQuantity[limit];
            for (int i = 0; i < limit; i++)
            {
                objectsInfos[i] = new Types.ObjectItemQuantity();
                objectsInfos[i].Deserialize(reader);
            }
        }
コード例 #2
0
 public override void Deserialize(BigEndianReader reader)
 {
     collectorName = reader.ReadUTF();
     worldX = reader.ReadShort();
     if (worldX < -255 || worldX > 255)
         throw new Exception("Forbidden value on worldX = " + worldX + ", it doesn't respect the following condition : worldX < -255 || worldX > 255");
     worldY = reader.ReadShort();
     if (worldY < -255 || worldY > 255)
         throw new Exception("Forbidden value on worldY = " + worldY + ", it doesn't respect the following condition : worldY < -255 || worldY > 255");
     mapId = reader.ReadInt();
     subAreaId = reader.ReadVarShort();
     if (subAreaId < 0)
         throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0");
     userName = reader.ReadUTF();
     experience = reader.ReadDouble();
     if (experience < -9.007199254740992E15 || experience > 9.007199254740992E15)
         throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < -9.007199254740992E15 || experience > 9.007199254740992E15");
     var limit = reader.ReadUShort();
     objectsInfos = new Types.ObjectItemQuantity[limit];
     for (int i = 0; i < limit; i++)
     {
          objectsInfos[i] = new Types.ObjectItemQuantity();
          objectsInfos[i].Deserialize(reader);
     }
 }
コード例 #3
0
 public override void Deserialize(IDataReader reader)
 {
     var limit = reader.ReadUShort();
     objectsUIDAndQty = new Types.ObjectItemQuantity[limit];
     for (int i = 0; i < limit; i++)
     {
          objectsUIDAndQty[i] = new Types.ObjectItemQuantity();
          objectsUIDAndQty[i].Deserialize(reader);
     }
 }
コード例 #4
0
        public override void Deserialize(BigEndianReader reader)
        {
            var limit = reader.ReadUShort();

            objectsUIDAndQty = new Types.ObjectItemQuantity[limit];
            for (int i = 0; i < limit; i++)
            {
                objectsUIDAndQty[i] = new Types.ObjectItemQuantity();
                objectsUIDAndQty[i].Deserialize(reader);
            }
        }
コード例 #5
0
        public override void Deserialize(IDataReader reader)
        {
            var limit             = reader.ReadShort();
            var objectsUIDAndQty_ = new Types.ObjectItemQuantity[limit];

            for (int i = 0; i < limit; i++)
            {
                objectsUIDAndQty_[i] = new Types.ObjectItemQuantity();
                objectsUIDAndQty_[i].Deserialize(reader);
            }
            objectsUIDAndQty = objectsUIDAndQty_;
        }
コード例 #6
0
        public override void Deserialize(IDataReader reader)
        {
            objectUID = reader.ReadVarUhInt();
            var limit = (ushort)reader.ReadUShort();

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