[Bug Fix] Fix #setlevel Allowing Skills Above Max (#4423)

This commit is contained in:
Alex King 2024-07-22 21:46:38 -04:00 committed by GitHub
parent 29fdf7e2ae
commit 23308192b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,6 +25,13 @@ void SetLevel(Client *c, const Seperator *sep)
t->SetLevel(level, true);
if (t->IsClient()) {
for (const auto& s : EQ::skills::GetSkillTypeMap()) {
const uint16 max_skill_value = t->CastToClient()->MaxSkill(s.first);
if (t->GetSkill(s.first) > max_skill_value) {
t->CastToClient()->SetSkill(s.first, max_skill_value);
}
}
t->CastToClient()->SendLevelAppearance();
if (RuleB(Bots, Enabled) && RuleB(Bots, BotLevelsWithOwner)) {