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.
Should this not work with Legion bodyguards from class halls?
Please see my response on this ticket.
Thanks a lot for the fix KanadiaN
for anyone wanting to get this working in 7.0.3
change line #177 of /lib/LibBodyguard-1.0/main.lua
from
to
I am not the author and this may not be a proper fix, but this is what I used to get mine working
@KanadiaN Thank you for this, I'd been wondering why it wasn't working anymore, but this fixed it right away.
Thx for the great addon, wish stuf or Blizz would have done it, its nice.
However, when a bodyguard dies and then the hour goes by, i have to turnoff the addon, then ask them to join me from barracks, then re-turn on the addon, and click show frame? Anyway to fix?
thx
Thanks for this great addon.
I used the following command after reading your posts below to see if I can heal my follower using my Exotic Hunter Pet's "Spirit Mend" ability: /run BodyguardHealth.BodyguardFrame.Frame:SetAttribute("macrotext1", "/targetexact Leorajh\n/cast [@target] Spirit Mend")
It worked but only once with each post of that entire command. If I click the bodyguard's name plate right now, it only highlights him -- doesn't heal. But if I paste the script above in and click the nameplate, it will cast a Spirit Mend on him. Once spirit mend is ready again, clicking no longer heals -- I have to paste the script again.
It would be great if we could just type in a spell name in the addon to lock in the spell to cast on any of the 5 bodyguards we can have, but I'm sure you're not interested in that as other macros will work just as well.
I am having some trouble with it:
(1) It does not seem to save the state of being enabled. It keep turning itself off.
(2) Every time I click on my BG, I get a confirmation window (Are you sure? Accept / Cancel). Clicking it disables the HP frame.
(1) After some relogging, the frame seems to have fixed itself. It is now visible on relog. Maybe dismounting and going into battle helped? Not sure :P
(2) The confirmation window problem is still there when I click on my BodyGuard. I tried using the "auto-hide BG chat text" feature, but it did not help.
So. I tried using another addon called "Bodyguard Away" to disable the BG chat, and it seems to not only to suppress the BG chat, but also fixed BGH's confirmation window problem.
BGH's only confirmation window is when the frame is unlocked (showing a dialog to lock it again, with the only button being "Lock").
Are you referring to the confirmation about sending the bodyguard away? This shouldn't be triggered by BGH anywhere though. It's normally reached after opening a gossip with the bodyguard (by interacting with them/right clicking) and selecting the option to send them home.
Just to confirm, clicking "Accept" in the dialog you mentioned doesn't actually send the bodyguard away does it? I'm unsure what it could be, as the dialog is not from BGH, perhaps a weird collision with some other addon, but I doubt it.
First off, HUGE! thanks for making this addon :D
I know you said that you would appreciated if bug reports and feature suggestions were made on the GitHub project page, but I don't really want to add yet another page to my list of daily look throughs, so I'm just going to add my suggestions here and hope that's okay :P
1. "Header Options" - So you can choose to show either the "Follower Name" + "Active/Inactive", Just the "Follower Name" or even completely hide the header. - Also an option for adjusting the X / Y offset would be nice to have, especially if you would be able to have the option to only have the follower's name showing.
2. "Mouse Click Bindings" - Basically make it work much like the HealBot when clicking on the HealthBar with either left / right / mouse button 2 / 3 / etc. would trigger special actions such as "Target Follower" (I know you already have this one) / "Focus Follower" / "Heal Follower" (Binding specific spells or items) / "Use Bodyguard Miniaturization Device" / etc.
Anyway that's just some of the ideas that popped into my head as I was enjoying this awesome addon ^.^
Once again thanks for making this, it was so needed :0)
You could post future inquires at the WoWAce project page (the tickets page), it uses your Curse account so you don't have to go create a new account for reports :)
Regarding #1: Perhaps header could be reworked to allow users to write their own format, similar to what some other addons have for that kind of stuff. You would enter a string such as "{n} ({s})" where the {n} is replaced with bodyguard name and {s} with their status. This would allow for pretty much endless customization, rather than adding thousands of different formats to a dropdown.
Regarding #2: I'm unable to test at the moment. With a bodyguard summoned, could you run this:
/run BodyguardHealth.BodyguardFrame:SetAttribute("macrotext1", "/targetexact Name of Bodyguard\n/cast [@target] Some Spell")
(Do not leave out the quotation marks, replace "Name of Bodyguard" with your bodyguard's exact name and "Some Spell" with some spell that is able to target friendlies.) And then left click the bodyguard frame. This should cast a spell on the bodyguard, if my assumptions are correct.
Sorry not familliar with this kind of stuff, when you say "run" do you mean as in write the mentioned line as chat text in-game? :P
Yes, just paste the line to your chat. For example, as a resto druid with Vivianne out:
/run BodyguardHealth.BodyguardFrame:SetAttribute("macrotext1", "/targetexact Vivianne\n/cast [@target] Rejuvenation")
Okay tried it with this line:
/run BodyguardHealth.BodyguardFrame:SetAttribute("macrotext1", "/targetexact Vivianne\n/cast [@target] Flash of Light")
And got this error line in return (Not sure how much of it was relevant so I just copied the whole thing):
Date: 2015-08-14 13:23:42
ID: 2
Error occured in: Global
Count: 1
Message: [string "BodyguardHealth.BodyguardFrame:SetAttribute..."] line 1:
attempt to call method 'SetAttribute' (a nil value)
Debug:
[string "BodyguardHealth.BodyguardFrame:SetAttribute..."]:1: in main chunk
[C]: RunScript()
..\FrameXML\ChatFrame.lua:2091: ?()
..\FrameXML\ChatFrame.lua:4442: ChatEdit_ParseText()
..\FrameXML\ChatFrame.lua:4096: ChatEdit_SendText()
..\FrameXML\ChatFrame.lua:4135: ChatEdit_OnEnterPressed()
[string "*:OnEnterPressed"]:1:
[string "*:OnEnterPressed"]:1
[C]: ?
Locals:
(*temporary) = nil
(*temporary) = <table> {
Frame = BodyguardHealthFrame {
}
Unlock = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:353
EnableMenu = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:312
UpdateHealthBar = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:227
SetMenu = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:291
ResetSettings = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:84
UpdateSettings = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:94
IsShowing = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:345
Show = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:320
IsLocked = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:349
UpdateName = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:165
Lock = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:371
UpdateStatus = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:173
SaveSettings = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:149
DisableMenu = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:316
Hide = <function> defined @Interface\AddOns\BodyguardHealth\frame.lua:333
}
(*temporary) = "macrotext1"
(*temporary) = "/targetexact Vivianne
/cast [@target] Flash of Light"
(*temporary) = "attempt to call method 'SetAttribute' (a nil value)
And clicking the frame only resulted in you targeting the follower as usual :0)
My bad, there's supposed to be another table access first, use this:
/run BodyguardHealth.BodyguardFrame.Frame:SetAttribute("macrotext1", "/targetexact Vivianne\n/cast [@target] Flash of Light")
Yes that worked, but the downside to that line is that it will also make you target the follower, if there's a way to avoid this then that would be even better ^^
You can add /targetlasttarget after the /cast (add "\n/targetlasttarget", \n being a newline). This is very good news though and should open up for a lot of possibilities, I just don't really have the means to debug the addon with how things are right now, making it difficult to implement new features. :/
Everytime I log in ithe bar will have gone off I have to open the options and select show to see it again, also I have no outline on the % text but everytime I log in it's set back to outlined and returns to the default font.
I could reproduce the fontflags problem (outline vs no outline), but was unable to reproduce the other issues you mentioned.
I'll be pushing out a new version to fix the issues with text outline not saving properly.
Have you tried running with only BodyguardHealth enabled? There shouldn't be any conflicts but you never know.