Are focus frames even possible in Classic Wow?
I know for vanilla wow, there were focus frame addons to be able to see a second unit's hp/mana/castbar/etc.
However, is this even possible for the classic beta? It seems that functions like UnitHealth will only work on a party member or your current target. When used on someone not inside of your group, the function returns 0. Any ideas? |
You have to build a database of the unit's information by scanning your party members target, mouseover, nearby nameplates etc. If a nearby nameplate belongs to your focused player, you can use something like nameplate1.Healthbar:GetValue() to get the health. For auras/casts you can parse the combat log. This is how focus frame works in vanilla aswell. Edit: Technically you could also estimate health based on damage taken in the combat log.
Edit2: I think in Classic/Retail nameplates have valid unitIDs which would make things slightly easier. Btw, there's no way to target the focus in classic. At best, you could make your addon create a macro for you automatically like: "/targetexact name /cast spell /targetlasttarget" but addons can't create macros in combat so you won't be able to set a new focus in combat. |
Quote:
|
Okay, so i've looked more into it and i'm a bit stuck on something.
Code:
function ScanTest() However, if I don't have nameplates on, I can't get info like this... There was an addon made for 1.12 that was able to scan plates without having nameplates on. It also wasn't restricted to the short distance that nameplates have in classic wow beta. Any ideas how I can get around this issue? |
Without a proper UnitID(i.e. target, targettarget, party1target, nameplate1, etc.) and nameplates you'll have to use the combat log method. As a plus every unit has a UnitGUID which can be tracked in the combat log.
Since you need a valid UnitID before casting/attacking you can get the UnitGUID and health on an event related to casting/attacking. Once you have those two things you can keep track of damage and healing from the combat log for a focus. This however means you can't click the focus frame since it has no UnitID, though you might be able to modify the interface to use something like /targetlasttarget (it is not a valid unit token) to constantly update the last target to always be your focus. |
Quote:
That's why you build a list of scanners from multiple sources. If nameplates are disabled or out of range, you get the health from the combat log, party targets, target of target, unit events etc when it matches the focus. (You can even chain unitIDs like party1targettargettarget but that'll hurt performance) Quote:
In Vanilla you could force enable the nameplates and set their alpha level to zero + disable mouse click, and still get info that way. No idea if this is still possible in retail. Quote:
|
Quote:
|
Thanks everybody for your help. The answer was not what I had hoped for, but i'm glad to know how it works now!
|
All times are GMT -6. The time now is 12:32 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI