mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
fix: key macro cooldown cache by macro ID instead of slot index
The macro primary spell cache was keyed by action bar slot index, so switching characters or rearranging macros could return stale spell IDs from the previous character's macro in that slot. Now keyed by macro ID, which is stable per-macro regardless of which slot it occupies.
This commit is contained in:
parent
bfbf590ee2
commit
a103fb5168
2 changed files with 7 additions and 8 deletions
|
|
@ -435,9 +435,9 @@ private:
|
|||
void loadExtendedCostDBC();
|
||||
std::string formatExtendedCost(uint32_t extendedCostId, game::GameHandler& gameHandler);
|
||||
|
||||
// Macro cooldown cache: maps macro slot index → resolved primary spell ID (0 = no spell found)
|
||||
std::unordered_map<int, uint32_t> macroPrimarySpellCache_;
|
||||
uint32_t resolveMacroPrimarySpellId(int slotIndex, game::GameHandler& gameHandler);
|
||||
// Macro cooldown cache: maps macro ID → resolved primary spell ID (0 = no spell found)
|
||||
std::unordered_map<uint32_t, uint32_t> macroPrimarySpellCache_;
|
||||
uint32_t resolveMacroPrimarySpellId(uint32_t macroId, game::GameHandler& gameHandler);
|
||||
|
||||
// Death Knight rune bar: client-predicted fill (0.0=depleted, 1.0=ready) for smooth animation
|
||||
float runeClientFill_[6] = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue