diff options
-rw-r--r-- | src/server/game/Quests/QuestDef.cpp | 10 | ||||
-rw-r--r-- | src/server/game/Quests/QuestDef.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Quests/QuestDef.cpp b/src/server/game/Quests/QuestDef.cpp index 7ab774a0a64..303d8ad9651 100644 --- a/src/server/game/Quests/QuestDef.cpp +++ b/src/server/game/Quests/QuestDef.cpp @@ -391,21 +391,21 @@ void Quest::LoadConditionalConditionalQuestCompletionLog(Field* fields) uint32 Quest::XPValue(Player const* player) const { - return XPValue(player, 0, _rewardXPDifficulty, _rewardXPMultiplier, _expansion); + return XPValue(player, _level, _rewardXPDifficulty, _rewardXPMultiplier, _expansion); } -uint32 Quest::XPValue(Player const* player, uint32 /*contentTuningId*/, uint32 xpDifficulty, float xpMultiplier /*= 1.0f*/, int32 expansion /*= -1*/) +uint32 Quest::XPValue(Player const* player, int32 questLevel, uint32 xpDifficulty, float xpMultiplier /*= 1.0f*/, int32 expansion /*= -1*/) { if (player) { - uint32 questLevel = 0; // player->GetQuestLevel(contentTuningId); - QuestXPEntry const* questXp = sQuestXPStore.LookupEntry(questLevel); + uint32 effectiveQuestLevel = questLevel == -1 ? player->GetLevel() : questLevel; + QuestXPEntry const* questXp = sQuestXPStore.LookupEntry(effectiveQuestLevel); if (!questXp || xpDifficulty >= 10) return 0; uint32 xp = questXp->Difficulty[xpDifficulty]; - int32 diffFactor = 2 * (questLevel - player->GetLevel()) + 12; + int32 diffFactor = 2 * (effectiveQuestLevel - player->GetLevel()) + 20; if (diffFactor < 1) diffFactor = 1; else if (diffFactor > 10) diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index 8bb56951402..113917e6067 100644 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -532,7 +532,7 @@ class TC_GAME_API Quest void LoadConditionalConditionalQuestCompletionLog(Field* fields); uint32 XPValue(Player const* player) const; - static uint32 XPValue(Player const* player, uint32 contentTuningId, uint32 xpDifficulty, float xpMultiplier = 1.0f, int32 expansion = -1); + static uint32 XPValue(Player const* player, int32 questLevel, uint32 xpDifficulty, float xpMultiplier = 1.0f, int32 expansion = -1); uint32 MoneyValue(Player const* player) const; uint32 MaxMoneyValue() const; uint32 GetMaxMoneyReward() const; |