Ejemplo n.º 1
0
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     this.houseInfos = ProtocolTypeManager.GetInstance <HouseInstanceInformations>((uint)reader.ReadUShort());
     this.houseInfos.Deserialize(reader);
     this.worldX = (int)reader.ReadShort();
     if (this.worldX < -255 || this.worldX > (int)byte.MaxValue)
     {
         throw new Exception("Forbidden value (" + (object)this.worldX + ") on element of AccountHouseInformations.worldX.");
     }
     this.worldY = (int)reader.ReadShort();
     if (this.worldY < -255 || this.worldY > (int)byte.MaxValue)
     {
         throw new Exception("Forbidden value (" + (object)this.worldY + ") on element of AccountHouseInformations.worldY.");
     }
     this.mapId = reader.ReadDouble();
     if (this.mapId < 0.0 || this.mapId > 9.00719925474099E+15)
     {
         throw new Exception("Forbidden value (" + (object)this.mapId + ") on element of AccountHouseInformations.mapId.");
     }
     this.subAreaId = (uint)reader.ReadVarUhShort();
     if (this.subAreaId < 0U)
     {
         throw new Exception("Forbidden value (" + (object)this.subAreaId + ") on element of AccountHouseInformations.subAreaId.");
     }
 }
Ejemplo n.º 2
0
 public HouseInformationsInside(
     uint houseId,
     uint modelId,
     HouseInstanceInformations houseInfos,
     int worldX,
     int worldY)
     : base(houseId, modelId)
 {
     this.houseInfos = houseInfos;
     this.worldX     = worldX;
     this.worldY     = worldY;
 }
Ejemplo n.º 3
0
 public override void Deserialize(IDataReader reader)
 {
     base.Deserialize(reader);
     this.houseInfos = ProtocolTypeManager.GetInstance <HouseInstanceInformations>((uint)reader.ReadUShort());
     this.houseInfos.Deserialize(reader);
     this.worldX = (int)reader.ReadShort();
     if (this.worldX < -255 || this.worldX > (int)byte.MaxValue)
     {
         throw new Exception("Forbidden value (" + (object)this.worldX + ") on element of HouseInformationsInside.worldX.");
     }
     this.worldY = (int)reader.ReadShort();
     if (this.worldY < -255 || this.worldY > (int)byte.MaxValue)
     {
         throw new Exception("Forbidden value (" + (object)this.worldY + ") on element of HouseInformationsInside.worldY.");
     }
 }
Ejemplo n.º 4
0
 public AccountHouseInformations(
     uint houseId,
     uint modelId,
     HouseInstanceInformations houseInfos,
     int worldX,
     int worldY,
     double mapId,
     uint subAreaId)
     : base(houseId, modelId)
 {
     this.houseInfos = houseInfos;
     this.worldX     = worldX;
     this.worldY     = worldY;
     this.mapId      = mapId;
     this.subAreaId  = subAreaId;
 }
Ejemplo n.º 5
0
        public override void Deserialize(IDataReader reader)
        {
            base.Deserialize(reader);
            uint num1 = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num1; ++index)
            {
                uint num2 = (uint)reader.ReadInt();
                if (num2 < 0U)
                {
                    throw new Exception("Forbidden value (" + (object)num2 + ") on elements of doorsOnMap.");
                }
                this.doorsOnMap.Add(num2);
            }
            uint num3 = (uint)reader.ReadUShort();

            for (int index = 0; (long)index < (long)num3; ++index)
            {
                HouseInstanceInformations instanceInformations = new HouseInstanceInformations();
                instanceInformations.Deserialize(reader);
                this.houseInstances.Add(instanceInformations);
            }
        }