Add config option for DK Starting Progression

This commit is contained in:
郑佩茹
2022-09-19 16:44:33 -06:00
parent 012866d6f1
commit 27623d0b41
4 changed files with 16 additions and 2 deletions

View File

@@ -258,3 +258,13 @@ IndividualProgression.TbcRacesUnlockProgression = 0
#
IndividualProgression.DeathKnightUnlockProgression = 11
#
# IndividualProgression.DeathKnightStartingProgression
# Description: The progression level at which Death Knight characters will begin.
#
# Default: 11 - Death Knights start at the beginning of WotLK
# 0-16 - Progression level
#
#
IndividualProgression.DeathKnightStartingProgression = 11

View File

@@ -3,7 +3,6 @@
*/
#include "IndividualProgression.h"
#include "Tokenize.h"
IndividualProgression* IndividualProgression::instance()
{
@@ -235,6 +234,7 @@ private:
sIndividualProgression->repeatableVanillaQuestsXp = sConfigMgr->GetOption<bool>("IndividualProgression.RepeatableVanillaQuestsXP", true);
sIndividualProgression->tbcRacesProgressionLevel = sConfigMgr->GetOption<uint8>("IndividualProgression.TbcRacesUnlockProgression", 0);
sIndividualProgression->deathKnightProgressionLevel = sConfigMgr->GetOption<uint8>("IndividualProgression.DeathKnightUnlockProgression", 11);
sIndividualProgression->deathKnightStartingProgression = sConfigMgr->GetOption<uint8>("IndividualProgression.DeathKnightStartingProgression", 11);
}
static void LoadXpValues()

View File

@@ -120,7 +120,7 @@ public:
questXpMapType questXpMap;
float vanillaPowerAdjustment, vanillaHealthAdjustment, tbcPowerAdjustment, tbcHealthAdjustment, vanillaHealingAdjustment, tbcHealingAdjustment, previousGearTuning;
bool enabled, questXpFix, hunterPetLevelFix, requirePreAQQuests, enforceGroupRules, fishingFix, simpleConfigOverride, questMoneyAtLevelCap, repeatableVanillaQuestsXp;
int progressionLimit, startingProgression, tbcRacesProgressionLevel, deathKnightProgressionLevel;
int progressionLimit, startingProgression, tbcRacesProgressionLevel, deathKnightProgressionLevel, deathKnightStartingProgression;
bool hasPassedProgression(Player* player, ProgressionState state) const;
static bool isBeforeProgression(Player* player, ProgressionState state) ;

View File

@@ -7,6 +7,10 @@ public:
void OnLogin(Player* player) override
{
if (sIndividualProgression->deathKnightStartingProgression && !sIndividualProgression->hasPassedProgression(player, static_cast<ProgressionState>(sIndividualProgression->deathKnightStartingProgression)))
{
sIndividualProgression->UpdateProgressionState(player, static_cast<ProgressionState>(sIndividualProgression->deathKnightStartingProgression));
}
if (sIndividualProgression->startingProgression && !sIndividualProgression->hasPassedProgression(player, static_cast<ProgressionState>(sIndividualProgression->startingProgression)))
{
sIndividualProgression->UpdateProgressionState(player, static_cast<ProgressionState>(sIndividualProgression->startingProgression));