tisdag 9 mars 2010

Slam event findings

Ah, so, where do we get the Bloodsurge proc info from?

It turns out that wile it was previously included in (unfiltered?) combat log reports, it has been removed (as of some patch, breaking several addons, bummer) from the combat log and is now to be found among the UNIT_AURA events.

The UNIT_AURA event is reported whenever the player (or something?) gains or loses a debuff/buff.

Unfortunately, the UNIT_AURA event is accompanied by only one meagre argument - a unitId. unitId seems to be string, often with the value "player".

So, that's not much to work with.

However, fortunately, there's the UnitAura("str") call. Goes like this:

name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitAura("unit", index or "name"[, "rank"[, "filter"]])

(http://www.wowwiki.com/API_UnitAura)

The UnitAura call is for querying the buffs on a unit. I.e., the buffs shown in the upper right corner next to the minimap in the default layout of the GUI.

In brief, "unit" should be unitId given by UNIT_AURA (if == "player", supposedly). The index is which of the buffs in the upper right corner you want to get more info on.

The buffs are 1-indexed. I.e. the first buff (counting from upper right position, I think) has index 1. max_index seems to be 40.

If name is nil for an index, there is no buff at that index. Break loop.

Looping indices 1 to 40 on UNIT_AURA event during combat indicates that instant slam Bloodsurge proc buff has name = "Slam!".

Inga kommentarer:

Skicka en kommentar