Hi I just share what I did to remove the multiplication of group exp.
This article is precisely for remove this multiplication,
it is used to group or all alone is the same rate exp.
change
by
This article is precisely for remove this multiplication,
it is used to group or all alone is the same rate exp.
change
Code:
private int GetXP(NpcMonsterDTO monster, Group group) //Level xp
{
int partySize = 1;
double partyPenalty = 1d;
int levelDifference = Level - monster.Level;
if (group != null)
{
int levelSum = group.Characters.Sum(g => g.Character.Level);
partySize = group.CharacterCount;
partyPenalty = (6f / partySize) / levelSum;
}
int xpcalculation = levelDifference < 15 ? monster.XP : monster.XP / 3 * 2;
int xp = (int)Math.Round(xpcalculation * CharacterHelper.ExperiencePenalty(Level, monster.Level) * ServerManager.Instance.Configuration.RateXP * MapInstance.XpRate);
if (partySize > 1 && group != null)
{
xp = (int)Math.Round(xp / (Level * partyPenalty));
}
return xp;
}
Code:
private int GetXP(NpcMonsterDTO monster, Group group) //Level xp
{
int levelDifference = Level - monster.Level;
if (group != null)
{
int levelSum = group.Characters.Sum(g => g.Character.Level);
}
int xpcalculation = levelDifference < 15 ? monster.XP : monster.XP / 3 * 2;
int xp = (int)Math.Round(xpcalculation * CharacterHelper.ExperiencePenalty(Level, monster.Level) * ServerManager.Instance.Configuration.RateXP * MapInstance.XpRate);
return xp;
}