Example #1
0
 public void writeToParcel(Parcel out, int flags) {
   out.writeInt(id);
   out.writeString(name);
   out.writeInt(powerPhysical);
   out.writeInt(powerMagical);
   out.writeInt(type.ordinal());
   out.writeInt(integrityCurrent);
   out.writeInt(integrityTotal);
   out.writeInt(rarity.ordinal());
   out.writeInt(effect.ordinal());
   out.writeInt(effectSpecial.ordinal());
   out.writeDouble(rating);
   out.writeInt(isEquippable ? 1 : 0);
 }
Example #2
0
 private ArtifactInfo(final Parcel in) {
   id = in.readInt();
   name = in.readString();
   powerPhysical = in.readInt();
   powerMagical = in.readInt();
   type = ArtifactType.values()[in.readInt()];
   integrityCurrent = in.readInt();
   integrityTotal = in.readInt();
   rarity = ArtifactRarity.values()[in.readInt()];
   effect = ArtifactEffect.values()[in.readInt()];
   effectSpecial = ArtifactEffect.values()[in.readInt()];
   rating = in.readDouble();
   isEquippable = in.readInt() == 1;
 }