Thread Tools Display Modes
Prev Previous Post   Next Post Next
01-20-11, 05:48 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Help needed generating raid debuff icon

What I want to achieve is this


UNIT_AURA
http://wowprogramming.com/docs/api/UnitAura
http://www.wowwiki.com/API_UnitAura

Blizzard informations (3.3.0)
As great as having source ids on this is, it'd be really nice to be able to get the same ids
from UnitAura(). I get no end of complaints about how the vehicle debuffs aren't showing as theirs.
While I haven't seen the vehicle fights in Ulduar yet, if they're anything like the Malygos fight
I"m sure I won't stop hearing this complaint.

I know this is sorta a wish list thing but it does seem like a natural progression of giving us
that info with the combat log that the UI should be able to have access to it for usage by frames.

With this in mind, we're making the following change to UnitAura, UnitBuff, and UnitDebuff:

name, rank, icon, count, debuffType, duration, expirationTime, caster, isStealable = UnitAura("unit", index or ["name", "rank"][, "filter"]) name, rank, icon, count, debuffType, duration, expirationTime, caster, isStealable = UnitBuff("unit", index or ["name", "rank"][, "filter"]) name, rank, icon, count, debuffType, duration, expirationTime, caster, isStealable = UnitDebuff("unit", index or ["name", "rank"][, "filter"])

The isMine return value has been changed to caster, where caster is the unit token of the unit that applied the aura. This works for all unit tokens, including "pet" and its incarnations, "focus", and "target".

Most importantly, if the aura was applied by a unit that does not have a token (for instance, a vehicle) but is controlled by one that does (the player), this function will return the token of the unit's controller. In other words, if I'm a shaman and I cast Totem of Wrath, which applies the Totem of Wrath buff, the buff will return the "player" token as its caster unit because totems don't have their own unit tokens.

Auras will also be sorted by the game code in a similar fashion such that the first n auras returned by the unit aura functions will be auras applied by either the player or a unit the player controls or owns (e.g. vehicles, pets, totems).

EDIT: I previously stated the "caster" return for the new UnitAura functions could not be an arena unit token. This is incorrect. The new UnitAura functions will return "arena" tokens when appropriate.
Everything is done except the aura icon display.

What I want is display a maximum of one debuff icon per raid member.

Debuffs that can be dispelled will make the frame glow in debuff color, that is enough for me I think.

But I'm looking for a solution to track raid unit aura icons that fullfill the following conditions:
- debuff
- casted something that is not a player
- duration < 30 seconds

I don't want to work with a debuff table list but if nothing else is helpful a whitelist is the only solution I can think of. Maybe it is the best solutuin anyway.

I know some of you tried sth like that already. Maybe we can share some ideas.

My current idea is to grab all the possible auras find the caster and check for UnitIsPlayer(caster). This should give me all possible aura icons that I can collect in a table.

But how is the way from having that table to displaying the icon? At first I thought I could do this with the default oUF functions but I think it is better to register the UNIT_AURA event myself and do the check internal.

Some suggestions are welcome.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

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

Last edited by zork : 01-20-11 at 05:56 AM.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Help needed generating raid debuff icon


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