Quantcast
WoWInterface - View Single Post - Trying to anchor a frame to the personal resource display
View Single Post
05-15-20, 10:39 PM   #4
Yakkers
A Murloc Raider
Join Date: May 2020
Posts: 4
Sorry for double post, but I got it! For anyone else's future reference, here's a quick and dirty way to do it:

Code:
yourFrame:SetPoint("CENTER", C_NamePlate.GetNamePlateForUnit("player"), "CENTER", 0, 0)
Do be aware that the nameplate object for the personal resource display does change, as I believe the UI engine has pre-allocated nameplates that cycle around as they become used and unused. It looks like Weakauras checks events for nameplates loading and unloading and calls the SetPoint then, but in my case I'm able to just set the point every time the animation starts since it only occurs when you're in combat and have a target anyways.

I tested with an aoe hit while not targeting the mob (so the PRD isn't already visible) on a fresh reaload and it still works, so it should be golden in this case.
  Reply With Quote