From 5172c07e15cdfce337cfc0e1c280b4222f0dfe16 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Fri, 20 Mar 2026 07:02:57 -0700 Subject: [PATCH] fix: include category cooldowns in initial spell cooldown tracking SMSG_INITIAL_SPELLS cooldown entries have both cooldownMs (individual) and categoryCooldownMs (shared, e.g. potions). The handler only checked cooldownMs, so spells with category-only cooldowns (cooldownMs=0, categoryCooldownMs=120000) were not tracked. Now uses the maximum of both values, ensuring potion and similar shared cooldowns show on the action bar after login. --- src/game/game_handler.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index ac58e946..7059473d 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -18753,10 +18753,12 @@ void GameHandler::handleInitialSpells(network::Packet& packet) { knownSpells.insert(6603u); knownSpells.insert(8690u); - // Set initial cooldowns + // Set initial cooldowns — use the longer of individual vs category cooldown. + // Spells like potions have cooldownMs=0 but categoryCooldownMs=120000. for (const auto& cd : data.cooldowns) { - if (cd.cooldownMs > 0) { - spellCooldowns[cd.spellId] = cd.cooldownMs / 1000.0f; + uint32_t effectiveMs = std::max(cd.cooldownMs, cd.categoryCooldownMs); + if (effectiveMs > 0) { + spellCooldowns[cd.spellId] = effectiveMs / 1000.0f; } }