fix: raise initial cooldown count cap from 256 to 1024

Some server implementations include cooldown entries for all spells
(even with zero remaining time) to communicate category cooldown data.
The previous 256 cap could truncate these entries, causing missing
cooldown tracking for spells near the end of the list. Raised to match
the spell count cap for consistency.
This commit is contained in:
Kelsi 2026-03-20 07:32:15 -07:00
parent eeb116ff7e
commit 1ed6380152

View file

@ -3680,8 +3680,10 @@ bool InitialSpellsParser::parse(network::Packet& packet, InitialSpellsData& data
uint16_t cooldownCount = packet.readUInt16();
// Cap cooldown count to prevent excessive iteration
constexpr uint16_t kMaxCooldowns = 256;
// Cap cooldown count to prevent excessive iteration.
// Some servers include entries for all spells (even with zero remaining time)
// to communicate category cooldown data, so the count can be high.
constexpr uint16_t kMaxCooldowns = 1024;
if (cooldownCount > kMaxCooldowns) {
LOG_WARNING("SMSG_INITIAL_SPELLS: cooldownCount=", cooldownCount, " exceeds max ", kMaxCooldowns,
", capping");