Add a multiplier for honor gains on weekends.
This commit is contained in:
Revision
2024-08-08 20:18:30 +02:00
parent 017fbbd79b
commit 82865d0997
3 changed files with 9 additions and 0 deletions

View File

@@ -14,3 +14,6 @@ WeekendBonus.Multiplier.Reputation = 2.0
# Multiplier for weapons and defense skill ups on weekends
WeekendBonus.Multiplier.Proficiencies = 2
# Multiplier for honor gains on weekends
WeekendBonus.Multiplier.Honor = 2.0

View File

@@ -43,6 +43,7 @@ private:
uint32 ProfessionsMultiplier;
float ReputationMultiplier;
uint32 ProficienciesMultiplier;
float HonorMultiplier;
float DefaultExperienceMultiplier[6];
float DefaultBattlegroundExperienceMultiplier[6];
@@ -50,6 +51,7 @@ private:
uint32 DefaultProficienciesMultiplier[2];
float DefaultMoneyMultiplier;
float DefaultReputationMultiplier;
float DefaultHonorMultiplier;
};
#endif

View File

@@ -10,6 +10,7 @@ void WeekendBonus::OnAfterConfigLoad(bool reload)
ProfessionsMultiplier = sConfigMgr->GetOption<uint32>("WeekendBonus.Multiplier.Professions", 2);
ReputationMultiplier = sConfigMgr->GetOption<float>("WeekendBonus.Multiplier.Reputation", 2.0f);
ProficienciesMultiplier = sConfigMgr->GetOption<uint32>("WeekendBonus.Multiplier.Proficiencies", 2);
HonorMultiplier = sConfigMgr->GetOption<float>("WeekendBonus.Multiplier.Honor", 2.0f);
if (reload)
{
@@ -39,6 +40,7 @@ void WeekendBonus::LoadDefaultValues()
DefaultReputationMultiplier = sWorld->getRate(RATE_REPUTATION_GAIN);
DefaultProficienciesMultiplier[0] = sWorld->getIntConfig(CONFIG_SKILL_GAIN_DEFENSE);
DefaultProficienciesMultiplier[1] = sWorld->getIntConfig(CONFIG_SKILL_GAIN_WEAPON);
DefaultHonorMultiplier = sWorld->getFloatConfig(RATE_HONOR);
CheckFrequency = 10s;
AnnouncementFrequency = 1h;
@@ -65,6 +67,7 @@ void WeekendBonus::SetRates(bool active)
sWorld->setRate(RATE_REPUTATION_GAIN, DefaultReputationMultiplier * ReputationMultiplier);
sWorld->setIntConfig(CONFIG_SKILL_GAIN_DEFENSE, DefaultProficienciesMultiplier[0] * ProficienciesMultiplier);
sWorld->setIntConfig(CONFIG_SKILL_GAIN_WEAPON, DefaultProficienciesMultiplier[1] * ProficienciesMultiplier);
sWorld->setRate(RATE_HONOR, DefaultHonorMultiplier * HonorMultiplier);
}
else
{
@@ -85,6 +88,7 @@ void WeekendBonus::SetRates(bool active)
sWorld->setRate(RATE_REPUTATION_GAIN, DefaultReputationMultiplier);
sWorld->setIntConfig(CONFIG_SKILL_GAIN_DEFENSE, DefaultProficienciesMultiplier[0]);
sWorld->setIntConfig(CONFIG_SKILL_GAIN_WEAPON, DefaultProficienciesMultiplier[1]);
sWorld->setRate(RATE_HONOR, DefaultHonorMultiplier);
}
Triggered = active;