public override void Deserialize(IDataReader reader) { base.Deserialize(reader); objectGID = reader.ReadShort(); if (objectGID < 0) { throw new Exception("Forbidden value on objectGID = " + objectGID + ", it doesn't respect the following condition : objectGID < 0"); } powerRate = reader.ReadShort(); overMax = reader.ReadBoolean(); var limit = reader.ReadUShort(); var effects_ = new Types.ObjectEffect[limit]; for (int i = 0; i < limit; i++) { effects_[i] = Types.ProtocolTypeManager.GetInstance <Types.ObjectEffect>(reader.ReadShort()); effects_[i].Deserialize(reader); } effects = effects_; objectUID = reader.ReadInt(); if (objectUID < 0) { throw new Exception("Forbidden value on objectUID = " + objectUID + ", it doesn't respect the following condition : objectUID < 0"); } quantity = reader.ReadInt(); if (quantity < 0) { throw new Exception("Forbidden value on quantity = " + quantity + ", it doesn't respect the following condition : quantity < 0"); } }
public virtual void Deserialize(IDataReader reader) { objectUID = reader.ReadVarInt(); if (objectUID < 0) { throw new Exception("Forbidden value on objectUID = " + objectUID + ", it doesn't respect the following condition : objectUID < 0"); } var limit = reader.ReadUShort(); var effects_ = new Types.ObjectEffect[limit]; for (int i = 0; i < limit; i++) { effects_[i] = Types.ProtocolTypeManager.GetInstance <Types.ObjectEffect>(reader.ReadShort()); effects_[i].Deserialize(reader); } effects = effects_; limit = reader.ReadUShort(); var prices_ = new int[limit]; for (int i = 0; i < limit; i++) { prices_[i] = reader.ReadInt(); } prices = prices_; }
public override void Deserialize(IDataReader reader) { setId = reader.ReadShort(); if (setId < 0) { throw new Exception("Forbidden value on setId = " + setId + ", it doesn't respect the following condition : setId < 0"); } var limit = reader.ReadUShort(); var setObjects_ = new short[limit]; for (int i = 0; i < limit; i++) { setObjects_[i] = reader.ReadShort(); } setObjects = setObjects_; limit = reader.ReadUShort(); var setEffects_ = new Types.ObjectEffect[limit]; for (int i = 0; i < limit; i++) { setEffects_[i] = Types.ProtocolTypeManager.GetInstance <Types.ObjectEffect>(reader.ReadShort()); setEffects_[i].Deserialize(reader); } setEffects = setEffects_; }
public virtual void Deserialize(IDataReader reader) { powerRate = reader.ReadShort(); overMax = reader.ReadBoolean(); var limit = reader.ReadUShort(); var effects_ = new Types.ObjectEffect[limit]; for (int i = 0; i < limit; i++) { effects_[i] = Types.ProtocolTypeManager.GetInstance <Types.ObjectEffect>(reader.ReadShort()); effects_[i].Deserialize(reader); } effects = effects_; }
public override void Deserialize(IDataReader reader) { itemUID = reader.ReadInt(); objGenericId = reader.ReadInt(); var limit = reader.ReadUShort(); var effects_ = new Types.ObjectEffect[limit]; for (int i = 0; i < limit; i++) { effects_[i] = Types.ProtocolTypeManager.GetInstance <Types.ObjectEffect>(reader.ReadShort()); effects_[i].Deserialize(reader); } effects = effects_; limit = reader.ReadUShort(); var prices_ = new int[limit]; for (int i = 0; i < limit; i++) { prices_[i] = reader.ReadVarInt(); } prices = prices_; }