1. #1

    ColdAuras - need some tips ;)

    Hi all

    I'm making a new addon, which is basically an extremely minimalistic aura tracker suited for my UI.

    I've already realized the parts needed for scanning the player auras, saving them in an array if they match the ones i want to track, made the icon with duration/stacks, etc.

    The bad part is that while everything works when buffs are gained, fade or are canceled, i cannot manage to refresh the frame and the duration/stacks if the buff is already up. Example: i have SnD on, if i refresh before it expires simply the frame does nothing - anyway after staying there for a little, it fades correctly when the buff expires.

    Any help is much appreciated I have the code if some wants to get an eye on it.
    Non ti fidar di me se il cuor ti manca.

  2. #2
    Deleted
    See COMBAT_LOG_EVENT-> SPELL_AURA_REFRESH and it's arguments.

  3. #3
    Mechagnome Tiolith's Avatar
    10+ Year Old Account
    Join Date
    Nov 2009
    Location
    Grim Batol
    Posts
    607
    Code:
    /run SAF = SpellActivationOverlayFrame FOS = "TEXTURES\\SPELLACTIVATIONOVERLAYS\\FURY_OF_STORMRAGE.BLP" SAS = SpellActivationOverlay_ShowOverlay SAH = SpellActivationOverlay_HideOverlays PSF=CreateFrame("FRAME")
    
    /run PSF:RegisterEvent("UNIT_AURA");PSF:SetScript('OnEvent',function() o=0 for i=1,40 do _,_,_,_,_,_,_,_,_,_,id=UnitAura("Player",i) if id==69369 then SAS(SAF,69369,FOS,"TOP",1,255,255,255,false,false) o=1 end end if o==0 then SAH(SAF,69369) end end)
    perhaps this is useful

  4. #4
    Quote Originally Posted by ccKep View Post
    See COMBAT_LOG_EVENT-> SPELL_AURA_REFRESH and it's arguments.
    I'm currently using UNIT_AURA as event trigger - going to check this for sure.

    @Tiolith: thanks for help, definitely giving a look at your code.
    Non ti fidar di me se il cuor ti manca.

  5. #5
    Both code snippets were useful, but still i cannot manage to refresh the cd.

    SInce the icons apear/disappear correctly, probably it's wrong the way i try to update the cooldown frame over the icon. If somenone needs more details, feel free to ask.
    Non ti fidar di me se il cuor ti manca.

  6. #6
    heres a snippet of code from a unit frame addon, run the function after you have drawn your auras

    Code:
    local postUpdateIcon = function(element, unit, button, index)
    	local _, _, _, _, _, duration, expirationTime, unitCaster, _ = UnitAura(unit, index, button.filter)
    	
    	if duration and duration > 0 then
    		button.time:Show()
    		button.timeLeft = expirationTime	
    		button:SetScript("OnUpdate", setTimer)			
    	else
    		button.time:Hide()
    		button.timeLeft = math.huge
    		button:SetScript("OnUpdate", nil)
    	end
    
    
    end
    there was a bit more to it, but its just desaturation and some other bits

  7. #7
    Quote Originally Posted by SpaceDuck View Post
    heres a snippet of code from a unit frame addon, run the function after you have drawn your auras

    there was a bit more to it, but its just desaturation and some other bits
    Going to try it for sure. BTW are you shadowmage UI author? nice to meet you
    Non ti fidar di me se il cuor ti manca.

  8. #8
    I am yes, nice to meet you too

    im guessing from the lack of replies you've fixed it?

Posting Permissions

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