From 1ed638015228d9df48e3b752aa04aab1d998b80b Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 20 Mar 2026 07:32:15 -0700 Subject: [PATCH] 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. --- src/game/world_packets.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/game/world_packets.cpp b/src/game/world_packets.cpp index 13738332..27051cb2 100644 --- a/src/game/world_packets.cpp +++ b/src/game/world_packets.cpp @@ -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");