Aviana / LunaUnitFrames

Unit Frames for WoW Classic
245 stars 102 forks source link

Mouseover unit name in 1.12 (still supporting?) #903

Closed lvangh closed 2 years ago

lvangh commented 2 years ago

Hello,

I'm trying to get the unitname of the MO target in 1.12. If you are not supporting this anymore I understand.

For example: /run local mo,cd,t=GetMouseFocus().unit,179,GetTime() if t-cd >= (T or 0) then T = t SendChatMessage("Attempting BOP on "..mo,SAY)end

But this returns "player" or "target" or "targettarget". Is there a way to get the actual name back? I tried GetMouseFocus().unitname but that didn't work.

Aviana commented 2 years ago

UnitName(GetMouseFocus().unit)

lvangh commented 2 years ago

Thank you, I made this. Hope you're proud :P Reports attempted target and their current HP (and prevents message spam)

/run local mon,moh,cd,t=UnitName(GetMouseFocus().unit),UnitHealth(GetMouseFocus().unit),179,GetTime() if t-cd >= (T or 0) then T = t SendChatMessage("Attempting BOP on "..mon.." at "..moh.." HP",PARTY)end /lunamo Blessing of Protection