To mimic EQlive, any level persons may group together, however those who are not at least
MaxLevel * (2/3) or
MaxLevel / 1.5 if you prefer, are awarded no experience.
(To be even more nitpicky, the MaxLevel only applies to those who took part in the battle and remain in the group at the end of a fight. If a level 5 is grouped with a level 65 and kills a large rat by himself, he gets exp. Similarly, if a level 5 is grouped with a level 65 and the level 65 participates in the battle, but does less than 50% damage and disbands before the mob is dead, the level 5 still gets experience.)
It would seem that instead of denying the ability to group to those outside of +/- 6 levels, you may want to look in
groups.cpp (under zone source) around this area:
Code:
void Group::SplitExp(uint32 exp, int16 otherlevel)
If I'm reading it correctly, the function calculates 1.) the highest level group member, 2.) the total group exp (exp * zone bonus * number of members) before it goes into distributing it.
It seems to then go through iterations finding how far from the max level each group member is before distributing:
Code:
sint16 diff = members[i]->GetLevel() - maxlevel;
if (diff >= -8) /*Instead of person who killed the mob, the person who has the highest level in the group*/
{ /*addexpglop */ }
Could you not change it to something like:
Code:
if (members[i]->GetLevel() >= (int)((double)maxlevel / 1.5))
{ /* addexpglop */ }
So that it would distribute the exp to only members whose level is within appropriate range?
I may be off base, maybe this breaks something elsewhere or just doesn't work, hehe.