Quantcast oUF_DebuffHighlight - WoWInterface
Thread Tools Display Modes
02-10-18, 05:42 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
oUF_DebuffHighlight

I needed a module to highlight textures if a unit is affected by a dispellable debuff with the option to show the glow even with the unit not being able dispell the debuff itself.

https://imgur.com/a/wUYYx

I revised oUF_DebuffHighlight for that case.
https://github.com/zorker/rothui/blo...fHighlight.lua

It either displays a texture, colors a texture or colors a backdrop.

My implementation for oUF_Simple is to use the health backdrop border as a highlight texture.
https://github.com/zorker/rothui/com...23f7eaa7f5f7cc

What I'm not sure about is this
Lua Code:
  1. local CanDispel = {
  2.   PRIEST = { Magic = true, Disease = true, },
  3.   SHAMAN = { Magic = true, Curse = true, },
  4.   PALADIN = { Magic = true, Poison = true, Disease = true, },
  5.   MAGE = { Curse = true, },
  6.   DRUID = { Magic = true, Curse = true, Poison = true, },
  7.   MONK = { Magic = true, Disease = true, Poison = true, }
  8. }

I bet that has changed.

*edit* That is odd. I thought I posted it in the oUF forum. Wlep!
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 02-10-18 at 10:16 AM.
  Reply With Quote
02-10-18, 12:47 PM   #2
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
I don't think it would be this easy, since some dispels are spec based.
  Reply With Quote
02-11-18, 02:43 PM   #3
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 453
If you want to use oUF_Dispellable for this, here is some sample code how to use backdrops with it. However, if the class cannot dispel at all (DKs, rogues, warriors), oUF_Dispellable will completely disable itself. While I don't understand why you want to highlight the whole frame based on a debuff type that is undispellable by the player, you could use a check like IsElementEnabled('Dispellable') and then use oUF's PostUpdateIcon to get the debuff type.

If you dislike this, oUF_Dispellable uses LibPlayerSpells-1.0 to fetch the list of possible dispel spells for the player's class. Feel free to use oUF_Dispellable's code if you want to use this approach but code your own DebuffHighlight element. If you consider the 616 KB static memory use of LPS a waste, you can just use it to build you own table with dispel spell IDs. The dispels are based on spec and honor talents, some are self-dispels only and for warlocks some depend on the currently summoned demon. Keep in mind that LPS does not differentiate between pet and player as a spell source, you have to read the code comments for those special cases for the warlock class.
  Reply With Quote
02-11-18, 03:28 PM   #4
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
I want it for the coloring because I really like that glow. Not sure how PostUpdateIcon would help here. I'm totally fine with a generic true/false for the optional dispell class table. It is fine in most cases.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 02-11-18 at 03:54 PM.
  Reply With Quote
02-11-18, 04:10 PM   #5
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,289
Originally Posted by zork View Post
I want it for the coloring because I really like that glow. Not sure how PostUpdateIcon would help here. I'm totally fine with a generic true/false for the optional dispell class table. It is fine in most cases.
The unit frame glow is specially useful for raid frames or frames with no debuff frame.
  Reply With Quote
02-12-18, 05:23 AM   #6
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 453
Then I don't understand. If you use a backdrop, use .UpdateColor. What is the problem with that?
  Reply With Quote
02-12-18, 07:09 AM   #7
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
I would totally do that if I wanted a module that only shows dispellable glows.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
02-12-18, 07:14 AM   #8
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 453
What else should it display then?
  Reply With Quote
02-12-18, 07:48 AM   #9
thomasjohnshannon
A Theradrim Guardian
 
thomasjohnshannon's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2009
Posts: 65
Originally Posted by zork View Post
What I'm not sure about is this
Lua Code:
  1. local CanDispel = {
  2.   PRIEST = { Magic = true, Disease = true, },
  3.   SHAMAN = { Magic = true, Curse = true, },
  4.   PALADIN = { Magic = true, Poison = true, Disease = true, },
  5.   MAGE = { Curse = true, },
  6.   DRUID = { Magic = true, Curse = true, Poison = true, },
  7.   MONK = { Magic = true, Disease = true, Poison = true, }
  8. }

I bet that has changed.
It is mostly ok but only the healing specs can dispel magic debuffs and mages can't remove curses anymore. Just setup an OnEvent function to check for player spec and it will be fine.
__________________
Thomas aka Urnn

Last edited by thomasjohnshannon : 02-12-18 at 07:52 AM.
  Reply With Quote
02-12-18, 07:53 AM   #10
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,739
Maybe the first post was misleading.

The old oUF_DebuffHighlight allowed to display a texture, color a texture/backdrop/backdropBorder if any unit was effected by a debuff of type (Magic, Curse, Disease, Poison). Optionally you could enable a filter so only classes that could dispel that debuffType would see it. That is exactly what I needed. I just updated the module.

My personal class of choice (prot warr) cannot dispell the debuff (well my Dwarf could) yet I still want to see that debuff glow. I used it in oUF_Diablo too. If I got poisoned the orb got a green glow that instantly told me that something just poisoned me. It is a nice touch.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW) | TDMOG

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)

Last edited by zork : 02-12-18 at 08:04 AM.
  Reply With Quote
02-12-18, 01:39 PM   #11
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 453
I didn't mean to advertise for my oUF element, I just thought I misunderstood your use case and failed to provide a common functionality desired by layout authors. I'm glad you have it as you like it now, thanks for taking the time to explain.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » oUF_DebuffHighlight

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off