[Rule] Added rule to bypass level based haste caps (#2835)

This commit is contained in:
Joel 2023-02-06 18:25:17 -05:00 committed by GitHub
parent 20728c31c4
commit 839f31b24d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -200,6 +200,7 @@ RULE_INT(Character, ExperiencePercentCapPerKill, -1, "Caps the percentage of exp
RULE_BOOL(Character, EnableGroupEXPModifier, true, "Enable or disable the group experience modifier based on number of players in group, default is true")
RULE_REAL(Character, GroupMemberEXPModifier, 0.2, "Sets the group experience modifier per members between 2 and 5, default is 0.2")
RULE_REAL(Character, FullGroupEXPModifier, 2.16, "Sets the group experience modifier for a full group, default is 2.16")
RULE_BOOL(Character, IgnoreLevelBasedHasteCaps, false, "Ignores hard coded level based haste caps.")
RULE_CATEGORY_END()
RULE_CATEGORY(Mercs)

View File

@ -1031,14 +1031,14 @@ int Client::CalcHaste()
h += spellbonuses.hastetype2 > 10 ? 10 : spellbonuses.hastetype2;
}
// 26+ no cap, 1-25 10
if (level > 25) { // 26+
if (level > 25 || RuleB(Character, IgnoreLevelBasedHasteCaps)) { // 26+
h += itembonuses.haste;
}
else { // 1-25
h += itembonuses.haste > 10 ? 10 : itembonuses.haste;
}
// 60+ 100, 51-59 85, 1-50 level+25
if (level > 59) { // 60+
if (level > 59 || RuleB(Character, IgnoreLevelBasedHasteCaps)) { // 60+
cap = RuleI(Character, HasteCap);
}
else if (level > 50) { // 51-59
@ -1052,7 +1052,7 @@ int Client::CalcHaste()
h = cap;
}
// 51+ 25 (despite there being higher spells...), 1-50 10
if (level > 50) { // 51+
if (level > 50 || RuleB(Character, IgnoreLevelBasedHasteCaps)) { // 51+
cap = RuleI(Character, Hastev3Cap);
if (spellbonuses.hastetype3 > cap) {
h += cap;