mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: add insufficient-power tint to action bar spell slots
Spell icons now render with a purple desaturated tint when the player lacks enough mana/rage/energy/runic power to cast them. Power cost and type are read from Spell.dbc via the spellbook's DBC cache. The spell tooltip also shows "Not enough power" in purple when applicable. Priority: cooldown > GCD > out-of-range > insufficient-power so states don't conflict. Adds SpellbookScreen::getSpellPowerInfo() as a public DBC accessor.
This commit is contained in:
parent
8081a43d85
commit
39634f442b
3 changed files with 49 additions and 4 deletions
|
|
@ -58,6 +58,12 @@ public:
|
|||
/// Triggers DBC load if needed. Used by the action bar for out-of-range tinting.
|
||||
uint32_t getSpellMaxRange(uint32_t spellId, pipeline::AssetManager* assetManager);
|
||||
|
||||
/// Returns the power cost and type for a spell (cost=0 if unknown/free).
|
||||
/// powerType: 0=mana, 1=rage, 2=focus, 3=energy, 6=runic power.
|
||||
/// Triggers DBC load if needed. Used by the action bar for insufficient-power tinting.
|
||||
void getSpellPowerInfo(uint32_t spellId, pipeline::AssetManager* assetManager,
|
||||
uint32_t& outCost, uint32_t& outPowerType);
|
||||
|
||||
/// Returns a WoW spell link string if the user shift-clicked a spell, then clears it.
|
||||
std::string getAndClearPendingChatLink() {
|
||||
std::string out = std::move(pendingChatSpellLink_);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue