mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-27 22:16:11 +00:00
feat(Core/Config): Add configurable XP rate for battleground objectives (#24672)
This commit is contained in:
@@ -2421,6 +2421,13 @@ Rate.XP.BattlegroundKillEOTS = 1
|
||||
Rate.XP.BattlegroundKillSOTA = 1
|
||||
Rate.XP.BattlegroundKillIC = 1
|
||||
|
||||
#
|
||||
# Rate.XP.BattlegroundBonus
|
||||
# Description: Experience rate multiplier for battleground objectives (flag captures, base assaults, etc.).
|
||||
# Default: 1
|
||||
|
||||
Rate.XP.BattlegroundBonus = 1
|
||||
|
||||
#
|
||||
# Rate.Pet.LevelXP
|
||||
# Description: Modifies the amount of experience required to level up a pet.
|
||||
|
||||
@@ -6217,7 +6217,7 @@ bool Player::RewardHonor(Unit* uVictim, uint32 groupsize, int32 honor, bool awar
|
||||
// Xinef: Only for BG activities
|
||||
if (!uVictim)
|
||||
{
|
||||
uint32 xp = uint32(honor * (3 + GetLevel() * 0.30f));
|
||||
uint32 xp = static_cast<uint32>(honor * (3 + GetLevel() * 0.30f) * sWorld->getRate(RATE_XP_BATTLEGROUND_BONUS));
|
||||
sScriptMgr->OnPlayerGiveXP(this, xp, nullptr, PlayerXPSource::XPSOURCE_BATTLEGROUND);
|
||||
GiveXP(xp, nullptr);
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ void WorldConfig::BuildConfigCache()
|
||||
SetConfigValue<float>(RATE_XP_EXPLORE, "Rate.XP.Explore", 1.0f);
|
||||
SetConfigValue<float>(RATE_XP_PET, "Rate.XP.Pet", 1.0f);
|
||||
SetConfigValue<float>(RATE_XP_PET_NEXT_LEVEL, "Rate.Pet.LevelXP", 0.05f);
|
||||
SetConfigValue<float>(RATE_XP_BATTLEGROUND_BONUS, "Rate.XP.BattlegroundBonus", 1.0f);
|
||||
SetConfigValue<float>(RATE_REPAIRCOST, "Rate.RepairCost", 1.0f, ConfigValueCache::Reloadable::Yes, [](float const& value) { return value >= 0.0f; }, ">= 0");
|
||||
|
||||
SetConfigValue<float>(RATE_SELLVALUE_ITEM_POOR, "Rate.SellValue.Item.Poor", 1.0f);
|
||||
|
||||
@@ -437,6 +437,7 @@ enum ServerConfigs
|
||||
RATE_XP_EXPLORE,
|
||||
RATE_XP_PET,
|
||||
RATE_XP_PET_NEXT_LEVEL,
|
||||
RATE_XP_BATTLEGROUND_BONUS,
|
||||
RATE_REPAIRCOST,
|
||||
RATE_REPUTATION_GAIN,
|
||||
RATE_REPUTATION_GAIN_AB,
|
||||
|
||||
Reference in New Issue
Block a user