Repository navigation
Labels
enhancementNew feature or requestNew feature or request
Description
Show one icon for the shared potion cooldown, without listing potion item IDs.
Why not item IDs
- Using one potion puts every potion in the bags on cooldown; one icon per potion duplicates the timer.
- Potion IDs change every patch/expansion; a list in
data/needs constant upkeep.
Current state
ProcessCooldownDataalready has adata.itemIdbranch (GetItemInfo,C_Container.GetItemCooldown), andbutton_protoOnEntertooltips handleitemId.- The branch is unreachable:
core/data.luahas no item constructor, andbuildCooldownsdrops rows withoutslotIdor a knownspellId. - Events suffice: on Retail and MoP,
SPELL_UPDATE_COOLDOWNfires on every item cooldown change (Experiment 10,docs/secret-values-options.md). Item rows have nospellId, so they are always re-checked.
Proposal
One "potion" row with no ID that resolves to whichever potion is in the bags:
- Match by item class:
C_Item.GetItemInfoInstant(itemID)→classID, subClassID; potion =Enum.ItemClass.Consumable(0) /Enum.ItemConsumableSubclass.Potion(1). Both exist in the generated docs of every client. - Scan bags (
C_Container.GetContainerNumSlots,C_Container.GetContainerItemID) only onBAG_UPDATE_DELAYED, never on cooldown events. Cache the ID. - Keep the last ID after the last potion is drunk so the running cooldown still shows.
- Read the cooldown through the existing
itemIdbranch.
Tasks
- Experiments (
/filger exp10 <potionID>, printsenabled):- MoP: drink in combat, leave combat. Is
enabled0 in combat whilestartfollowsGetTime()? Does the cooldown start when combat ends? - Era and TBC: same test.
- Retail: do healing and combat potions share a cooldown? Healthstones? (unverified)
- Era: are potions classID 0 / subClassID 1, or Generic (0)? (unverified;
/run print(C_Item.GetItemInfoInstant(<id>)))
- MoP: drink in combat, leave combat. Is
- Data:
data.CreatePotionCooldown(enabled)incore/data.lua, one row indata/shared/cooldowns.luagear, accepted bybuildCooldowns. - Resolve: bag scan setting the row's
itemId, at login and onBAG_UPDATE_DELAYED, registered only by the cooldown element. - Classic in combat: if experiments confirm the pending cooldown, keep the icon hidden while
enabledis 0 (FilterCooldownalready requiresdata.enabled).
Open questions
- With potions from different cooldown groups in the bags, which one wins? Unknown until the experiments.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity