public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 17 ); // version
writer.Write( (int)m_CurrentAI );
writer.Write( (int)m_DefaultAI );
writer.Write( (int)m_iRangePerception );
writer.Write( (int)m_iRangeFight );
writer.Write( (int)m_iTeam );
writer.Write( (double)m_dActiveSpeed );
writer.Write( (double)m_dPassiveSpeed );
writer.Write( (double)m_dCurrentSpeed );
writer.Write( (int) m_pHome.X );
writer.Write( (int) m_pHome.Y );
writer.Write( (int) m_pHome.Z );
// Version 1
writer.Write( (int) m_iRangeHome );
int i=0;
writer.Write( (int) m_arSpellAttack.Count );
for ( i=0; i< m_arSpellAttack.Count; i++ )
{
writer.Write( m_arSpellAttack[i].ToString() );
}
writer.Write( (int) m_arSpellDefense.Count );
for ( i=0; i< m_arSpellDefense.Count; i++ )
{
writer.Write( m_arSpellDefense[i].ToString() );
}
// Version 2
writer.Write( (int) m_FightMode );
writer.Write( (bool) m_bControlled );
writer.Write( (Mobile) m_ControlMaster );
writer.Write( (Mobile) m_ControlTarget );
writer.Write( (Point3D) m_ControlDest );
writer.Write( (int) m_ControlOrder );
writer.Write( (double) m_dMinTameSkill );
// Removed in version 9
//writer.Write( (double) m_dMaxTameSkill );
writer.Write( (bool) m_bTamable );
writer.Write( (bool) m_bSummoned );
if ( m_bSummoned )
writer.WriteDeltaTime( m_SummonEnd );
writer.Write( (int) m_iControlSlots );
// Version 3
writer.Write( (int)m_Loyalty );
// Version 4
writer.Write( m_CurrentWayPoint );
// Verison 5
writer.Write( m_SummonMaster );
// Version 6
writer.Write( (int) m_HitsMax );
writer.Write( (int) m_StamMax );
writer.Write( (int) m_ManaMax );
writer.Write( (int) m_DamageMin );
writer.Write( (int) m_DamageMax );
// Version 7
writer.Write( (int) m_PhysicalResistance );
writer.Write( (int) m_PhysicalDamage );
writer.Write( (int) m_FireResistance );
writer.Write( (int) m_FireDamage );
writer.Write( (int) m_ColdResistance );
writer.Write( (int) m_ColdDamage );
writer.Write( (int) m_PoisonResistance );
writer.Write( (int) m_PoisonDamage );
writer.Write( (int) m_EnergyResistance );
writer.Write( (int) m_EnergyDamage );
// Version 8
writer.Write( m_Owners, true );
// Version 10
writer.Write( (bool) m_IsDeadPet );
writer.Write( (bool) m_IsBonded );
writer.Write( (DateTime) m_BondingBegin );
writer.Write( (DateTime) m_OwnerAbandonTime );
// Version 11
writer.Write( (bool) m_HasGeneratedLoot );
// Version 12
writer.Write( (bool) m_Paragon );
// Version 13
writer.Write( (bool) ( m_Friends != null && m_Friends.Count > 0 ) );
if ( m_Friends != null && m_Friends.Count > 0 )
writer.Write( m_Friends, true );
// Version 14
writer.Write( (bool)m_RemoveIfUntamed );
writer.Write( (int)m_RemoveStep );
// Version 17 FS:ATS EDITS
writer.Write( (bool) m_IsMating );
writer.Write( (int) m_ABPoints );
writer.Write( (int) m_Exp );
writer.Write( (int) m_NextLevel );
writer.Write( (int) m_Level );
writer.Write( (int) m_MaxLevel );
writer.Write( (bool) m_AllowMating );
writer.Write( (bool) m_Evolves );
writer.Write( (int) m_Gen );
writer.Write( (DateTime) m_MatingDelay );
writer.Write( (int) m_Form1 );
writer.Write( (int) m_Form2 );
writer.Write( (int) m_Form3 );
writer.Write( (int) m_Form4 );
writer.Write( (int) m_Form5 );
writer.Write( (int) m_Form6 );
writer.Write( (int) m_Form7 );
writer.Write( (int) m_Form8 );
writer.Write( (int) m_Form9 );
writer.Write( (int) m_Sound1 );
writer.Write( (int) m_Sound2 );
writer.Write( (int) m_Sound3 );
writer.Write( (int) m_Sound4 );
writer.Write( (int) m_Sound5 );
writer.Write( (int) m_Sound6 );
writer.Write( (int) m_Sound7 );
writer.Write( (int) m_Sound8 );
writer.Write( (int) m_Sound9 );
writer.Write( (bool) m_UsesForm1 );
writer.Write( (bool) m_UsesForm2 );
writer.Write( (bool) m_UsesForm3 );
writer.Write( (bool) m_UsesForm4 );
writer.Write( (bool) m_UsesForm5 );
writer.Write( (bool) m_UsesForm6 );
writer.Write( (bool) m_UsesForm7 );
writer.Write( (bool) m_UsesForm8 );
writer.Write( (bool) m_UsesForm9 );
writer.Write( (bool) m_F0 );
writer.Write( (bool) m_F1 );
writer.Write( (bool) m_F2 );
writer.Write( (bool) m_F3 );
writer.Write( (bool) m_F4 );
writer.Write( (bool) m_F5 );
writer.Write( (bool) m_F6 );
writer.Write( (bool) m_F7 );
writer.Write( (bool) m_F8 );
writer.Write( (bool) m_F9 );
writer.Write( (int) m_RoarAttack );
writer.Write( (int) m_PetPoisonAttack );
writer.Write( (int) m_FireBreathAttack );
}