mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
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:
parent
eeb116ff7e
commit
1ed6380152
1 changed files with 4 additions and 2 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue