private void CalculateFame()
{
var newFame = 0;
if (Experience < 200*1000) newFame = Experience/1000;
else newFame = 200 + (Experience - 200*1000)/1000;
if (newFame != Fame)
{
Owner.BroadcastPacket(new NotificationPacket
{
ObjectId = Id,
Color = new ARGB(0xFFFF6600),
Text = "+" + (newFame - Fame) + " Fame"
}, null);
Fame = newFame;
int newGoal;
var state = psr.Account.Stats.ClassStates.SingleOrDefault(_ => _.ObjectType == ObjectType);
if (state != null && state.BestFame > Fame)
newGoal = GetFameGoal(state.BestFame);
else
newGoal = GetFameGoal(Fame);
if (newGoal > FameGoal)
{
Owner.BroadcastPacket(new NotificationPacket
{
ObjectId = Id,
Color = new ARGB(0xFF00FF00),
Text = "Class Quest Complete!"
}, null);
Stars = GetStars();
}
FameGoal = newGoal;
UpdateCount++;
}
}