BodyguardHealth
An AddOn that displays your bodyguard's current health in a frame on the screen.
Usage
Go grab your bodyguard and the healthframe will pop up! The frame can be unlocked and moved from the options.
Configuring
Run the /bgh options
command in-game to bring up the options window.
New in v2.0.0
Version 2.0.0 enables targeting of the bodyguard by clicking on the frame!
Bug reports and suggestions
It would be greatly appreciated if bug reports and feature suggestions were made on the GitHub project page rather than WowAce, as it gives a better overview for me when managing issues.
You can also fork the project and submit a pull request via GitHub (I probably won't accept code patch files submitted via WowAce, due to the extra overhead in implementing them compared to a PR on GitHub).
License
Copyright (c) 2014 by Adam Hellberg.
BodyguardHealth is licensed under the MIT License, see the LICENSE file for more information.
Out of those I run Prat and haven't noticed any bugs (even with the version with incorrect load order). Make sure to update to latest alpha and see if it fixes the bug, I'll push it out to release once I know whether it fixes the issue.
Progress is being tracked on this GitHub issue.
current version does not work with titan panel. very disapointing since I use it quite a bit. causes lua errors and inability to find lib.
Seems to be the same issue as reported by inarathra.
One suggestion I have: Have the frame disappear when a pet battle starts and return upon finish of a pet battle if the frame was showing prior to the pet battle.
Added in v2.1.0-beta (switch to Beta releases to download). Will make a release once I test it.
Thank you so much for making the healthbar clickable to target the bodyguard! LOVE IT! <3
Hi Fuskare01,
thanks a lot for the bodyguard health bar - it war really frustrating trying to keep an eye on the status of the bodyguard in a melee.
The addon Bodyguard Away uses some NPCIDs for recognizing the bodyguards. Couldn't that be used to make the bodyguard selectable via the healthbar?
Another possibility: I simply made a macro /target <complete name of bodyguard> and placed it in one of my bars. That works, but its a bit irksome when the healthbar is showing the status but the (macro) button to select the bodyguard is elsewhere. As I have seen your addon displaying the name of the bodyguard (even localized), wouldn't it be possible to add a subroutine, which would upon a click on the healthbar simply insert the name of the bodyguard (evidently known to the addon) into a /target call and execute it?
Thanks for any feedback.
Cheers.
Is it possible to make it target the bodyguard when you click on the healthbar?
As the bodyguard doesn't have a UnitID in the game, this is unfortunately not possible currently.
Aw, that would have been really useful! :( Thank you for replying to my question so quickly!
Hi Fuskare01,
thanks a lot for the bodyguard health bar - it war really frustrating trying to keep an eye on the status of the bodyguard in a melee.
The addon Bodyguard Away uses some NPCIDs for recognizing the bodyguards. Couldn't that be used to make the bodyguard selectable via the healthbar?
Another possibility: I simply made a macro /target <complete name of bodyguard> and placed it in one of my bars. That works, but its a bit irksome when the healthbar is showing the status but the (macro) button to select the bodyguard is elsewhere. As I have seen your addon displaying the name of the bodyguard (even localized), wouldn't it be possible to add a subroutine, which would upon a click on the healthbar simply insert the name of the bodyguard (evidently known to the addon) into a /target call and execute it?
Thanks for any feedback.
Cheers.
Hi jamak,
That is an interesting approach that might be decent. Not sure what the macro button functionality is like in the API, or if it can emulate a /target command at all, but it's worth looking into when I get some time.
I do know some other addons can call macros. Decursive is one such addon that comes to mind. Why not make a /target macro and call that?
Also, decursive allows you to click on a button to target someone. I guess I'll look through the APIs more and see what's possible.
RunMacroText() looks promising.
Ok, I found you could create a button and have it inherit from SecureActionButtonTemplate and call some macrotext:
frame.healthBtn = CreateFrame("Button", nil, frame, "SecureActionButtonTemplate")
frame.healthBtn:SetPoint("TOPLEFT", frame.healthBar, "TOPLEFT")
frame.healthBtn:SetPoint("BOTTOMRIGHT", frame.healthBar, "BOTTOMRIGHT")
frame.healthBtn:SetAttribute("toplevel", "true")
frame.healthBtn:SetAttribute("type1", "macro")
frame.healthBtn:SetAttribute("macro", "macrotext")
frame.healthBtn:SetAttribute("macrotext", ("/target %s"):format(frame.nameLabel:GetText()))
But I have no idea how to make the StatusBar become the button. I'm guessing that involves changing around how the mouse click handling currently occurs. Currently when the bodyguard health window is unlocked, a right click will not bring up the menu.
I ended up adding something similar to this in v2.0.0 (major version bump as the frame was redesigned internally to function as an action button). Since the base frame now inherits SecureActionButtonTemplate, clicking anywhere on it will target the bodyguard (as a regular unit frame would). Right click for menu is still there too, of course.
I tested it in combat and all seems to be fine, but if you notice any issues, please create a ticket over at WowAce or GitHub :)
Hi Fuskare01,
a very big thank you for the update! I just downloaded it and made a quick test in Socrethar's Rise and it seems to be targetting the bodyguard without any issues (localized title / name of bodyguard).
Also a big thank you to ayourk for the research on the API.
Cheers.
Please make the addon movable without having to go into options and such. Thanks.
Sorry for lack of response, I was apparently not subscribed to comments on this AddOn. The next release will have a right-click dropdown menu with options to hide and unlock it (among some other things).
For future reference, feature requests are best posted on the tickets page or issues page.
@MMOSimca
It would have to be an option in that case, as this addon is largely meant to relieve users of having to dedicate the focus frame to their bodyguard.
I also have zero experience working with secure frames, so I'm not entirely sure how to go about making a toggleable feature to tie the frame in with the focus unit.
Then of course, if you're focusing your bodyguard, why do you need this separate frame for it when you have the focus frame?
If there's a simple enough way to implement it, I can probably fit it in, so I suppose it's in the "future ideas" bin :P
Actually, it would be possible to implement that functionality probably, if you used the "focus" unitID.
Would restrict players from using focus for other things, but I doubt anyone is using it in Draenor's world map (the only place bodyguards go).
@Fuskare01
Ah, i didn't realize. Thanks anyways.