[Rule] Allow maximum per kill AA amount (#4329)

* [Rule] Allow maximum per kill AA amount

* Adjustments per comments

* Finalize.

* Update ruletypes.h

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
Fryguy
2024-05-25 17:48:58 -04:00
committed by GitHub
parent 3e34447172
commit c56742a2a8
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -530,6 +530,11 @@ void Client::AddEXP(ExpSource exp_source, uint64 in_add_exp, uint8 conlevel, boo
aaexp = ScaleAAXPBasedOnCurrentAATotal(GetAAPoints(), aaexp);
}
// Check for AA XP Cap
if (RuleI(AA, MaxAAEXPPerKill) >= 0 && aaexp > RuleI(AA, MaxAAEXPPerKill)) {
aaexp = RuleI(AA, MaxAAEXPPerKill);
}
// Get current AA XP total
uint32 had_aaexp = GetAAXP();