fix: correct off-by-one in GetSpellLevel for Berserker class (#5060)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
ltroylove 2026-04-20 19:50:36 -05:00 committed by GitHub
parent ba2ca5eada
commit 348094b881
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -999,7 +999,7 @@ uint8 GetSpellLevel(uint16 spell_id, uint8 class_id)
return UINT8_MAX;
}
if (class_id >= Class::PLAYER_CLASS_COUNT) {
if (class_id < Class::Warrior || class_id > Class::PLAYER_CLASS_COUNT) {
return UINT8_MAX;
}