mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix: raise initial spell count cap from 256 to 1024
WotLK characters with all ability ranks, mounts, companion pets, professions, and racial skills can know 400-600 spells. The previous 256 cap truncated the spell list, causing missing spells in the spellbook, broken /cast commands for truncated spells, and missing cooldown tracking for spells beyond the cap.
This commit is contained in:
parent
f101ed7c83
commit
eeb116ff7e
1 changed files with 4 additions and 2 deletions
|
|
@ -3635,8 +3635,10 @@ bool InitialSpellsParser::parse(network::Packet& packet, InitialSpellsData& data
|
||||||
data.talentSpec = packet.readUInt8();
|
data.talentSpec = packet.readUInt8();
|
||||||
uint16_t spellCount = packet.readUInt16();
|
uint16_t spellCount = packet.readUInt16();
|
||||||
|
|
||||||
// Cap spell count to prevent excessive iteration
|
// Cap spell count to prevent excessive iteration.
|
||||||
constexpr uint16_t kMaxSpells = 256;
|
// WotLK characters with all ranks, mounts, professions, and racials can
|
||||||
|
// know 400-600 spells; 1024 covers all practical cases with headroom.
|
||||||
|
constexpr uint16_t kMaxSpells = 1024;
|
||||||
if (spellCount > kMaxSpells) {
|
if (spellCount > kMaxSpells) {
|
||||||
LOG_WARNING("SMSG_INITIAL_SPELLS: spellCount=", spellCount, " exceeds max ", kMaxSpells,
|
LOG_WARNING("SMSG_INITIAL_SPELLS: spellCount=", spellCount, " exceeds max ", kMaxSpells,
|
||||||
", capping");
|
", capping");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue