feat: implement [target=mouseover] macro conditional via nameplate/raid hover

- Adds mouseoverGuid_ to GameHandler (set/cleared each frame by UI)
- renderNameplates() sets mouseoverGuid when the cursor is inside a
  nameplate's hit region; resets to 0 at frame start
- Raid frame cells set mouseoverGuid while hovered (IsItemHovered)
- evaluateMacroConditionals() resolves @mouseover / target=mouseover to
  the hover GUID; returns false (skip alternative) when no unit is hovered

This enables common healer macros like:
  /cast [target=mouseover,help,nodead] Renew; Renew
This commit is contained in:
Kelsi 2026-03-18 03:09:43 -07:00
parent d2b2a25393
commit 7967bfdcb1
2 changed files with 30 additions and 8 deletions

View file

@ -375,6 +375,10 @@ public:
std::shared_ptr<Entity> getFocus() const;
bool hasFocus() const { return focusGuid != 0; }
// Mouseover targeting — set each frame by the nameplate renderer
void setMouseoverGuid(uint64_t guid) { mouseoverGuid_ = guid; }
uint64_t getMouseoverGuid() const { return mouseoverGuid_; }
// Advanced targeting
void targetLastTarget();
void targetEnemy(bool reverse = false);
@ -2537,6 +2541,7 @@ private:
uint64_t targetGuid = 0;
uint64_t focusGuid = 0; // Focus target
uint64_t lastTargetGuid = 0; // Previous target
uint64_t mouseoverGuid_ = 0; // Set each frame by nameplate renderer
std::vector<uint64_t> tabCycleList;
int tabCycleIndex = -1;
bool tabCycleStale = true;