WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Weird addon issue with timewalking dungeons (https://www.wowinterface.com/forums/showthread.php?t=54058)

Aznamir 07-29-16 09:39 AM

Weird addon issue with timewalking dungeons
 
I've encountered a weird issue upon zoning into a timetalking dungeon.
I made an addon that track buff/debuff/cooldowns using GetSpellInfo(xxx) to get a spell name and then does the usual checking using the spell name.
When I zone into a dungeon on my moonkin druid, every tracker breaks until I do reloadUI.

Is there some kind of even I could intercept and re-set my addon to avoid that?

VincentSDSH 07-29-16 11:24 AM

You'll have to define "breaks" a bit more clearly.

Tim 07-29-16 01:20 PM

Without any code posted it sounds like your addon is trying to grab information before it's available. Whenever people are in need of coding help it works best when you provide your code and your issues.

Aznamir 07-30-16 05:56 AM

Quote:

Originally Posted by Tim (Post 317173)
Without any code posted it sounds like your addon is trying to grab information before it's available. Whenever people are in need of coding help it works best when you provide your code and your issues.

There isn't anything really special.
Similar to WeakAuras the addon has an array of trackable spells:
Code:

spells = {
        [1] = GetSpellInfo(8921),  -- Moonfire
}

and once the player enters combat it runs a 0.1s timer and check for the spell debuff on the target
Code:

spellName = spells[1]
_, _, _, _, _, buffDuration, buffExpire = UnitDebuff("target", spellName, nil, "PLAYER")
if buffExpire then
      expire = buffExpire - GetTime()
      timers[1]:SetText(expire)
else
      timers[1]:SetText("")
end

I've noticed TidyPlates having the same issue - in timewalking it shows only some of the debuffs on the target nameplace. Moonfire by some reason is not displayed. Same spell - that's a strange coincidence.

jeffy162 07-30-16 07:26 AM

Quote:

Originally Posted by Aznamir (Post 317201)
There isn't anything really special.
Similar to WeakAuras the addon has an array of trackable spells:

Similar to WeakAuras is STILL not the same as. It would probably help to post the code (if it's huge, post it to a "paste" site and post the link to it).

TOM_RUS 07-30-16 12:17 PM

Quote:

Originally Posted by Aznamir (Post 317201)
once the player enters combat it runs a 0.1s timer and check for the spell debuff on the target

Is it really only way? Sounds like a lot of wasted resources right here. Have you tried to listen for combatlog events instead (or some UNIT_AURA event)?

Aznamir 07-30-16 04:51 PM

Quote:

Originally Posted by jeffy162 (Post 317203)
Similar to WeakAuras is STILL not the same as. It would probably help to post the code (if it's huge, post it to a "paste" site and post the link to it).

I've included the relevant code in my response.
It looks like the issue was with trying to get spells names during the addon initialization.
Had to change it slightly to use spellIDs and only get the name when it had to be checked.


Quote:

Originally Posted by TOM_RUS (Post 317213)
Is it really only way? Sounds like a lot of wasted resources right here. Have you tried to listen for combatlog events instead (or some UNIT_AURA event)?

Parsing combat log means a lot more housekeeping such as re-setting timers upon spell recasts, creating and killing timers to update the UI, etc. As I see in the profiler my addon is pretty much at the bottom of memory/cpu usage.


All times are GMT -6. The time now is 04:16 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI