View Single Post
05-27-11, 01:52 PM   #4
hankthetank
A Theradrim Guardian
AddOn Author - Click to view addons
Join Date: Jul 2009
Posts: 64
save unitids in a new nameplate member (WorldFrame.NameplateN.uid) on UPDATE_MOUSEOVER_UNIT and UNIT_TARGET:"player": unitguid("mouseover" / "target"). check the visibility of this one hover overlay region as you can't rely on event handlers of nameplate elemnts as is mostly the case. you might need to delay the check a few ms.

reset the value OnShow. you can use this event actually.

make a nameplate scan for the target uid on COMBAT_LOG_EVENT_UNFILTERED

draw your statusbar or reuse / show the original nameplate statusbar accordingly. the latter may cause one of these unforeseeable nameplate override issues but is the best solution imo. when the unit is targeted you can let wow handle the castbar.

of course the whole thing will be somewhat unreliable.

if you are checking for players the whole thing is a lot easier. you can extract the unit type and if it is a player from the guid string (tonumber(guid:sub(5, 5), 16) % 8), if so and you found a nameplate with its hp bar player / class colored and the same label as the caster's name you are pretty safe to assume it's the unit in question. cross realm bg comes into mind maybe, not sure if combatlog events return names as name-server there. i'm not even sure how the names are displayed in the nameplate there. man... i never pvp it seems lol.

Last edited by hankthetank : 05-27-11 at 02:26 PM.
  Reply With Quote