[Bots] Fix AA ranks to account for level (#4567)

Previously level requirement was only being checked on the initial rank of an AA. If passed, bots would gain all ranks for that AA regardless of level, this will now check for the level requirement for each rank before granting the AA
This commit is contained in:
nytmyr 2024-12-06 22:58:11 -06:00 committed by GitHub
parent 5f0b999ca9
commit 8e40e5357c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1265,7 +1265,7 @@ void Bot::LoadAAs() {
}
while(current) {
if (!CanUseAlternateAdvancementRank(current)) {
if (current->level_req > GetLevel() || !CanUseAlternateAdvancementRank(current)) {
current = nullptr;
} else {
current = current->next;