WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   ActionButtonBorder highlight on unit buff/debuff (https://www.wowinterface.com/forums/showthread.php?t=55988)

zork 01-20-18 02:47 PM

ActionButtonBorder highlight on unit buff/debuff
 
I just tested this macro in combat:
Lua Code:
  1. /run local a=_G["ActionButton8Border"] local b=UnitBuff("player", "Schildblock") if b then a:Show() else a:Hide() end

https://imgpile.com/i/nru4Dg

I have Shield Block on ActionButton8.

/dump GetActionInfo(8) returns "spell", 2565 which is the spell id for Shield Block
/dump GetSpellInfo(2565) returns the spell info for the action button spell shield block
/dump GetSpellInfo(132404) returns the spell info for the player aura button spell shield block

There is an addon called https://github.com/AdiAddons/AdiButtonAuras which sort of does what I am looking for but it is quite huge.

I want to connect an action button spell to a unit aura. If both match the corresponding action button border should get highlighted.

It should be possible to set up a small table that connects action button spells to unit auras. All one needs is a script that parses unit auras and checks for matches. If one is found the button border will be highlighted.

zork 01-20-18 08:29 PM

I made a small addon around the idea.
http://www.wowinterface.com/download...uttonAura.html

Rainrider 01-20-18 08:58 PM

LibPlayerSpells for the spell-to-aura connections. Don't know what your definition of "small table" is, but keeping this up to date is a huge PITA.

Aura look-ups by name will give you false positives.

gempir 01-21-18 09:02 AM

The idea is cool but IMO only useful in some cases. Not all auras will have spells (Example: Enrage) so you will have another tracker of sorts in addition to this visual hint.

Resike 01-21-18 01:43 PM

I think you are highlighting Disarm instead of Shield Block.

Edit: Forget it, i was editing the file inside the damn zip.

Rainrider 01-21-18 02:03 PM

The spells are hardcoded to the actionbar buttons. Once they change places you get the wrong highlights. Also broken when the actionbar page is changed.

@Zork you might want to use 'HELPFUL|PLAYER' or 'HARMFUL|PLAYER' as filter, else you might get the auras from someone else.

zork 01-21-18 03:56 PM

Thx rainrider. The addon is a just a bare bone proof of concept atm. Just wanted to know if the general idea is working.

semlar 01-21-18 04:28 PM

I use this technique in Crack Cooldown to show the duration of your buffs and debuffs on your action buttons, but it only works when the name of the aura matches the name of the spell if you don't use a lookup table.


All times are GMT -6. The time now is 07:32 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI