public void Save(BinaryWriter writer) { writer.Write(UniqueID); writer.Write(ItemIndex); writer.Write(CurrentDura); writer.Write(MaxDura); writer.Write(Count); writer.Write(SoulBoundId); byte Bools = 0; if (Identified) { Bools |= 0x01; } if (Cursed) { Bools |= 0x02; } writer.Write(Bools); writer.Write(Slots.Length); for (int i = 0; i < Slots.Length; i++) { writer.Write(Slots[i] == null); if (Slots[i] == null) { continue; } Slots[i].Save(writer); } writer.Write(GemCount); AddedStats.Save(writer); Awake.Save(writer); writer.Write((byte)RefinedValue); writer.Write(RefineAdded); writer.Write(RefineSuccessChance); writer.Write(WeddingRing); writer.Write(ExpireInfo != null); ExpireInfo?.Save(writer); writer.Write(RentalInformation != null); RentalInformation?.Save(writer); writer.Write(IsShopItem); writer.Write(SealedInfo != null); SealedInfo?.Save(writer); }
public void Save(BinaryWriter writer) { writer.Write(UniqueID); writer.Write(ItemIndex); writer.Write(CurrentDura); writer.Write(MaxDura); writer.Write(Count); writer.Write(AC); writer.Write(MAC); writer.Write(DC); writer.Write(MC); writer.Write(SC); writer.Write(Accuracy); writer.Write(Agility); writer.Write(HP); writer.Write(MP); writer.Write(AttackSpeed); writer.Write(Luck); writer.Write(SoulBoundId); byte Bools = 0; if (Identified) { Bools |= 0x01; } if (Cursed) { Bools |= 0x02; } writer.Write(Bools); writer.Write(Strong); writer.Write(MagicResist); writer.Write(PoisonResist); writer.Write(HealthRecovery); writer.Write(ManaRecovery); writer.Write(PoisonRecovery); writer.Write(CriticalRate); writer.Write(CriticalDamage); writer.Write(Freezing); writer.Write(PoisonAttack); writer.Write(Slots.Length); for (int i = 0; i < Slots.Length; i++) { writer.Write(Slots[i] == null); if (Slots[i] == null) { continue; } Slots[i].Save(writer); } writer.Write(GemCount); Awake.Save(writer); writer.Write((byte)RefinedValue); writer.Write(RefineAdded); writer.Write(WeddingRing); writer.Write(ExpireInfo != null); ExpireInfo?.Save(writer); writer.Write(RentalInformation != null); RentalInformation?.Save(writer); }