[Rules] Add FinalRaidExpMultiplier Rule (#3554)

* FlatRaidExpModifierRule

* Formatting

* Remove enabled toggle

Enabled toggle not necessary as default value is 1.0

* Formatting

* Formatting

* Formatting
This commit is contained in:
Vayle 2023-08-20 17:31:36 -04:00 committed by GitHub
parent 4357b8c731
commit a61f951d0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -58,6 +58,7 @@ RULE_REAL(Character, ExpMultiplier, 0.5, "If greater than 0, the experience gain
RULE_REAL(Character, AAExpMultiplier, 0.5, "If greater than 0, the AA experience gained is multiplied by this value. ")
RULE_REAL(Character, GroupExpMultiplier, 0.5, "The experience in a group is multiplied by this value in addition to the group multiplier. The group multiplier is: 2 members=x 1.2, 3=x1.4, 4=x1.6, 5=x1.8, 6=x2.16")
RULE_REAL(Character, RaidExpMultiplier, 0.2, "The experience gained in raids is multiplied by (1-RaidExpMultiplier) ")
RULE_REAL(Character, FinalRaidExpMultiplier, 1.0, "Multiplies all raid experience by this value. Default: 1.0")
RULE_BOOL(Character, UseXPConScaling, true, "When activated, the experience is modified depending on the difference between player level and NPC level. The values from the rules GreenModifier to RedModifier are used")
RULE_INT(Character, ShowExpValues, 0, "Show experience values. 0=normal, 1=show raw experience values, 2=show raw experience values and percent")
RULE_INT(Character, GreenModifier, 20, "The experience obtained for green con mobs is multiplied by value/100")

View File

@ -1181,10 +1181,7 @@ void Raid::SplitExp(const uint64 exp, Mob* other) {
const auto highest_level = GetHighestLevel();
if (RuleB(Character, EnableRaidEXPModifier)) {
raid_experience = static_cast<uint64>(
static_cast<float>(raid_experience) *
(1.0f - RuleR(Character, RaidExpMultiplier))
);
raid_experience = static_cast<uint64>(static_cast<float>(raid_experience) * (1.0f - RuleR(Character, RaidExpMultiplier)));
}
const auto consider_level = Mob::GetLevelCon(highest_level, other->GetLevel());
@ -1213,6 +1210,8 @@ void Raid::SplitExp(const uint64 exp, Mob* other) {
}
}
}
raid_experience = static_cast<uint64>(static_cast<float>(raid_experience) * RuleR(Character, FinalRaidExpMultiplier));
}
void Client::SetLeadershipEXP(uint64 group_exp, uint64 raid_exp) {