public virtual void Deserialize(BigEndianReader reader) { uniqueId = reader.ReadInt(); firtNameId = reader.ReadVarShort(); if (firtNameId < 0) throw new Exception("Forbidden value on firtNameId = " + firtNameId + ", it doesn't respect the following condition : firtNameId < 0"); lastNameId = reader.ReadVarShort(); if (lastNameId < 0) throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0"); additionalInfos = new Types.AdditionalTaxCollectorInformations(); additionalInfos.Deserialize(reader); 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"); subAreaId = reader.ReadVarShort(); if (subAreaId < 0) throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0"); state = reader.ReadSByte(); if (state < 0) throw new Exception("Forbidden value on state = " + state + ", it doesn't respect the following condition : state < 0"); look = new Types.EntityLook(); look.Deserialize(reader); var limit = reader.ReadUShort(); complements = new Types.TaxCollectorComplementaryInformations[limit]; for (int i = 0; i < limit; i++) { complements[i] = Types.ProtocolTypeManager.GetInstance<Types.TaxCollectorComplementaryInformations>(reader.ReadShort()); complements[i].Deserialize(reader); } }
public virtual void Deserialize(IDataReader reader) { uniqueId = reader.ReadInt(); firtNameId = reader.ReadShort(); if (firtNameId < 0) { throw new Exception("Forbidden value on firtNameId = " + firtNameId + ", it doesn't respect the following condition : firtNameId < 0"); } lastNameId = reader.ReadShort(); if (lastNameId < 0) { throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0"); } additonalInformation = new Types.AdditionalTaxCollectorInformations(); additonalInformation.Deserialize(reader); 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"); } subAreaId = reader.ReadShort(); if (subAreaId < 0) { throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0"); } state = reader.ReadSByte(); look = new Types.EntityLook(); look.Deserialize(reader); kamas = reader.ReadInt(); if (kamas < 0) { throw new Exception("Forbidden value on kamas = " + kamas + ", it doesn't respect the following condition : kamas < 0"); } experience = reader.ReadDouble(); if (experience < 0) { throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0"); } pods = reader.ReadInt(); if (pods < 0) { throw new Exception("Forbidden value on pods = " + pods + ", it doesn't respect the following condition : pods < 0"); } itemsValue = reader.ReadInt(); if (itemsValue < 0) { throw new Exception("Forbidden value on itemsValue = " + itemsValue + ", it doesn't respect the following condition : itemsValue < 0"); } }
public TaxCollectorInformations(int uniqueId, uint firtNameId, uint lastNameId, Types.AdditionalTaxCollectorInformations additionalInfos, short worldX, short worldY, uint subAreaId, sbyte state, Types.EntityLook look, Types.TaxCollectorComplementaryInformations[] complements) { this.uniqueId = uniqueId; this.firtNameId = firtNameId; this.lastNameId = lastNameId; this.additionalInfos = additionalInfos; this.worldX = worldX; this.worldY = worldY; this.subAreaId = subAreaId; this.state = state; this.look = look; this.complements = complements; }
public TaxCollectorInformations(int uniqueId, short firtNameId, short lastNameId, Types.AdditionalTaxCollectorInformations additionalInfos, short worldX, short worldY, short subAreaId, sbyte state, Types.EntityLook look, Types.TaxCollectorComplementaryInformations[] complements) { this.uniqueId = uniqueId; this.firtNameId = firtNameId; this.lastNameId = lastNameId; this.additionalInfos = additionalInfos; this.worldX = worldX; this.worldY = worldY; this.subAreaId = subAreaId; this.state = state; this.look = look; this.complements = complements; }
public TaxCollectorInformations(int uniqueId, short firtNameId, short lastNameId, Types.AdditionalTaxCollectorInformations additionalInfos, short worldX, short worldY, short subAreaId, sbyte state, Types.EntityLook look, int kamas, double experience, int pods, int itemsValue) { this.uniqueId = uniqueId; this.firtNameId = firtNameId; this.lastNameId = lastNameId; this.additionalInfos = additionalInfos; this.worldX = worldX; this.worldY = worldY; this.subAreaId = subAreaId; this.state = state; this.look = look; this.kamas = kamas; this.experience = experience; this.pods = pods; this.itemsValue = itemsValue; }
public TaxCollectorInformations(int uniqueId, short firtNameId, short lastNameId, Types.AdditionalTaxCollectorInformations additonalInformation, short worldX, short worldY, short subAreaId, sbyte state, Types.EntityLook look, int kamas, double experience, int pods, int itemsValue) { this.uniqueId = uniqueId; this.firtNameId = firtNameId; this.lastNameId = lastNameId; this.additonalInformation = additonalInformation; this.worldX = worldX; this.worldY = worldY; this.subAreaId = subAreaId; this.state = state; this.look = look; this.kamas = kamas; this.experience = experience; this.pods = pods; this.itemsValue = itemsValue; }
public virtual void Deserialize(IDataReader reader) { uniqueId = reader.ReadInt(); firtNameId = reader.ReadVarShort(); if (firtNameId < 0) { throw new Exception("Forbidden value on firtNameId = " + firtNameId + ", it doesn't respect the following condition : firtNameId < 0"); } lastNameId = reader.ReadVarShort(); if (lastNameId < 0) { throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0"); } additionalInfos = new Types.AdditionalTaxCollectorInformations(); additionalInfos.Deserialize(reader); 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"); } subAreaId = reader.ReadVarShort(); if (subAreaId < 0) { throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0"); } state = reader.ReadSByte(); if (state < 0) { throw new Exception("Forbidden value on state = " + state + ", it doesn't respect the following condition : state < 0"); } look = new Types.EntityLook(); look.Deserialize(reader); var limit = reader.ReadUShort(); var complements_ = new Types.TaxCollectorComplementaryInformations[limit]; for (int i = 0; i < limit; i++) { complements_[i] = Types.ProtocolTypeManager.GetInstance <Types.TaxCollectorComplementaryInformations>(reader.ReadShort()); complements_[i].Deserialize(reader); } complements = complements_; }
public virtual void Deserialize(IDataReader reader) { uniqueId = reader.ReadDouble(); firtNameId = reader.ReadVarUhShort(); lastNameId = reader.ReadVarUhShort(); additionalInfos = new Types.AdditionalTaxCollectorInformations(); additionalInfos.Deserialize(reader); worldX = reader.ReadShort(); worldY = reader.ReadShort(); subAreaId = reader.ReadVarUhShort(); state = reader.ReadSbyte(); look = new Types.EntityLook(); look.Deserialize(reader); var limit = (ushort)reader.ReadUShort(); complements = new Types.TaxCollectorComplementaryInformations[limit]; for (int i = 0; i < limit; i++) { complements[i] = ProtocolTypeManager.GetInstance <Types.TaxCollectorComplementaryInformations>(reader.ReadUShort()); complements[i].Deserialize(reader); } }
public virtual void Deserialize(IDataReader reader) { uniqueId = reader.ReadInt(); firtNameId = reader.ReadShort(); if (firtNameId < 0) throw new Exception("Forbidden value on firtNameId = " + firtNameId + ", it doesn't respect the following condition : firtNameId < 0"); lastNameId = reader.ReadShort(); if (lastNameId < 0) throw new Exception("Forbidden value on lastNameId = " + lastNameId + ", it doesn't respect the following condition : lastNameId < 0"); additionalInfos = new Types.AdditionalTaxCollectorInformations(); additionalInfos.Deserialize(reader); 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"); subAreaId = reader.ReadShort(); if (subAreaId < 0) throw new Exception("Forbidden value on subAreaId = " + subAreaId + ", it doesn't respect the following condition : subAreaId < 0"); state = reader.ReadSByte(); look = new Types.EntityLook(); look.Deserialize(reader); kamas = reader.ReadInt(); if (kamas < 0) throw new Exception("Forbidden value on kamas = " + kamas + ", it doesn't respect the following condition : kamas < 0"); experience = reader.ReadDouble(); if (experience < 0) throw new Exception("Forbidden value on experience = " + experience + ", it doesn't respect the following condition : experience < 0"); pods = reader.ReadInt(); if (pods < 0) throw new Exception("Forbidden value on pods = " + pods + ", it doesn't respect the following condition : pods < 0"); itemsValue = reader.ReadInt(); if (itemsValue < 0) throw new Exception("Forbidden value on itemsValue = " + itemsValue + ", it doesn't respect the following condition : itemsValue < 0"); }
public TaxCollectorInformationsInWaitForHelpState(int uniqueId, short firtNameId, short lastNameId, Types.AdditionalTaxCollectorInformations additionalInfos, short worldX, short worldY, short subAreaId, sbyte state, Types.EntityLook look, int kamas, double experience, int pods, int itemsValue, Types.ProtectedEntityWaitingForHelpInfo waitingForHelpInfo) : base(uniqueId, firtNameId, lastNameId, additionalInfos, worldX, worldY, subAreaId, state, look, kamas, experience, pods, itemsValue) { this.waitingForHelpInfo = waitingForHelpInfo; }