Using multi-target auras, there are problems with using @mouseover in macros (or similar functionality) to apply auras on enemy units. If the mouseover unit is your target or focus, it works properly. I suspect this is due to UNIT_AURA and UNIT_TARGET events not firing for mouseover unitid's, even though they are otherwise as functional as any other kind of unitid.
The handleEvent() is catching the application of debuffs to mouseover unitids by way of COMBAT_LOG_EVENT_UNFILTERED, so it knows to create a clone for that debuff. This event passes the name and guid of the unit being debuffed, so the name is used on the clone, and it will recognize that unit if targeted, and be able to refresh the aura information.
The problem is that it never makes an initial call to UnitAura() to propagate the duration, so you may get a progress bar that has the correct name, but has no icon and the duration is stuck at zero. This happens because it tries to look up the guid provided by the C_L_E_U event using GetUID(). Of course, the guid isn't found because the uidTrack is only called when UNIT_TARGET is fired, and it does not fire when the mouseover target changes.
Since mouseover unitids are a special case, a simple test in combatLog() may be the easiest fix, even if it's not particularly elegant:
local function combatLog(_, message, _, _, sourceName, _, _, destGUID, destName, _, _, _, spellName, _, auraType, amount) if(loaded_auras[spellName]) then if(message == "SPELL_AURA_APPLIED" or message == "SPELL_AURA_REFRESH" or message == "SPELL_AURA_APPLIED_DOSE" or message == "SPELL_AURA_REMOVED_DOSE") then local unit = WeakAuras.GetUID(destGUID); --manually look at mouseover unit since UNIT_TARGET does not fire for event mouseover unit if destGUID == UnitGUID("mouseover") then unit = "mouseover"; end if(unit) then updateSpell(spellName, unit, destGUID); else
Adding the conditional after my comment makes mouseover targets work like any other. Casting a debuff using an @mouseover macro will correctly show it's clone with duration and icon information.
A more through solution would be to use the event UPDATE_MOUSEOVER_UNIT and SetUID() for the mouseover unitid whenever it is fired. Though that digs a lot deeper into WeakAuras code than what I care to review. :)
|Arterion||Jun 25, 2013 at 17:55 UTC||Create|
- Jun 25, 2013
- New - Issue has not had initial review yet.
- Patch - Source code patch for review
- Medium - Normal priority.