AdiButtonAuras

AdiButtonAuras

404k Downloads

Buffs without duration don't work with "Show Missing"

Nulgar opened this issue ยท 3 comments

commented

Version (*):

9.2.1

Bug description (*):

Choosing anything other than "none" for "Show Missing" on buffs without a duration causes the "Show Missing" logic to not work.
Affected buffs are e.g. Druid Forms, or those from certain Items/Toys such the Highmountain War Harnesses or the Honor Level Pennants & the Jolly Roger
(I noticed this for the items and only while writing this realized this could also affect regular spells)

What I was able to find out a.k.a. I hope this is not backseat programming:

With the model having an expiration time of 0, the function overlayPrototype:UpdateState in core/Overlays.lua can never recognize the buff as present, therefore always showing the "Show Missing" highlight.

I was able to achieve the expected behavior by changing the line
if timeLeft < missingThreshold then
to
if timeLeft < missingThreshold and not model.highlight then
but I suspect this is a very dirty fix, based on my limited understanding of the code.

edit: started writing this issue yesterday and must have somehow missed the issue templates, edited to at least resemble the Bug report template. Please add Bug label, I don't seem to be able to do this post-creation.

commented

I did the following for druid forms and it worked:

  1. Created a custom rule to show flash when Bear Form is not found on the player
    return Configure {
      'BearForm',
      'Flash when no bear form',
      5487, -- Bear Form
      'player',
      'UNIT_AURA',
      function(units, model)
        local hasForm = GetPlayerBuff('player', 5487) -- Bear Form
    
        if not hasForm then
          model.flash = true
        end
      end,
    }
  2. Removed the tick from "No flash out of combat" (this is under the general ABA settings), so that I can test it out of combat
  3. Set "Show Missing" to "Disabled" (else if breaks)
  4. Reloaded the interface (you need to reload the UI for changes in custom rules to take effect)

bear_flash

You can do the same for items, you just need to use 'item:123' as the third member of the table passed to Configure where 123 is the item id.

commented

I appreciate the effort of this elegant ingame workaround, should've thought of that myself, but I instead immediately went to hacking my copy :D

commented

The reason I am reluctant to use your solution is that it might have side effects I do not see. The reasons I see custom rules as a sufficient solution in this case:

  • item auras are outdated as the wowhead parser has been broken for years now (so auto-generated rules for items from recent expansions are likely broken or non-existent)
  • other use-cases you provided (like druid auras) require custom rules anyways as there are no auto-generated rules for them currently
  • if you feel comfortable with editing the core code, the custom rules syntax should be no problem for you.

So I'd close this for now.