Keep a money basis for party members at max level without master quest
AwardExperienceAsync returned 0 for a character at the maximum level which has not completed the master quest: it gains neither normal nor master experience. Since the money of a kill is now derived from those returned values, such a member got no zen at all in a party, while the same character still earns zen when killing solo - AddExpAfterKillAsync returns the calculated amount there, regardless of whether it could be applied. The normal experience is now always calculated and returned, and only awarded when the character can still gain it. (cherry picked from commit 7cdb34b7c58f5924427b97ea17f26c3fe0f37719)
This commit is contained in:
@@ -388,19 +388,20 @@ public sealed class Party : AsyncDisposable
|
||||
return exp;
|
||||
}
|
||||
|
||||
var normalExperience = (int)(perLevel
|
||||
* attributes[Stats.Level]
|
||||
* player.GameContext.ExperienceRate
|
||||
* (attributes[Stats.ExperienceRate] + attributes[Stats.BonusExperienceRate]));
|
||||
|
||||
if (!isAtMaxLevel)
|
||||
{
|
||||
var exp = (int)(perLevel
|
||||
* attributes[Stats.Level]
|
||||
* player.GameContext.ExperienceRate
|
||||
* (attributes[Stats.ExperienceRate] + attributes[Stats.BonusExperienceRate]));
|
||||
|
||||
await player.AddExperienceAsync(exp, killed).ConfigureAwait(false);
|
||||
return exp;
|
||||
await player.AddExperienceAsync(normalExperience, killed).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
// Player is at max level but has not completed master quest. No experience awarded.
|
||||
return 0;
|
||||
// At the maximum level without the master quest no experience is awarded, but the amount is
|
||||
// still returned: the money drop is derived from it, and a solo kill returns it as well
|
||||
// (see Player.AddExpAfterKillAsync), so such a member must not end up without any money.
|
||||
return normalExperience;
|
||||
}
|
||||
|
||||
private async ValueTask ExitPartyAsync(IPartyMember member, byte index)
|
||||
|
||||
Reference in New Issue
Block a user