public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)5); // version writer.WriteEncodedInt((int)m_MaxHitPoints); writer.WriteEncodedInt((int)m_HitPoints); #region Mondain's Legacy Sets version 4 writer.Write((bool)m_LastEquipped); writer.Write((bool)m_SetEquipped); writer.WriteEncodedInt((int)m_SetHue); m_SetAttributes.Serialize(writer); m_SetSkillBonuses.Serialize(writer); #endregion #region Mondain's Legacy version 3 writer.Write((Mobile)m_Crafter); writer.Write((int)m_Quality); #endregion writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { #region Ethics if (m_EthicState != null && m_EthicState.HasExpired) { m_EthicState.Detach(); } #endregion base.Serialize(writer); writer.Write((int)5); // version writer.Write((byte)m_Quality); writer.Write((string)m_EngravedText); writer.Write(m_Crafter); writer.Write((int)m_Slayer); writer.Write((int)m_Slayer2); m_AosAttributes.Serialize(writer); m_AosSkillBonuses.Serialize(writer); writer.Write(m_Content); writer.Write(m_Count); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)2); // version writer.Write(m_OriginalHue); writer.Write(FishInfo.GetIndexFromType(m_BaitType)); writer.Write((int)m_HookType); writer.Write(m_HookUses); writer.Write(m_BaitUses); writer.Write(m_EnhancedBait); SaveFlag flags = SaveFlag.None; SetSaveFlag(ref flags, SaveFlag.xAttributes, !m_AosAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty); writer.Write((int)flags); if (GetSaveFlag(flags, SaveFlag.xAttributes)) { m_AosAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.SkillBonuses)) { m_AosSkillBonuses.Serialize(writer); } }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)5); // version #region Mondain's Legacy version 5 writer.Write((byte)m_Quality); #endregion #region Mondain's Legacy version 4 writer.Write((string)m_EngravedText); #endregion writer.Write(m_Crafter); writer.Write((int)m_Slayer); writer.Write((int)m_Slayer2); m_AosAttributes.Serialize(writer); m_AosSkillBonuses.Serialize(writer); writer.Write(m_Content); writer.Write(m_Count); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write(10); // version writer.Write(m_PlayerConstructed); m_TalismanProtection.Serialize(writer); writer.Write(_VvVItem); writer.Write(_Owner); writer.Write(_OwnerName); //Version 7 writer.Write((bool)m_IsImbued); // Version 6 m_NegativeAttributes.Serialize(writer); // Version 5 #region Region Reforging writer.Write((int)m_ReforgedPrefix); writer.Write((int)m_ReforgedSuffix); writer.Write((int)m_ItemPower); writer.Write(m_BlockRepair); #endregion #region Stygian Abyss writer.Write(m_GorgonLenseCharges); writer.Write((int)m_GorgonLenseType); // Version 4 writer.WriteEncodedInt((int)m_TimesImbued); m_SAAbsorptionAttributes.Serialize(writer); #endregion writer.Write((Mobile)m_BlessedBy); writer.Write((bool)m_LastEquipped); writer.Write((bool)m_SetEquipped); writer.WriteEncodedInt((int)m_SetHue); m_SetAttributes.Serialize(writer); m_SetSkillBonuses.Serialize(writer); writer.Write(m_Crafter); writer.Write((int)m_Quality); // Version 3 writer.WriteEncodedInt((int)m_MaxHitPoints); writer.WriteEncodedInt((int)m_HitPoints); writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write(6); // version m_NegativeAttributes.Serialize(writer); writer.Write(m_HitPoints); writer.Write(m_MaxHitPoints); writer.Write(_VvVItem); writer.Write(_Owner); writer.Write(_OwnerName); writer.Write((byte)m_Quality); writer.Write(m_EngravedText); writer.Write(m_Crafter); writer.Write((int)m_Slayer); writer.Write((int)m_Slayer2); m_AosAttributes.Serialize(writer); m_AosSkillBonuses.Serialize(writer); writer.Write(m_Content); writer.Write(m_Count); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)3); // version writer.Write(m_ReplenishesCharges); if (m_ReplenishesCharges) { writer.Write(m_LastReplenished); } writer.Write(m_Crafter); writer.WriteEncodedInt((int)m_Quality); writer.WriteEncodedInt((int)m_Slayer); writer.WriteEncodedInt((int)m_Slayer2); writer.WriteEncodedInt((int)UsesRemaining); writer.WriteEncodedInt((int)m_WellSound); writer.WriteEncodedInt((int)m_BadlySound); writer.WriteEncodedInt((int)m_MaxHitPoints); writer.WriteEncodedInt((int)m_HitPoints); writer.WriteEncodedInt((int)m_Resource); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)2); // version writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)2); // version writer.Write(( bool )m_ContainsBow); //Version 2 writer.Write((int)m_LowerAmmoCost); //Version 1 writer.Write(m_Crafter); m_AosAttributes.Serialize(writer); m_AosSkillBonuses.Serialize(writer); writer.Write((Mobile)m_Owner); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)5); // version SaveFlag flags = SaveFlag.None; SetSaveFlag(ref flags, SaveFlag.Resource, m_Resource != DefaultResource); SetSaveFlag(ref flags, SaveFlag.Attributes, !m_AosAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.ClothingAttributes, !m_AosClothingAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty); SetSaveFlag(ref flags, SaveFlag.Resistances, !m_AosResistances.IsEmpty); SetSaveFlag(ref flags, SaveFlag.PlayerConstructed, m_PlayerConstructed != false); SetSaveFlag(ref flags, SaveFlag.StrReq, m_StrReq != -1); SetSaveFlag(ref flags, SaveFlag.IPYInvisible, IsInvisible); writer.WriteEncodedInt((int)flags); if (GetSaveFlag(flags, SaveFlag.Resource)) { writer.WriteEncodedInt((int)m_Resource); } if (GetSaveFlag(flags, SaveFlag.Attributes)) { m_AosAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.ClothingAttributes)) { m_AosClothingAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.SkillBonuses)) { m_AosSkillBonuses.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.Resistances)) { m_AosResistances.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.StrReq)) { writer.WriteEncodedInt((int)m_StrReq); } }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)3); // version m_AosAttributes.Serialize(writer); m_AosClothingAttributes.Serialize(writer); m_AosSkillBonuses.Serialize(writer); m_AosResistances.Serialize(writer); writer.Write((bool)m_PlayerConstructed); writer.Write((Mobile)m_Crafter); writer.Write((int)m_Quality); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)3); // version writer.Write(m_Crafter); writer.Write((int)m_Slayer); writer.Write((int)m_Slayer2); m_AosAttributes.Serialize(writer); m_AosSkillBonuses.Serialize(writer); writer.Write(m_Content); writer.Write(m_Count); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)3); // version if (m_AosAttributes == null) { new AosAttributes(this).Serialize(writer); } else { m_AosAttributes.Serialize(writer); } if (m_AosClothingAttributes == null) { new AosArmorAttributes(this).Serialize(writer); } else { m_AosClothingAttributes.Serialize(writer); } if (m_AosSkillBonuses == null) { new AosSkillBonuses(this).Serialize(writer); } else { m_AosSkillBonuses.Serialize(writer); } if (m_AosResistances == null) { new AosAttributes(this).Serialize(writer); } else { m_AosResistances.Serialize(writer); } writer.Write((bool)m_PlayerConstructed); writer.Write((Mobile)m_Crafter); writer.Write((int)m_Quality); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)3); // version #region ItemID_Mods writer.Write((bool)m_Identified); #endregion writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)3); // version #region Mondain's Legacy version 3 writer.Write((Mobile)m_Crafter); writer.Write((int)m_Quality); #endregion writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)4); // version writer.WriteEncodedInt((int)m_MaxHitPoints); writer.WriteEncodedInt((int)m_HitPoints); writer.Write((bool)m_Identified); //Until we determine what to do writer.Write((int)m_ChargedAbility); //Until we determine what to do writer.Write((int)m_AbilityCharges); //Until we determine what to do writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)3); // version writer.Write((List <Mobile>)m_IDList, true); writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); writer.Write((bool)m_Identified); writer.Write((int)m_Charges); writer.WriteEncodedInt((int)m_JewelEffect); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)3); // version writer.Write((string)m_Crafter_Name); writer.Write(m_Crafter); writer.WriteEncodedInt((int)m_Quality); writer.WriteEncodedInt((int)m_Slayer); m_AosAttributes.Serialize(writer); m_AosSkillBonuses.Serialize(writer); writer.Write(m_Content); writer.Write(m_Count); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)6); // version writer.Write((Mobile)m_Crafter); writer.Write((bool)m_PlayerConstructed); writer.Write((bool)m_Identified); writer.WriteEncodedInt((int)m_MaxHitPoints); writer.WriteEncodedInt((int)m_HitPoints); writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); // Bumped to 8 writer.Write((int)8); // version #region SF Imbuing writer.WriteEncodedInt((int)m_TimesImbued); #endregion #region SA m_SAAbsorptionAttributes.Serialize(writer); #endregion writer.WriteEncodedInt((int)m_MaxHitPoints); writer.WriteEncodedInt((int)m_HitPoints); writer.Write((Mobile)m_BlessedBy); // Personal Bless Deed #region Mondain's Legacy Sets version 4 writer.Write((bool)m_LastEquipped); writer.Write((bool)m_SetEquipped); writer.WriteEncodedInt((int)m_SetHue); m_SetAttributes.Serialize(writer); m_SetSkillBonuses.Serialize(writer); #endregion #region Mondain's Legacy version 3 writer.Write((Mobile)m_Crafter); writer.Write((int)m_Quality); #endregion writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)6); // version writer.Write((string)m_Crafter_Name); writer.Write((int)m_MaxHitPoints); writer.Write((int)m_HitPoints); writer.Write((int)m_Resource); m_AosAttributes.Serialize(writer); m_AosClothingAttributes.Serialize(writer); m_AosSkillBonuses.Serialize(writer); m_AosResistances.Serialize(writer); writer.Write((bool)m_PlayerConstructed); writer.Write((Mobile)m_Crafter); writer.Write((int)m_Quality); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write(1); // version SaveFlag flags = SaveFlag.None; // Version 1 m_AosSkillBonuses.Serialize(writer); m_Resistances.Serialize(writer); SetSaveFlag(ref flags, SaveFlag.Attributes, !this.m_Attributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.LowerAmmoCost, this.m_LowerAmmoCost != 0); SetSaveFlag(ref flags, SaveFlag.WeightReduction, this.m_WeightReduction != 0); SetSaveFlag(ref flags, SaveFlag.DamageIncrease, this.m_DamageIncrease != 0); SetSaveFlag(ref flags, SaveFlag.Crafter, this.m_Crafter != null); SetSaveFlag(ref flags, SaveFlag.Quality, true); SetSaveFlag(ref flags, SaveFlag.Capacity, this.m_Capacity > 0); #region Mondain's Legacy Sets SetSaveFlag(ref flags, SaveFlag.SetAttributes, !this.m_SetAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.SetSkillAttributes, !this.m_SetSkillBonuses.IsEmpty); SetSaveFlag(ref flags, SaveFlag.SetHue, this.m_SetHue != 0); SetSaveFlag(ref flags, SaveFlag.LastEquipped, this.m_LastEquipped); SetSaveFlag(ref flags, SaveFlag.SetEquipped, this.m_SetEquipped); #endregion writer.WriteEncodedInt((int)flags); if (GetSaveFlag(flags, SaveFlag.Attributes)) { this.m_Attributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.LowerAmmoCost)) { writer.Write((int)this.m_LowerAmmoCost); } if (GetSaveFlag(flags, SaveFlag.WeightReduction)) { writer.Write((int)this.m_WeightReduction); } if (GetSaveFlag(flags, SaveFlag.DamageIncrease)) { writer.Write((int)this.m_DamageIncrease); } if (GetSaveFlag(flags, SaveFlag.Crafter)) { writer.Write((Mobile)this.m_Crafter); } if (GetSaveFlag(flags, SaveFlag.Quality)) { writer.Write((int)this.m_Quality); } if (GetSaveFlag(flags, SaveFlag.Capacity)) { writer.Write((int)this.m_Capacity); } #region Mondain's Legacy Sets if (GetSaveFlag(flags, SaveFlag.SetAttributes)) { this.m_SetAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.SetSkillAttributes)) { this.m_SetSkillBonuses.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.SetHue)) { writer.Write((int)this.m_SetHue); } if (GetSaveFlag(flags, SaveFlag.LastEquipped)) { writer.Write((bool)this.m_LastEquipped); } if (GetSaveFlag(flags, SaveFlag.SetEquipped)) { writer.Write((bool)this.m_SetEquipped); } #endregion }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write(12); // version // Version 12 - removed VvV Item (handled in VvV System) and BlockRepair (Handled as negative attribute) writer.Write(m_SetPhysicalBonus); writer.Write(m_SetFireBonus); writer.Write(m_SetColdBonus); writer.Write(m_SetPoisonBonus); writer.Write(m_SetEnergyBonus); writer.Write(m_PlayerConstructed); m_TalismanProtection.Serialize(writer); writer.Write(_Owner); writer.Write(_OwnerName); //Version 7 writer.Write(m_IsImbued); // Version 6 m_NegativeAttributes.Serialize(writer); // Version 5 #region Region Reforging writer.Write((int)m_ReforgedPrefix); writer.Write((int)m_ReforgedSuffix); writer.Write((int)m_ItemPower); #endregion #region Stygian Abyss writer.Write(m_GorgonLenseCharges); writer.Write((int)m_GorgonLenseType); // Version 4 writer.WriteEncodedInt(m_TimesImbued); m_SAAbsorptionAttributes.Serialize(writer); #endregion writer.Write(m_BlessedBy); writer.Write(m_LastEquipped); writer.Write(m_SetEquipped); writer.WriteEncodedInt(m_SetHue); m_SetAttributes.Serialize(writer); m_SetSkillBonuses.Serialize(writer); writer.Write(m_Crafter); writer.Write((int)m_Quality); // Version 3 writer.WriteEncodedInt(m_MaxHitPoints); writer.WriteEncodedInt(m_HitPoints); writer.WriteEncodedInt((int)m_Resource); writer.WriteEncodedInt((int)m_GemType); m_AosAttributes.Serialize(writer); m_AosResistances.Serialize(writer); m_AosSkillBonuses.Serialize(writer); }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)1); // version SaveFlag flags = SaveFlag.None; SetSaveFlag(ref flags, SaveFlag.Attributes, !m_AosAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.ArmorAttributes, !m_AosArmorAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.Crafter, m_Crafter != null); SetSaveFlag(ref flags, SaveFlag.Quality, m_Quality != CraftQuality.Regular); SetSaveFlag(ref flags, SaveFlag.Resource, m_Resource != DefaultResource); SetSaveFlag(ref flags, SaveFlag.StrReq, m_StrReq != -1); SetSaveFlag(ref flags, SaveFlag.DexReq, m_DexReq != -1); SetSaveFlag(ref flags, SaveFlag.IntReq, m_IntReq != -1); SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty); SetSaveFlag(ref flags, SaveFlag.PlayerConstructed, m_PlayerConstructed != false); SetSaveFlag(ref flags, SaveFlag.BonusRandomAttributes, m_BonusRandomAttributes != null && m_BonusRandomAttributes.Length > 0); writer.WriteEncodedInt((int)flags); if (GetSaveFlag(flags, SaveFlag.Attributes)) { m_AosAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.ArmorAttributes)) { m_AosArmorAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.Crafter)) { writer.Write((Mobile)m_Crafter); } if (GetSaveFlag(flags, SaveFlag.Quality)) { writer.WriteEncodedInt((int)m_Quality); } if (GetSaveFlag(flags, SaveFlag.Resource)) { writer.WriteEncodedInt((int)m_Resource); } if (GetSaveFlag(flags, SaveFlag.StrReq)) { writer.WriteEncodedInt((int)m_StrReq); } if (GetSaveFlag(flags, SaveFlag.DexReq)) { writer.WriteEncodedInt((int)m_DexReq); } if (GetSaveFlag(flags, SaveFlag.IntReq)) { writer.WriteEncodedInt((int)m_IntReq); } if (GetSaveFlag(flags, SaveFlag.SkillBonuses)) { m_AosSkillBonuses.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.BonusRandomAttributes)) { writer.Write(m_BonusRandomAttributes.Length); for (int i = 0; i < m_BonusRandomAttributes.Length; i++) { m_BonusRandomAttributes[i].Serialize(writer); } } }
public override void Serialize(GenericWriter writer) { #region Ethics if (m_EthicState != null && m_EthicState.HasExpired) { m_EthicState.Detach(); } #endregion #region Factions if (m_FactionState != null && m_FactionState.HasExpired) { m_FactionState.Detach(); } #endregion base.Serialize(writer); writer.Write((int)5); // version SaveFlag flags = SaveFlag.None; SetSaveFlag(ref flags, SaveFlag.Resource, m_Resource != DefaultResource); SetSaveFlag(ref flags, SaveFlag.Attributes, !m_AosAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.ClothingAttributes, !m_AosClothingAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty); SetSaveFlag(ref flags, SaveFlag.Resistances, !m_AosResistances.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.Quality, m_Quality != ClothingQuality.Regular); SetSaveFlag(ref flags, SaveFlag.StrReq, m_StrReq != -1); SetSaveFlag(ref flags, SaveFlag.Identified, m_Identified != false); writer.WriteEncodedInt((int)flags); if (GetSaveFlag(flags, SaveFlag.Resource)) { writer.WriteEncodedInt((int)m_Resource); } if (GetSaveFlag(flags, SaveFlag.Attributes)) { m_AosAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.ClothingAttributes)) { m_AosClothingAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.SkillBonuses)) { m_AosSkillBonuses.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.Resistances)) { m_AosResistances.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.MaxHitPoints)) { writer.WriteEncodedInt((int)m_MaxHitPoints); } if (GetSaveFlag(flags, SaveFlag.HitPoints)) { writer.WriteEncodedInt((int)m_HitPoints); } if (GetSaveFlag(flags, SaveFlag.Crafter)) { writer.Write((Mobile)m_Crafter); } if (GetSaveFlag(flags, SaveFlag.Quality)) { writer.WriteEncodedInt((int)m_Quality); } if (GetSaveFlag(flags, SaveFlag.StrReq)) { writer.WriteEncodedInt((int)m_StrReq); } }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write(7); // version writer.Write(DonationClothing); writer.Write(Owner); writer.Write(m_IsRenamed); SaveFlag flags = SaveFlag.None; SetSaveFlag(ref flags, SaveFlag.Resource, m_Resource != DefaultResource); SetSaveFlag(ref flags, SaveFlag.Attributes, !m_AosAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.ClothingAttributes, !m_AosClothingAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty); SetSaveFlag(ref flags, SaveFlag.Resistances, !m_AosResistances.IsEmpty); SetSaveFlag(ref flags, SaveFlag.MaxHitPoints, m_MaxHitPoints != 0); SetSaveFlag(ref flags, SaveFlag.HitPoints, m_HitPoints != 0); SetSaveFlag(ref flags, SaveFlag.PlayerConstructed, m_PlayerConstructed); SetSaveFlag(ref flags, SaveFlag.Crafter, m_Crafter != null); SetSaveFlag(ref flags, SaveFlag.Quality, m_Quality != ClothingQuality.Regular); SetSaveFlag(ref flags, SaveFlag.StrReq, m_StrReq != -1); writer.WriteEncodedInt((int)flags); if (GetSaveFlag(flags, SaveFlag.Resource)) { writer.WriteEncodedInt((int)m_Resource); } if (GetSaveFlag(flags, SaveFlag.Attributes)) { m_AosAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.ClothingAttributes)) { m_AosClothingAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.SkillBonuses)) { m_AosSkillBonuses.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.Resistances)) { m_AosResistances.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.MaxHitPoints)) { writer.WriteEncodedInt(m_MaxHitPoints); } if (GetSaveFlag(flags, SaveFlag.HitPoints)) { writer.WriteEncodedInt(m_HitPoints); } if (GetSaveFlag(flags, SaveFlag.Crafter)) { writer.Write(m_Crafter); } if (GetSaveFlag(flags, SaveFlag.Quality)) { writer.WriteEncodedInt((int)m_Quality); } if (GetSaveFlag(flags, SaveFlag.StrReq)) { writer.WriteEncodedInt(m_StrReq); } }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)5); // version SaveFlag flags = SaveFlag.None; SetSaveFlag(ref flags, SaveFlag.SpellEffect, m_Effect != SpellEffect.None && m_EffectCharges > 0); SetSaveFlag(ref flags, SaveFlag.Resource, m_Resource != DefaultResource); SetSaveFlag(ref flags, SaveFlag.Attributes, !m_AosAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.ClothingAttributes, !m_AosClothingAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty); SetSaveFlag(ref flags, SaveFlag.Resistances, !m_AosResistances.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.Quality, m_Quality != ClothingQuality.Regular); SetSaveFlag(ref flags, SaveFlag.StrReq, m_StrReq != -1); writer.WriteEncodedInt((int)flags); if (GetSaveFlag(flags, SaveFlag.SpellEffect)) { writer.Write((bool)m_Identified); writer.WriteEncodedInt((int)m_Effect); writer.WriteEncodedInt((int)m_EffectCharges); } if (GetSaveFlag(flags, SaveFlag.Resource)) { writer.WriteEncodedInt((int)m_Resource); } if (GetSaveFlag(flags, SaveFlag.Attributes)) { m_AosAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.ClothingAttributes)) { m_AosClothingAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.SkillBonuses)) { m_AosSkillBonuses.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.Resistances)) { m_AosResistances.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.MaxHitPoints)) { writer.WriteEncodedInt((int)m_MaxHitPoints); } if (GetSaveFlag(flags, SaveFlag.HitPoints)) { writer.WriteEncodedInt((int)m_HitPoints); } if (GetSaveFlag(flags, SaveFlag.Crafter)) { writer.Write((Mobile)m_Crafter); } if (GetSaveFlag(flags, SaveFlag.Quality)) { writer.WriteEncodedInt((int)m_Quality); } if (GetSaveFlag(flags, SaveFlag.StrReq)) { writer.WriteEncodedInt((int)m_StrReq); } }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)6); // version #region Set Items SetFlag sflags = SetFlag.None; SetSaveFlag(ref sflags, SetFlag.Attributes, !m_SetAttributes.IsEmpty); SetSaveFlag(ref sflags, SetFlag.SkillBonuses, !m_SetSkillBonuses.IsEmpty); SetSaveFlag(ref sflags, SetFlag.SetHue, m_SetHue != 0); SetSaveFlag(ref sflags, SetFlag.LastEquipped, m_LastEquipped); SetSaveFlag(ref sflags, SetFlag.SetEquipped, m_SetEquipped); writer.WriteEncodedInt((int)sflags); if (GetSaveFlag(sflags, SetFlag.Attributes)) { m_SetAttributes.Serialize(writer); } if (GetSaveFlag(sflags, SetFlag.SkillBonuses)) { m_SetSkillBonuses.Serialize(writer); } if (GetSaveFlag(sflags, SetFlag.SetHue)) { writer.WriteEncodedInt((int)m_SetHue); } if (GetSaveFlag(sflags, SetFlag.LastEquipped)) { writer.Write((bool)m_LastEquipped); } if (GetSaveFlag(sflags, SetFlag.SetEquipped)) { writer.Write((bool)m_SetEquipped); } #endregion SaveFlag flags = SaveFlag.None; SetSaveFlag(ref flags, SaveFlag.Resource, m_Resource != DefaultResource); SetSaveFlag(ref flags, SaveFlag.Attributes, !m_AosAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.ClothingAttributes, !m_AosClothingAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty); SetSaveFlag(ref flags, SaveFlag.Resistances, !m_AosResistances.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.Quality, m_Quality != ClothingQuality.Regular); SetSaveFlag(ref flags, SaveFlag.StrReq, m_StrReq != -1); writer.WriteEncodedInt((int)flags); if (GetSaveFlag(flags, SaveFlag.Resource)) { writer.WriteEncodedInt((int)m_Resource); } if (GetSaveFlag(flags, SaveFlag.Attributes)) { m_AosAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.ClothingAttributes)) { m_AosClothingAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.SkillBonuses)) { m_AosSkillBonuses.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.Resistances)) { m_AosResistances.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.MaxHitPoints)) { writer.WriteEncodedInt((int)m_MaxHitPoints); } if (GetSaveFlag(flags, SaveFlag.HitPoints)) { writer.WriteEncodedInt((int)m_HitPoints); } if (GetSaveFlag(flags, SaveFlag.Crafter)) { writer.Write((Mobile)m_Crafter); } if (GetSaveFlag(flags, SaveFlag.Quality)) { writer.WriteEncodedInt((int)m_Quality); } if (GetSaveFlag(flags, SaveFlag.StrReq)) { writer.WriteEncodedInt((int)m_StrReq); } }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write((int)8); // version writer.WriteMobileList(m_Identified); SaveFlag flags = SaveFlag.None; SetSaveFlag(ref flags, SaveFlag.Attributes, !m_AosAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.ArmorAttributes, !m_AosArmorAttributes.IsEmpty); SetSaveFlag(ref flags, SaveFlag.PhysicalBonus, m_PhysicalBonus != 0); SetSaveFlag(ref flags, SaveFlag.FireBonus, m_FireBonus != 0); SetSaveFlag(ref flags, SaveFlag.ColdBonus, m_ColdBonus != 0); SetSaveFlag(ref flags, SaveFlag.PoisonBonus, m_PoisonBonus != 0); SetSaveFlag(ref flags, SaveFlag.EnergyBonus, m_EnergyBonus != 0); //SetSaveFlag( ref flags, SaveFlag.Identified, m_Identified != false ); SetSaveFlag(ref flags, SaveFlag.MaxHitPoints, m_MaxHitPoints != 0); SetSaveFlag(ref flags, SaveFlag.HitPoints, m_HitPoints != 0); SetSaveFlag(ref flags, SaveFlag.Crafter, m_Crafter != null); SetSaveFlag(ref flags, SaveFlag.Quality, m_Quality != CraftQuality.Regular); SetSaveFlag(ref flags, SaveFlag.Durability, m_Durability != DurabilityLevel.Regular); SetSaveFlag(ref flags, SaveFlag.Protection, m_Protection != ArmorProtectionLevel.Regular); SetSaveFlag(ref flags, SaveFlag.BaseArmor, m_ArmorBase != -1); SetSaveFlag(ref flags, SaveFlag.StrBonus, m_StrBonus != -1); SetSaveFlag(ref flags, SaveFlag.DexBonus, m_DexBonus != -1); SetSaveFlag(ref flags, SaveFlag.IntBonus, m_IntBonus != -1); SetSaveFlag(ref flags, SaveFlag.StrReq, m_StrReq != -1); SetSaveFlag(ref flags, SaveFlag.DexReq, m_DexReq != -1); SetSaveFlag(ref flags, SaveFlag.IntReq, m_IntReq != -1); SetSaveFlag(ref flags, SaveFlag.MedAllowance, m_Meditate != (AMA)(-1)); SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty); SetSaveFlag(ref flags, SaveFlag.PlayerConstructed, m_PlayerConstructed != false); writer.WriteEncodedInt((int)flags); if (GetSaveFlag(flags, SaveFlag.Attributes)) { m_AosAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.ArmorAttributes)) { m_AosArmorAttributes.Serialize(writer); } if (GetSaveFlag(flags, SaveFlag.PhysicalBonus)) { writer.WriteEncodedInt((int)m_PhysicalBonus); } if (GetSaveFlag(flags, SaveFlag.FireBonus)) { writer.WriteEncodedInt((int)m_FireBonus); } if (GetSaveFlag(flags, SaveFlag.ColdBonus)) { writer.WriteEncodedInt((int)m_ColdBonus); } if (GetSaveFlag(flags, SaveFlag.PoisonBonus)) { writer.WriteEncodedInt((int)m_PoisonBonus); } if (GetSaveFlag(flags, SaveFlag.EnergyBonus)) { writer.WriteEncodedInt((int)m_EnergyBonus); } if (GetSaveFlag(flags, SaveFlag.MaxHitPoints)) { writer.WriteEncodedInt((int)m_MaxHitPoints); } if (GetSaveFlag(flags, SaveFlag.HitPoints)) { writer.WriteEncodedInt((int)m_HitPoints); } if (GetSaveFlag(flags, SaveFlag.Crafter)) { writer.Write((Mobile)m_Crafter); } if (GetSaveFlag(flags, SaveFlag.Quality)) { writer.WriteEncodedInt((int)m_Quality); } if (GetSaveFlag(flags, SaveFlag.Durability)) { writer.WriteEncodedInt((int)m_Durability); } if (GetSaveFlag(flags, SaveFlag.Protection)) { writer.WriteEncodedInt((int)m_Protection); } if (GetSaveFlag(flags, SaveFlag.BaseArmor)) { writer.WriteEncodedInt((int)m_ArmorBase); } if (GetSaveFlag(flags, SaveFlag.StrBonus)) { writer.WriteEncodedInt((int)m_StrBonus); } if (GetSaveFlag(flags, SaveFlag.DexBonus)) { writer.WriteEncodedInt((int)m_DexBonus); } if (GetSaveFlag(flags, SaveFlag.IntBonus)) { writer.WriteEncodedInt((int)m_IntBonus); } if (GetSaveFlag(flags, SaveFlag.StrReq)) { writer.WriteEncodedInt((int)m_StrReq); } if (GetSaveFlag(flags, SaveFlag.DexReq)) { writer.WriteEncodedInt((int)m_DexReq); } if (GetSaveFlag(flags, SaveFlag.IntReq)) { writer.WriteEncodedInt((int)m_IntReq); } if (GetSaveFlag(flags, SaveFlag.MedAllowance)) { writer.WriteEncodedInt((int)m_Meditate); } if (GetSaveFlag(flags, SaveFlag.SkillBonuses)) { m_AosSkillBonuses.Serialize(writer); } }