fix: use PLAYER_CLASS_COUNT upper bound in GetSpellLevel guard

Addresses reviewer feedback to use Class::PLAYER_CLASS_COUNT instead of
Class::Berserker so a future new class won't hit the same off-by-one.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Roy Love 2026-04-18 07:11:13 -05:00
parent 5e6fef4098
commit 60b7f46801

View File

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