Slothpala / RaidFrameSettings

GNU General Public License v2.0
4 stars 4 forks source link

Changes to the way aura frame anchor is set up and etc #21

Closed excorp closed 3 months ago

excorp commented 5 months ago

I want placed auras to always show up regardless of maxBuffs

To do this, I want to create a dedicated aura frame for the placed aura, set its anchor in it beforehand, and display it in the appropriate aura frame when it is affected by a buff.

To handle this, I reset the default aura frame (frame.buffFrames). While resetting it, I also make sure that blacklisted auras are not set, so that I can guarantee that the maxBuffs number of buffs are shown. If I do a hide(), for example, if I have 3 blacklisted auras affected and maxBuffs is 3, I want to see up to 3 other buffs, but none of them are visible.

UNIT_AURA event or CompactUnitFrame_OnUpdate()
-> CompactUnitFrame_UpdateAuras(frame, unitAuraUpdateInfo)
  -> CompactUnitFrame_UpdateAurasInternal()
    -> needed fullupdate?
      -> CompactUnitFrame_ParseAllAuras() 
        -> AuraUtil.ForEachAura() 
          -> CompactUnitFrame_ProcessAura() 
          -> Set frame.buffs,frame.debuffs
    -> else
      -> CompactUnitFrame_ProcessAura() 
      -> Set frame.buffs,frame.debuffs

    -> CompactUnitFrame_UtilSetDebuff()
    -> CompactUnitFrame_HideAllDebuffs() => I Hooked for customizing buff
    -> CompactUnitFrame_UpdatePrivateAuras()

    -> CompactUnitFrame_UtilSetBuff()
    -> CompactUnitFrame_HideAllBuffs() => I Hooked for customizing debuff

    -> CompactUnitFrame_UtilSetDispelDebuff()
    -> CompactUnitFrame_HideAllDispelDebuffs()

I also made it handle buff/debuff frame count increments and let it modify framestrata.

image image

Slothpala commented 5 months ago

Hi, first of all, thanks again for contributing! Looks like good improvements. But please don't do massive PR like that, it makes it really hard to follow your changes and let's say I have 15 minutes to check something, that's just too much to do in that time. My fault, though, for not having a contributing guideline. I will make one in the future. But in short, do one PR per issue/enhancement. So let's say you want to change the way cooldowns are displayed, make a PR that does just that. You want to increase the number of BuffFrames -> do a PR for that. Otherwise it is almost impossible to review this in a reasonable amount of time. So thank you for your PR, but I would ask you to do smaller, more focused PRs.

excorp commented 5 months ago

Oh, I'm so sorry. I'll do what you say next time. Please consider this PR as a sign that I'm working on something. I'm trying to play the game and I'm getting some errors, so I'm going to fix them and re-publish the PR in a feature-by-feature breakdown.

excorp commented 5 months ago

I re-registered each with a different PR, except for the whitelist part. I deleted the whitelist part because it was in error.

Slothpala commented 5 months ago

Perfect! I will check them out step by step whenever i find some time!