protected void SetBalance()
{
//Wrap our function inside a catcher
try
{
//Set maxstats info
int maxstat = 28 + Character.Information.Level * 4;
//Set physical and magical balance
Character.Information.Phy_Balance = (byte)(99 - (100 * 2 / 3 * (maxstat - Character.Stat.Strength) / maxstat));
Character.Information.Mag_Balance = (byte)(100 * Character.Stat.Intelligence / maxstat);
}
catch (Exception ex)
{
Console.WriteLine("Set balance error {0}", ex);
Systems.Debugger.Write(ex);
}
}