1. #1

    WeakAuras - Extracting buff values from UnitBuff LUA custom code

    So according to wowprogramming.com

    name, rank, icon, count, dispelType, duration, expires, caster, isStealable, nameplateShowPersonal, spellID, canApplyAura, isBossDebuff, _, nameplateShowAll, timeMod, value1, value2, value3 = UnitBuff("unit", "name" [, "rank" [, "filter"]])

    this is the code structure to get the buff information.
    Now when I do something like this (for example on my monk):
    Code:
    function()
        local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, nameplateShowPersonal, spellID, canApplyAura, isBossDebuff, _, nameplateShowAll, timeMod, value1, value2, value3 = UnitBuff("player", "Hit Combo")
        return value1;
    end

    I would expect to get some results, but apparently value1, value2 and value3 are all nil.
    Values such as name and spellID seem to work. I tried getting duration, it just stays fixed at 10 seconds (even though the buff duration is ticking down).

    I know that you could extract buff information like this, I even have some auras that are working with it still, and those that are, well are working... but when I try to make a new one, it just won't let me.

    I tried the similar thing with shaman's Flame Shock, script was:

    Code:
    function()
        local name, rank, icon, count, dispelType, duration, expires, caster, isStealable, nameplateShowPersonal, spellID, canApplyAura, isBossDebuff, _, nameplateShowAll, timeMod, value1, value2, value3 = UnitBuff("target", "Flame Shock")  
        return value1;
    end
    All I kept getting was a "0" in this case. For warlocks Unstable Affliction I've managed to get a number, but the number was incorrect and inconsistent, let's say about 40% lower then what the spell was actually ticking for.

    Any ideas?

  2. #2
    High Overlord Ironi's Avatar
    15+ Year Old Account
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    114
    Buff values aren't the damage values for a spell, afaik the value for UA is the damage when dispelled, but mostly they are used for absorbs etc, iirc the only way to get the damage value from (de)buff is to scan it's tooltip (or get it from CLEU ofc)
    Abandon the search for Truth; settle for a good fantasy.
    iKeystones, iLFRDescription, iEncounterEventTracker

  3. #3
    Afaik the buff values are the values that appear on the tooltip, so if I have a tooltip that says "Absorbs X% of next Y damage." such is the case with Ignore Pain from a warrior I am able to get both X and Y values. I'd assume same goes for "Increases damage you deal to the target by X%" from warrior's colossus smash, and likewise for damage dealt by DoTs and such. Main reason for thinking this for me is the fact that brewmaster monk's stagger can be read off a buff, so I assumed DoTs are readable.

    Am I wrong in that regard?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •