public virtual void Serialize(BigEndianWriter writer) { writer.WriteDouble(experience); writer.WriteDouble(experienceLevelFloor); writer.WriteDouble(experienceNextLevelFloor); writer.WriteInt(kamas); writer.WriteInt(statsPoints); writer.WriteInt(spellsPoints); alignmentInfos.Serialize(writer); writer.WriteInt(lifePoints); writer.WriteInt(maxLifePoints); writer.WriteShort(energyPoints); writer.WriteShort(maxEnergyPoints); writer.WriteShort(actionPointsCurrent); writer.WriteShort(movementPointsCurrent); initiative.Serialize(writer); prospecting.Serialize(writer); actionPoints.Serialize(writer); movementPoints.Serialize(writer); strength.Serialize(writer); vitality.Serialize(writer); wisdom.Serialize(writer); chance.Serialize(writer); agility.Serialize(writer); intelligence.Serialize(writer); range.Serialize(writer); summonableCreaturesBoost.Serialize(writer); reflect.Serialize(writer); criticalHit.Serialize(writer); writer.WriteShort(criticalHitWeapon); criticalMiss.Serialize(writer); healBonus.Serialize(writer); allDamagesBonus.Serialize(writer); weaponDamagesBonusPercent.Serialize(writer); damagesBonusPercent.Serialize(writer); trapBonus.Serialize(writer); trapBonusPercent.Serialize(writer); permanentDamagePercent.Serialize(writer); tackleBlock.Serialize(writer); tackleEvade.Serialize(writer); PAAttack.Serialize(writer); PMAttack.Serialize(writer); pushDamageBonus.Serialize(writer); criticalDamageBonus.Serialize(writer); neutralDamageBonus.Serialize(writer); earthDamageBonus.Serialize(writer); waterDamageBonus.Serialize(writer); airDamageBonus.Serialize(writer); fireDamageBonus.Serialize(writer); dodgePALostProbability.Serialize(writer); dodgePMLostProbability.Serialize(writer); neutralElementResistPercent.Serialize(writer); earthElementResistPercent.Serialize(writer); waterElementResistPercent.Serialize(writer); airElementResistPercent.Serialize(writer); fireElementResistPercent.Serialize(writer); neutralElementReduction.Serialize(writer); earthElementReduction.Serialize(writer); waterElementReduction.Serialize(writer); airElementReduction.Serialize(writer); fireElementReduction.Serialize(writer); pushDamageReduction.Serialize(writer); criticalDamageReduction.Serialize(writer); pvpNeutralElementResistPercent.Serialize(writer); pvpEarthElementResistPercent.Serialize(writer); pvpWaterElementResistPercent.Serialize(writer); pvpAirElementResistPercent.Serialize(writer); pvpFireElementResistPercent.Serialize(writer); pvpNeutralElementReduction.Serialize(writer); pvpEarthElementReduction.Serialize(writer); pvpWaterElementReduction.Serialize(writer); pvpAirElementReduction.Serialize(writer); pvpFireElementReduction.Serialize(writer); writer.WriteUShort((ushort)spellModifications.Length); foreach (var entry in spellModifications) { entry.Serialize(writer); } writer.WriteInt(probationTime); }
public virtual void Serialize(IDataWriter writer) { writer.WriteVarLong(experience); writer.WriteVarLong(experienceLevelFloor); writer.WriteVarLong(experienceNextLevelFloor); writer.WriteVarLong(experienceBonusLimit); writer.WriteVarLong(kamas); writer.WriteVarShort(statsPoints); writer.WriteVarShort(additionnalPoints); writer.WriteVarShort(spellsPoints); alignmentInfos.Serialize(writer); writer.WriteVarInt(lifePoints); writer.WriteVarInt(maxLifePoints); writer.WriteVarShort(energyPoints); writer.WriteVarShort(maxEnergyPoints); writer.WriteVarShort(actionPointsCurrent); writer.WriteVarShort(movementPointsCurrent); initiative.Serialize(writer); prospecting.Serialize(writer); actionPoints.Serialize(writer); movementPoints.Serialize(writer); strength.Serialize(writer); vitality.Serialize(writer); wisdom.Serialize(writer); chance.Serialize(writer); agility.Serialize(writer); intelligence.Serialize(writer); range.Serialize(writer); summonableCreaturesBoost.Serialize(writer); reflect.Serialize(writer); criticalHit.Serialize(writer); writer.WriteVarShort(criticalHitWeapon); criticalMiss.Serialize(writer); healBonus.Serialize(writer); allDamagesBonus.Serialize(writer); weaponDamagesBonusPercent.Serialize(writer); damagesBonusPercent.Serialize(writer); trapBonus.Serialize(writer); trapBonusPercent.Serialize(writer); glyphBonusPercent.Serialize(writer); runeBonusPercent.Serialize(writer); permanentDamagePercent.Serialize(writer); tackleBlock.Serialize(writer); tackleEvade.Serialize(writer); PAAttack.Serialize(writer); PMAttack.Serialize(writer); pushDamageBonus.Serialize(writer); criticalDamageBonus.Serialize(writer); neutralDamageBonus.Serialize(writer); earthDamageBonus.Serialize(writer); waterDamageBonus.Serialize(writer); airDamageBonus.Serialize(writer); fireDamageBonus.Serialize(writer); dodgePALostProbability.Serialize(writer); dodgePMLostProbability.Serialize(writer); neutralElementResistPercent.Serialize(writer); earthElementResistPercent.Serialize(writer); waterElementResistPercent.Serialize(writer); airElementResistPercent.Serialize(writer); fireElementResistPercent.Serialize(writer); neutralElementReduction.Serialize(writer); earthElementReduction.Serialize(writer); waterElementReduction.Serialize(writer); airElementReduction.Serialize(writer); fireElementReduction.Serialize(writer); pushDamageReduction.Serialize(writer); criticalDamageReduction.Serialize(writer); pvpNeutralElementResistPercent.Serialize(writer); pvpEarthElementResistPercent.Serialize(writer); pvpWaterElementResistPercent.Serialize(writer); pvpAirElementResistPercent.Serialize(writer); pvpFireElementResistPercent.Serialize(writer); pvpNeutralElementReduction.Serialize(writer); pvpEarthElementReduction.Serialize(writer); pvpWaterElementReduction.Serialize(writer); pvpAirElementReduction.Serialize(writer); pvpFireElementReduction.Serialize(writer); meleeDamageDonePercent.Serialize(writer); meleeDamageReceivedPercent.Serialize(writer); rangedDamageDonePercent.Serialize(writer); rangedDamageReceivedPercent.Serialize(writer); weaponDamageDonePercent.Serialize(writer); weaponDamageReceivedPercent.Serialize(writer); spellDamageDonePercent.Serialize(writer); spellDamageReceivedPercent.Serialize(writer); var spellModifications_before = writer.Position; var spellModifications_count = 0; writer.WriteShort(0); foreach (var entry in spellModifications) { entry.Serialize(writer); spellModifications_count++; } var spellModifications_after = writer.Position; writer.Seek((int)spellModifications_before); writer.WriteShort((short)spellModifications_count); writer.Seek((int)spellModifications_after); writer.WriteInt(probationTime); }