public int GetJXP(NpcMonster monster, Group group)
{
int partySize = 1;
double partyPenalty = 1d;
if (group != null)
{
int levelSum = group.Characters.Sum(g => g.Character.Level);
partySize = group.CharacterCount;
partyPenalty = 12 / partySize / (double)levelSum;
}
// monster jobxp / penalty * rate
int jobxp = (int)Math.Round(monster.JobXP * CharacterHelper.ExperiencePenalty(Level, monster.Level) * ServerManager.XPRate);
// divide jobexp by multiplication of partyPenalty with level e.g. 57 * 0,014...
if (partySize > 1 && group != null)
{
jobxp = (int)Math.Round(jobxp / (Level * partyPenalty));
}
return jobxp;
}