public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)4); // version // Version 4 writer.WriteEncodedInt((int)m_MaxHitPoints); writer.WriteEncodedInt((int)m_HitPoints); // Version 3 writer.Write((int)m_Slayer); writer.Write((int)m_Slayer2); // Version 2 writer.Write((bool)m_Ownable); writer.Write((Mobile)m_Owner); writer.Write((int)m_CraftBonusRegular); writer.Write((int)m_CraftBonusRegularValue); writer.Write((int)m_CraftBonusExcep); writer.Write((int)m_CraftBonusExcepValue); writer.Write((int)m_ProtectionEntry); writer.Write((int)m_ProtectionValue); writer.Write((int)m_KillersEntry); writer.Write((int)m_KillersValue); writer.Write((int)m_TalisSlayer); writer.Write((int)m_TalismanType); writer.Write((int)m_Charges); m_MagicalAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_SkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)1); // version m_Attributes.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)3); // version writer.Write((bool)m_Exceptional); writer.Write((Mobile)m_Crafter); m_Attributes.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)7); // version writer.Write((bool)m_Exceptional); writer.Write((Mobile)m_Crafter); writer.WriteEncodedInt((int)m_Slayer2); writer.Write((string)m_EngraveString); writer.WriteEncodedInt((int)m_Slayer); m_MagicalAttributes.Serialize(writer); m_SkillBonuses.Serialize(writer); writer.Write(m_Content); writer.Write(m_Count); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)8); // version writer.Write((bool)m_Exceptional); writer.Write((bool)m_PlayerConstructed); writer.Write((Mobile)m_Crafter); m_AbsorptionAttributes.Serialize(writer); writer.WriteEncodedInt((int)m_TimesImbued); writer.WriteEncodedInt((int)m_MaxHitPoints); writer.WriteEncodedInt((int)m_HitPoints); writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); m_MagicalAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_SkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)9); // version SaveFlag flags = SaveFlag.None; SetSaveFlag(ref flags, SaveFlag.Resource, m_Resource != DefaultResource); SetSaveFlag(ref flags, SaveFlag.Attributes, !m_MagicalAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.ClothingAttributes, !m_ClothingAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !m_SkillBonuses.IsEmpty); SetSaveFlag(ref flags, SaveFlag.Resistances, !m_Resistances.IsEmpty); SetSaveFlag(ref flags, SaveFlag.MaxHitPoints, m_MaxHitPoints != 0); SetSaveFlag(ref flags, SaveFlag.HitPoints, m_HitPoints != 0); SetSaveFlag(ref flags, SaveFlag.PlayerConstructed, m_PlayerConstructed != false); SetSaveFlag(ref flags, SaveFlag.Crafter, m_Crafter != null); SetSaveFlag(ref flags, SaveFlag.Exceptional, m_Exceptional != false); SetSaveFlag(ref flags, SaveFlag.AbsorptionAttributes, !m_AbsorptionAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.Altered, m_Altered); writer.WriteEncodedInt((int)flags); if (GetSaveFlag(flags, SaveFlag.Resource)) { writer.Write((int)m_Resource); } if (GetSaveFlag(flags, SaveFlag.Attributes)) { m_MagicalAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.ClothingAttributes)) { m_ClothingAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.SkillBonuses)) { m_SkillBonuses.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.Resistances)) { m_Resistances.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.MaxHitPoints)) { writer.Write((int)m_MaxHitPoints); } if (GetSaveFlag(flags, SaveFlag.HitPoints)) { writer.Write((int)m_HitPoints); } if (GetSaveFlag(flags, SaveFlag.Crafter)) { writer.Write((Mobile)m_Crafter); } if (GetSaveFlag(flags, SaveFlag.AbsorptionAttributes)) { m_AbsorptionAttributes.Serialize(writer); } }