множители опыта от квестов с шагом в 10 уровней

This commit is contained in:
2026-03-21 16:29:01 +04:00
parent dc835fa9f8
commit ba63751269
6 changed files with 193 additions and 0 deletions
@@ -0,0 +1,72 @@
#
# Progressive Quest XP module configuration
#
########################################
# DynamicQuestXP settings
########################################
#
# DynamicQuestXP.Enable
# Description: Enable progressive quest XP multiplier
# Default: 1 - (Enabled)
# 0 - (Disabled)
#
DynamicQuestXP.Enable = 1
#
# DynamicQuestXP.Level_1_20
# Description: XP multiplier for quest rewards at levels 1-20
# Default: 1.5
#
DynamicQuestXP.Level_1_20 = 1.5
#
# DynamicQuestXP.Level_21_30
# Description: XP multiplier for quest rewards at levels 21-30
# Default: 1.3
#
DynamicQuestXP.Level_21_30 = 1.3
#
# DynamicQuestXP.Level_31_40
# Description: XP multiplier for quest rewards at levels 31-40
# Default: 1.1
#
DynamicQuestXP.Level_31_40 = 1.1
#
# DynamicQuestXP.Level_41_50
# Description: XP multiplier for quest rewards at levels 41-50
# Default: 1.0
#
DynamicQuestXP.Level_41_50 = 1.0
#
# DynamicQuestXP.Level_51_60
# Description: XP multiplier for quest rewards at levels 51-60
# Default: 1.0
#
DynamicQuestXP.Level_51_60 = 1.0
#
# DynamicQuestXP.Level_61_70
# Description: XP multiplier for quest rewards at levels 61-70
# Default: 1.0
#
DynamicQuestXP.Level_61_70 = 1.0
#
# DynamicQuestXP.Level_70_plus
# Description: XP multiplier for quest rewards at levels 70-80
# Default: 1.0
#
DynamicQuestXP.Level_70_plus = 1.0
@@ -0,0 +1 @@
@@ -0,0 +1,59 @@
/*
* Progressive Quest XP Module for AzerothCore
*
* Applies a level-based XP multiplier to quest rewards only.
* Does not affect kill XP, exploration XP, or PvP XP.
*/
#include "Config.h"
#include "Player.h"
#include "ScriptMgr.h"
class ProgressiveQuestXPPlayer : public PlayerScript
{
public:
ProgressiveQuestXPPlayer() : PlayerScript("ProgressiveQuestXPPlayer",
{PLAYERHOOK_ON_QUEST_COMPUTE_EXP}) { }
void OnPlayerQuestComputeXP(Player* player, Quest const* /*quest*/,
uint32& xpValue) override
{
if (!sConfigMgr->GetOption<bool>("DynamicQuestXP.Enable", true))
return;
if (!xpValue)
return;
uint8 level = player->GetLevel();
float multiplier;
if (level <= 20)
multiplier = sConfigMgr->GetOption<float>(
"DynamicQuestXP.Level_1_20", 1.5f);
else if (level <= 30)
multiplier = sConfigMgr->GetOption<float>(
"DynamicQuestXP.Level_21_30", 1.3f);
else if (level <= 40)
multiplier = sConfigMgr->GetOption<float>(
"DynamicQuestXP.Level_31_40", 1.1f);
else if (level <= 50)
multiplier = sConfigMgr->GetOption<float>(
"DynamicQuestXP.Level_41_50", 1.0f);
else if (level <= 60)
multiplier = sConfigMgr->GetOption<float>(
"DynamicQuestXP.Level_51_60", 1.0f);
else if (level <= 70)
multiplier = sConfigMgr->GetOption<float>(
"DynamicQuestXP.Level_61_70", 1.0f);
else
multiplier = sConfigMgr->GetOption<float>(
"DynamicQuestXP.Level_70_plus", 1.0f);
xpValue = static_cast<uint32>(xpValue * multiplier);
}
};
void AddSC_ProgressiveQuestXP()
{
new ProgressiveQuestXPPlayer();
}
@@ -0,0 +1,6 @@
void AddSC_ProgressiveQuestXP();
void Addmod_progressive_quest_xpScripts()
{
AddSC_ProgressiveQuestXP();
}