Merge pull request #1 from sindoring/mod-progressive-quest-xp-config

множители опыта от квестов с шагом в 10 уровней
This commit is contained in:
Maxim Kalistratov
2026-03-21 17:47:54 +04:00
committed by GitHub
6 changed files with 193 additions and 0 deletions
+28
View File
@@ -276,6 +276,34 @@ ACORE_PROGRESSION_MC_AQUAL_COOLDOWN_REDUCTION=60
# 0 = отключены, 1 = включены. # 0 = отключены, 1 = включены.
ACORE_PROGRESSION_PVP_GEAR_REQUIREMENTS=0 ACORE_PROGRESSION_PVP_GEAR_REQUIREMENTS=0
# ------------------------------------------------------------------------------
# mod-progressive-quest-xp
# ------------------------------------------------------------------------------
# 1 = включает прогрессивный множитель XP за квесты.
ACORE_DYNAMIC_QUEST_XP_ENABLE=1
# Множитель квестового XP для уровней 1-20.
ACORE_DYNAMIC_QUEST_XP_LEVEL_1_20=1.5
# Множитель квестового XP для уровней 21-30.
ACORE_DYNAMIC_QUEST_XP_LEVEL_21_30=1.3
# Множитель квестового XP для уровней 31-40.
ACORE_DYNAMIC_QUEST_XP_LEVEL_31_40=1.1
# Множитель квестового XP для уровней 41-50.
ACORE_DYNAMIC_QUEST_XP_LEVEL_41_50=1.0
# Множитель квестового XP для уровней 51-60.
ACORE_DYNAMIC_QUEST_XP_LEVEL_51_60=1.0
# Множитель квестового XP для уровней 61-70.
ACORE_DYNAMIC_QUEST_XP_LEVEL_61_70=1.0
# Множитель квестового XP для уровней 70-80.
ACORE_DYNAMIC_QUEST_XP_LEVEL_70_PLUS=1.0
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# mod-aoe-loot # mod-aoe-loot
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -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();
}
+27
View File
@@ -65,6 +65,15 @@ FORCE_PLAYERBOTS="${FORCE_PLAYERBOTS:-${ACORE_PLAYERBOTS_FORCE:-0}}"
: "${ACORE_PROGRESSION_MC_AQUAL_COOLDOWN_REDUCTION:=60}" : "${ACORE_PROGRESSION_MC_AQUAL_COOLDOWN_REDUCTION:=60}"
: "${ACORE_PROGRESSION_PVP_GEAR_REQUIREMENTS:=0}" : "${ACORE_PROGRESSION_PVP_GEAR_REQUIREMENTS:=0}"
: "${ACORE_DYNAMIC_QUEST_XP_ENABLE:=1}"
: "${ACORE_DYNAMIC_QUEST_XP_LEVEL_1_20:=1.5}"
: "${ACORE_DYNAMIC_QUEST_XP_LEVEL_21_30:=1.3}"
: "${ACORE_DYNAMIC_QUEST_XP_LEVEL_31_40:=1.1}"
: "${ACORE_DYNAMIC_QUEST_XP_LEVEL_41_50:=1.0}"
: "${ACORE_DYNAMIC_QUEST_XP_LEVEL_51_60:=1.0}"
: "${ACORE_DYNAMIC_QUEST_XP_LEVEL_61_70:=1.0}"
: "${ACORE_DYNAMIC_QUEST_XP_LEVEL_70_PLUS:=1.0}"
: "${ACORE_AOE_LOOT_ENABLE:=1}" : "${ACORE_AOE_LOOT_ENABLE:=1}"
: "${ACORE_AOE_LOOT_MESSAGE:=0}" : "${ACORE_AOE_LOOT_MESSAGE:=0}"
: "${ACORE_AOE_LOOT_RANGE:=55.0}" : "${ACORE_AOE_LOOT_RANGE:=55.0}"
@@ -316,6 +325,8 @@ ensure_world_conf() {
} }
sync_module_dists() { sync_module_dists() {
sync_file "$ROOT_DIR/modules/mod-progressive-quest-xp/conf/mod_progressive_quest_xp.conf.dist" \
"$MODULES_ETC_DIR/mod_progressive_quest_xp.conf.dist"
sync_file "$ROOT_DIR/modules/mod-aoe-loot/conf/mod_aoe_loot.conf.dist" \ sync_file "$ROOT_DIR/modules/mod-aoe-loot/conf/mod_aoe_loot.conf.dist" \
"$MODULES_ETC_DIR/mod_aoe_loot.conf.dist" "$MODULES_ETC_DIR/mod_aoe_loot.conf.dist"
sync_file "$ROOT_DIR/modules/mod-autobalance/conf/AutoBalance.conf.dist" \ sync_file "$ROOT_DIR/modules/mod-autobalance/conf/AutoBalance.conf.dist" \
@@ -393,6 +404,20 @@ IndividualProgression.PvPGearRequirements = ${ACORE_PROGRESSION_PVP_GEAR_REQUIRE
EOF EOF
} }
write_progressive_quest_xp_conf() {
write_file "$MODULES_ETC_DIR/mod_progressive_quest_xp.conf.dist" <<EOF
# Managed by ./setup-modules.sh
DynamicQuestXP.Enable = ${ACORE_DYNAMIC_QUEST_XP_ENABLE}
DynamicQuestXP.Level_1_20 = ${ACORE_DYNAMIC_QUEST_XP_LEVEL_1_20}
DynamicQuestXP.Level_21_30 = ${ACORE_DYNAMIC_QUEST_XP_LEVEL_21_30}
DynamicQuestXP.Level_31_40 = ${ACORE_DYNAMIC_QUEST_XP_LEVEL_31_40}
DynamicQuestXP.Level_41_50 = ${ACORE_DYNAMIC_QUEST_XP_LEVEL_41_50}
DynamicQuestXP.Level_51_60 = ${ACORE_DYNAMIC_QUEST_XP_LEVEL_51_60}
DynamicQuestXP.Level_61_70 = ${ACORE_DYNAMIC_QUEST_XP_LEVEL_61_70}
DynamicQuestXP.Level_70_plus = ${ACORE_DYNAMIC_QUEST_XP_LEVEL_70_PLUS}
EOF
}
write_aoe_loot_conf() { write_aoe_loot_conf() {
write_file "$MODULES_ETC_DIR/mod_aoe_loot.conf.dist" <<EOF write_file "$MODULES_ETC_DIR/mod_aoe_loot.conf.dist" <<EOF
# Managed by ./setup-modules.sh # Managed by ./setup-modules.sh
@@ -538,6 +563,7 @@ ensure_runtime_dirs() {
cleanup_legacy_module_overrides() { cleanup_legacy_module_overrides() {
local legacy_files=( local legacy_files=(
"$MODULES_ETC_DIR/mod_progressive_quest_xp.conf"
"$MODULES_ETC_DIR/AutoBalance.conf" "$MODULES_ETC_DIR/AutoBalance.conf"
"$MODULES_ETC_DIR/individualProgression.conf" "$MODULES_ETC_DIR/individualProgression.conf"
"$MODULES_ETC_DIR/mod_aoe_loot.conf" "$MODULES_ETC_DIR/mod_aoe_loot.conf"
@@ -595,6 +621,7 @@ main() {
configure_worldserver configure_worldserver
write_autobalance_conf write_autobalance_conf
write_individual_progression_conf write_individual_progression_conf
write_progressive_quest_xp_conf
write_aoe_loot_conf write_aoe_loot_conf
write_quest_loot_party_conf write_quest_loot_party_conf
write_eluna_conf write_eluna_conf