mirror of
https://github.com/noisiver/mod-weekendbonus.git
synced 2026-01-12 16:48:38 +00:00
Honor
Add a multiplier for honor gains on weekends.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user