Hello, I searched for an official thread, but came up empty.
Apologies if one exists and I missed it (advanced search, titles only, 'banzai').
Is there any possibility we'll get the focus added to the hostiles scanned for aggro status?
I noticed that a friendly focus was recently added, ie you will get aggro status if any hostile targeted by the party/raid aggros on your focus.
I'm requesting the opposite.
To make it clear:
What we have now would be useful for a tank focusing a healer.
Healer gets aggro LibBanzai will catch it (if someone has the hostile aggroing the focus targetted)
What I'd like is an aggro warning when a focused hostile aggroes on a friendly regardless if said focus is targeted by anyone.
Shackle broke and going for priest, sheep broke and going for mage, sap, cyclone.. you get the idea.
Adding focus to scanning in addition to target that's in now.
targettarget->someone in our roster
focustarget->someone in our roster
I'd be happy even if it's restricted to the player only
and not the entire roster of units checked.
The aggro check for focus comes down to (in the current implementation):
UnitCanAttack ( focustargettarget, focustarget )
Assuming other checks have passed for simplification.
Assume player = Dridzt
I focus a hostile = Vicious Teromoth
I target another hostile = Dreadfang Lurker
I move within my focus aggro range and body pull without targetting it.
My focus aggros me and starts beating on me, my target is still another mob.
LibBanzai will check this (regarding my focus target):
focus = Vicious Teromoth,
focustarget = Dridzt,
focustargettarget = Dreadfang Lurker.
UnitCanAttack ( Dreadfang Lurker, Dridzt )
It will then go on to check if one of the units in the roster
in this case me = Dridztor focus = Vicious Teromothis the same as the ttId = Dreadfang Lurker.
So while my focus: Vicious Teromoth has targeted and is beating on me
LibBanzai will never register aggro against me.
I hope it's not too confusing.
The easiest way to test would be to make a simple addon register the callback and try the above experiment.
Target something else.
Bodypull your focus while keeping your other target (don't attack it).
You get aggro from your focus but no aggro registers with LibBanzai.
For a real-game example.
Imagine a healing priest that's also on shackle duty and his shackle breaks.
He will get no advance warning as his target
and the focustarget are two unrelated things.
Edit: I can hack this in, so that the original behavior is preserved
and aggro status is passed back in this case too, but it's ugly.
Further more it'll get overridden by newer versions of the Lib if I just hack it in locally.
I was hoping to describe it and see if there's an elegant way to do it. :)
for name, units in pairs(roster) do
local unit = units
local targetId = targets[unit]
if UnitExists(targetId) then
local ttId = targets[targetId]
+ if unit == "focus" and UnitIsEnemy("focus", "player") then
+ ttId = "focustarget"
+ targetId = "focus"
if UnitExists(ttId) and UnitCanAttack(ttId, targetId) then
for n, u in pairs(roster) do
if UnitIsUnit(u, ttId) then
banzai[n] = (banzai[n] or 0) + 10
if banzai[name] then
if banzai[name] >= 5 then banzai[name] = banzai[name] - 5 end
if banzai[name] > 25 then banzai[name] = 25 end
This will do what I requested and catch the extra case where
focus is a hostile unit and it aggros on one of our friendlies in the roster.
All info is available from the game to determine aggro but
the current implementation misses it because it implicitly assumes
"focus" is always in the pool of friendlies (roster) and also the targettarget
chain is not symmetric with the focustarget chain.
It is ugly but it seems that "focus" was added as an afterthought as well.
It will preserve the current behavior, ie LibBanzai will continue to do what
it does but it will capture a couple extra cases including the one I described above:
"A focused unit that no one has targeted, aggros one of our roster".
Any chance to get this or equivalent change in?
If that's not deemed desirable, is there a way to force an addon
to use a specific library and not the latest available?
Sorry for being a pest but this falls directly into the scope of an aggro library.
At the moment I have only 2 options:
- write a separate OnUpdate handler (or a separate case in an existing one) in my addon to take care of just this situation.
- distribute a modified LibBanzai-2.0 library with my addon.
None of these options are very attractive obviously.
LibBanzai-2.0 applies a simple and at the same time very clever logic to the aggro problem.
For the benefit of users of the library or BanzaiAlert addon
(not the author who knows the inner workings very well ofc)
what it does in simple words is build 2 lists.
One list of the "good guys" (player, pet, party and party pets, raid and raid pets - and recently focus)
And one list "bad guys" (good guys targets filtering them through the UnitCanAttack api).
It then tries to match "bad guys" targets to "good guys" and gives an aggro update
when one from the "bad guys" list targets one of the "good guys".
This works great for everything except when the focus is a hostile in the current implementation.
Focus being a hostile that is not targeted by anyone in the party / raid or the player,
is a quite common situation in the game.
Every class that uses a focus macro to CC one target while dps-ing / healing another,
will find itself in this situation.
Focus breaks and the hostile targets & runs to the player.
The information is already available at this point to get an aggro warning before it starts hitting on the player,
or someone targets it but LibBanzai-2.0 doesn't use it.
A very simple test case to demonstrate the problem solo is what I described above.
You can use BanzaiAlert to enact it.
1. Focus a hostile: mobA.
2. Target another hostile: mobB.
3. Keep mobB targeted, and approach mobA (your focus) until you body pull.
BanzaiAlert will not warn you of aggro when your focus targets you and even when it proceeds to beat you up,
until you actually target it.
A change like the one I proposed above (or a better one with equivalent result)
will make it so LibBanzai-2.0 will work in this case
(and a couple more complex ones - I don't mention to keep this simple - that it currently ignores)
Is there a chance that this will be added or is it considered out of scope and I should look at my other options?