aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Quests/QuestDef.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-05-04 17:00:52 +0200
committerShauren <shauren.trinity@gmail.com>2023-05-04 17:00:52 +0200
commit16bc74667e8996b64258718e95b97258dfc0217a (patch)
tree20c19a6ecd393c55608f2be2f94a74fab2c1b6f1 /src/server/game/Quests/QuestDef.cpp
parent64f8693751090bd28e6dc840a2c218c3c609fcf8 (diff)
Core: Update to 10.1
Diffstat (limited to 'src/server/game/Quests/QuestDef.cpp')
-rw-r--r--src/server/game/Quests/QuestDef.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp
index 2eb08ff9862..542bce38d3a 100644
--- a/src/server/game/Quests/QuestDef.cpp
+++ b/src/server/game/Quests/QuestDef.cpp
@@ -369,13 +369,17 @@ uint32 Quest::XPValue(Player const* player, uint32 contentTuningId, uint32 xpDif
if (!questXp || xpDifficulty >= 10)
return 0;
+ uint32 xp = questXp->Difficulty[xpDifficulty];
+ if (ContentTuningEntry const* contentTuning = sContentTuningStore.LookupEntry(contentTuningId))
+ xp = xp * contentTuning->QuestXpMultiplier;
+
int32 diffFactor = 2 * (questLevel - player->GetLevel()) + 12;
if (diffFactor < 1)
diffFactor = 1;
else if (diffFactor > 10)
diffFactor = 10;
- uint32 xp = diffFactor * questXp->Difficulty[xpDifficulty] * xpMultiplier / 10;
+ xp = diffFactor * xp * xpMultiplier / 10;
if (player->GetLevel() >= GetMaxLevelForExpansion(CURRENT_EXPANSION - 1) && player->GetSession()->GetExpansion() == CURRENT_EXPANSION && expansion >= 0 && expansion < CURRENT_EXPANSION)
xp = uint32(xp / 9.0f);