public void SavePlayerInfo()
{
//Wrap our function inside a catcher
try
{
MsSQL.UpdateData("update character set min_phyatk='" + Convert.ToInt32(Math.Round(Character.Stat.MinPhyAttack)) +
"', max_phyatk='" + Convert.ToInt32(Math.Round(Character.Stat.MaxPhyAttack)) +
"', min_magatk='" + Convert.ToInt32(Math.Round(Character.Stat.MinMagAttack)) +
"', max_magatk='" + Convert.ToInt32(Math.Round(Character.Stat.MaxMagAttack)) +
"', phydef='" + Convert.ToInt32(Math.Round(Character.Stat.PhyDef - Character.Stat.uPhyDef)) +
"', magdef='" + Convert.ToInt32(Math.Round(Character.Stat.MagDef - Character.Stat.uMagDef)) +
"', hit='" + Convert.ToInt16(Math.Round(Character.Stat.Hit)) +
"', parry='" + Convert.ToInt16(Math.Round(Character.Stat.Parry)) +
"', hp='" + Character.Stat.Hp +
"', mp='" + Character.Stat.Mp +
"', s_hp='" + Character.Stat.SecondHp +
"', s_mp='" + Character.Stat.SecondMP +
"', attribute='" + Character.Information.Attributes +
"', strength='" + Character.Stat.Strength +
"', intelligence='" + Character.Stat.Intelligence +
"', experience='" + Convert.ToInt64(Character.Information.XP) +
"', spbar='" + Character.Information.SpBar +
"', sp='" + Character.Information.SkillPoint +
"', level='" + Character.Information.Level +
"', mag_absord='" + Character.Stat.mag_Absorb +
"', phy_absord='" + Character.Stat.phy_Absorb +
"' where id='" + Character.Information.CharacterID + "'");
//Save guid information
SaveGuideInfo();
}
catch (Exception ex)
{
Console.WriteLine("Saving player error: {0}", ex);
Systems.Debugger.Write(ex);
}
}