mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
feat: add out-of-range tint to action bar spell slots
Ranged spell icons dim to a red tint when the current target is farther than the spell's max range (read from SpellRange.dbc via spellbook data). Melee/self spells (max range ≤ 5 yd or unknown) are excluded. The spell tooltip also shows "Out of range" in red when applicable. Adds SpellbookScreen::getSpellMaxRange() as a public accessor so game_screen can query DBC range data without duplicating DBC loading.
This commit is contained in:
parent
bc5a7867a9
commit
8081a43d85
3 changed files with 39 additions and 0 deletions
|
|
@ -54,6 +54,10 @@ public:
|
|||
uint32_t getDragSpellId() const { return dragSpellId_; }
|
||||
void consumeDragSpell() { draggingSpell_ = false; dragSpellId_ = 0; dragSpellIconTex_ = VK_NULL_HANDLE; }
|
||||
|
||||
/// Returns the max range in yards for a spell (0 if self-cast, unknown, or melee).
|
||||
/// 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 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