Fix Vanilla quest XP values, support modified Quest XP Rate

This commit is contained in:
郑佩茹
2022-08-31 12:22:44 -06:00
parent 83e6a8d289
commit 72cbe4fdf9
2 changed files with 4284 additions and 4280 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -494,7 +494,7 @@ public:
}
}
void OnQuestComputeXP(Player* /*player*/, Quest const* quest, uint32& xpValue) override
void OnQuestComputeXP(Player* player, Quest const* quest, uint32& xpValue) override
{
if (!enabled || !questXpFix)
{
@@ -503,6 +503,10 @@ public:
if (questXpMap.count(quest->GetQuestId()))
{
uint32 vanillaXpValue = questXpMap[quest->GetQuestId()];
if (player)
{
vanillaXpValue *= player->GetQuestRate();
}
// If XP was already reduced due to out-leveling the quest or other reasons, use the reduced value
if (vanillaXpValue < xpValue)
{