• 0

    posted a message on Shadowed Unit Frames [official]
    Reporting a buggy behavior. In short, tags registered in text area anchored to Alternate Power bar won't be shown/updated properly.

    I was trying to configure SUF text/tags so that current Alternate Power can be shown as number, because checking these numbers not just visually (as bars) but also numerically has some importance in encounters these days (ex: Heroic Amber-shaper in HoF and such). First I made some tags to get and return information of AltPower as follows:

    curmaxAltPower

    function(unit, unitOwner)
    local maxAltPower = UnitPowerMax(unit,SPELL_POWER_ALTERNATE_POWER)
    local altPower = UnitPower(unit,SPELL_POWER_ALTERNATE_POWER)
    if( maxAltPower <= 0 ) then
    return nil
    end

    return string.format("%s/%s", ShadowUF:FormatLargeNumber(altPower), ShadowUF:FormatLargeNumber(maxAltPower))
    end


    altPowerType
    function(unit, unitOwner)
    local maxAltPower = UnitPowerMax(unit,SPELL_POWER_ALTERNATE_POWER)
    if( maxAltPower <= 0 ) then
    return nil
    end
    local barType, minPower, startInset, endInset, smooth, hideFromOthers, showOnRaid, opaqueSpark, opaqueFlash, powerName, powerTooltip = UnitAlternatePowerInfo(unit)
    return powerName
    end


    For events which should trigger update of these tags, 'UNIT_POWER', 'UNIT_MAXPOWER' and 'UNIT_DISPLEYPOWER' are registered.

    I went Whack-a-Gnoll at the Darkmoon Faire (which gives number of hit gnolls as Alternate Power) and put these tags in default text area anchored to Health Bar for testing. These tags worked properly and return stuff that I need. Name of the bar and numbers were shown and updated like 'Whack-a-Gnoll 1/30' as I played. If I changed game to other games with Alternate Power or reloaded UI, tags reamain working.

    Then I made 2 text areas ('Left text'/'Right text') anchored to Alternate Power bars from Text Management tab in General section of configuration. And then registered tags I made to these text areas.

    What then happened was, if I registered tags with Whacking started (Alternate Power bar shown), tags start working and correctly updating. However, if I reloaded UI or changed area, tags no longer shown when I started Whack thereafter (bar was shown and worked properly but texts/numbers not shown).
    After reloading, if I re-registered tags (uncheck&recheck tags in Text/Tags tab in Unit Configuration) without starting Whack, and then started Whack, again tags weren't shown (bar was again OK. Regardless of tags properly shown/updated or not, Alternate Power bar itself was always working properly).

    So what I concluded is, there is some flaw in initialization/loading process of Alternate Power bar or in text-showing functions of SUF bars, which causes text anchored to Alternate Power bar not to be shown after reloading.

    If this is actually a bug, I hope it's fixed. Currently I'm just leaving these tags stayed in text area anchored to Health bar and practically it's OK, but for the sake of consistency I want them to be on AltPower bars. If there is other workaround for this issue, please enlighten me. And Thank you for creating and updating this lovely addon!
    Posted in: Unit Frames
  • To post a comment, please or register a new account.