Treat quests as max level for money calculation when at progression stage cap

This commit is contained in:
郑佩茹
2022-09-15 10:29:24 -06:00
parent 7100604d6a
commit 96f207b628
2 changed files with 29 additions and 2 deletions

View File

@@ -202,3 +202,17 @@ IndividualProgression.SimpleConfigOverride = 1
#
IndividualProgression.StartingProgression = 0
#
# IndividualProgression.QuestMoneyAtLevelCap
# Description: If enabled, players at the level cap for the current progression stage will receive
# extra money when completing quests, as if they were level 80. This feature was added in patch 1.10
# so it is a Vanilla feature.
# Disable to not grant extra money at progression stage level cap. (Please note that completing quests at the level cap of the server,
# configured in worldserver.conf will always provide extra money, as hard-coded in AzerothCore.)
#
# Default: 1 - Enabled
# 0 - Disabled
#
#
IndividualProgression.QuestMoneyAtLevelCap = 1

View File

@@ -5,7 +5,7 @@
#include "IndividualProgression.h"
static float vanillaPowerAdjustment, vanillaHealthAdjustment, tbcPowerAdjustment, tbcHealthAdjustment, vanillaHealingAdjustment, tbcHealingAdjustment, previousGearTuning;
static bool enabled, questXpFix, hunterPetLevelFix, requirePreAQQuests, enforceGroupRules, fishingFix, simpleConfigOverride;
static bool enabled, questXpFix, hunterPetLevelFix, requirePreAQQuests, enforceGroupRules, fishingFix, simpleConfigOverride, questMoneyAtLevelCap;
static int progressionLimit, startingProgression;
static questXpMapType questXpMap;
@@ -187,6 +187,7 @@ private:
previousGearTuning = sConfigMgr->GetOption<float>("IndividualProgression.PreviousGearTuning", 0.03);
progressionLimit = sConfigMgr->GetOption<uint8>("IndividualProgression.ProgressionLimit", 0);
startingProgression = sConfigMgr->GetOption<uint8>("IndividualProgression.StartingProgression", 0);
questMoneyAtLevelCap = sConfigMgr->GetOption<bool>("IndividualProgression.QuestMoneyAtLevelCap", true);
}
void LoadXpValues()
@@ -500,6 +501,18 @@ public:
CheckAdjustments(player);
}
bool ShouldBeRewardedWithMoneyInsteadOfExp(Player* player) override
{
if (!questMoneyAtLevelCap)
{
return false;
}
// Player is still in Vanilla content - give money at 60 level cap
return ((!hasPassedProgression(player, PROGRESSION_NAXX40) && player->getLevel() == 60) ||
// Player is in TBC content - give money at 70 level cap
(!hasPassedProgression(player, PROGRESSION_TBC_TIER_5) && player->getLevel() == 70));
}
void OnAfterUpdateMaxHealth(Player* player, float& value) override
{
// TODO: This should be adjust to use an aura like damage adjustment. This is more robust to update when changing equipment, etc.