From bb45ca7a04bcdb2c1638eed5d938c0ec620f0e3a Mon Sep 17 00:00:00 2001 From: Alvin Zhu Date: Fri, 27 Jan 2023 20:57:18 +0800 Subject: [PATCH] fix OnQuestComputeXP --- src/IndividualProgressionPlayer.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/IndividualProgressionPlayer.cpp b/src/IndividualProgressionPlayer.cpp index 06e35e5..293fc9f 100644 --- a/src/IndividualProgressionPlayer.cpp +++ b/src/IndividualProgressionPlayer.cpp @@ -113,13 +113,8 @@ public: uint32 vanillaXpValue = sIndividualProgression->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) - { - // Otherwise, return the correct Vanilla/TBC Quest XP - xpValue = vanillaXpValue; + uint32 originalXpValue = quest->XPValue(quest->GetQuestLevel() == -1 ? player->GetLevel() : quest->GetQuestLevel()); + xpValue *= vanillaXpValue * 1.0 / originalXpValue; } } }