Roy Love 5e6fef4098 fix: correct off-by-one in GetSpellLevel for Berserker class
Class::Berserker == 16 and Class::PLAYER_CLASS_COUNT == 16, so the
guard `class_id >= PLAYER_CLASS_COUNT` evaluated 16 >= 16 as true and
returned UINT8_MAX before reaching the array lookup.

The array access `classes[class_id - 1]` is correct — classes[15] is
the valid Berserker slot. The bug was only in the boundary check.

Replace the count-based guard with explicit named-constant bounds so
the valid range (Warrior=1 through Berserker=16) is self-documenting
and both ends are checked (class_id=0 would underflow the index).

Fixes #5056
2026-04-10 20:27:27 -05:00
..
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2025-12-26 20:58:07 -08:00
2023-10-23 22:39:37 -05:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-04 23:27:21 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-04 23:27:21 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00
2026-04-01 17:09:57 -07:00