mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-24 21:52:26 +00:00
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:
parent
5e6fef4098
commit
60b7f46801
@ -999,7 +999,7 @@ uint8 GetSpellLevel(uint16 spell_id, uint8 class_id)
|
|||||||
return UINT8_MAX;
|
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;
|
return UINT8_MAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user