vendethiel / GladiusEx

13 stars 19 forks source link

Shadowy Duel breaks DR tracker. Possible fix? #47

Closed Bodify closed 2 years ago

Bodify commented 2 years ago

Hello again! As title says; When someone gets into a Shadowy Duel it breaks the DR tracker on that target.

I saw this addon: https://www.curseforge.com/wow/addons/gladius-undoggo-plugin

Does this work for GladiusEx? And is there any way to just implement this code into GladiusEx if it works maybe?

Bodify commented 2 years ago

I edited the lua file and changed every reference to Gladius to GladiusEx and it seems to have done the trick. I've only had one Shadowy Duel happen in arena so far but it did not break the DR's during that duel so I'm guessing it works.

vendethiel commented 2 years ago

I've never really taken a look at what happens with the DR tracker when someone gets dueled. How does it break exactly? Looking at the patch, it makes the DR tracker ignore shadowy duel as a spell, but that spell isn't supposed to have a DR category in the first place, so...

Bodify commented 2 years ago

I've never really taken a look at what happens with the DR tracker when someone gets dueled. How does it break exactly? Looking at the patch, it makes the DR tracker ignore shadowy duel as a spell, but that spell isn't supposed to have a DR category in the first place, so...

When a target that has DRs on them gets in a Shadowy Duel (I think at the point of the duel ending) whatever DR they had on them just disappear (doesn't always happen, but likely). They’re still on DR of course but it doesn’t show anymore. I’m pretty sure I have a clip or two of it happening if you’re interested to see.

vendethiel commented 2 years ago

I am, looking at the code and at the fix in the addon you linked (which just instructs the DRTracker to ignore shadowy duel) I’m not sure why that happens. I wonder if I can reproduce that by dueling a party member…

Bodify commented 2 years ago

I did say I had clips but I struggled finding some actually showing the bug. I did find one clip from a lfg session on my alt with random lfg rogue which isnt the best example but it does still show a weakness: Streamable video link

In this example the rogue kidneys the mage early and then duels him but as the updated DR from kidney is about to pop up it just disappears instead because there is a duel and it never pops back up.

Because of the circumstances I do not know if this is fixable but the bug I had in mind making this post is I've seen 16-20 second DR's just vanish from the list when a duel happens but I couldn't find a clip of it happening unfortunately.

vendethiel commented 2 years ago

Just from looking at the code I have no idea how this can happen. Looking at the fix code:

                local spellID = select(12, CombatLogGetCurrentEventInfo());
                if spellID == 207736 then
                        return;

So it checks the 12th argument (spellID) and ignores the event if it's shadowy duel (207736) it ignores it. Fair enough. However...

Looking at the DRTracker code:

function DRTracker:CombatLogEvent(event, timestamp, eventType, hideCaster, sourceGUID, sourceName, sourceFlags, sourceRaidFlags, destGUID, destName, destFlags, destRaidFlags, spellID, spellName, spellSchool, auraType)
    -- Enemy had a debuff refreshed before it faded
    -- Buff or debuff faded from an enemy
    if eventType == "SPELL_AURA_REFRESH" or eventType == "SPELL_AURA_REMOVED" then
        if auraType == "DEBUFF" and DRData:GetSpellCategory(spellID) then

The code requires a debuff to be refreshed/removed that is marked as a DR. Shadowy duel is NOT marked as a DR, so the code shouldn't even carry on running. If the unit "disappears" then we might get many more SPELL_AURA_REFRESH/SPELL_AURA_REMOVED, but those shouldn't have the Shadowy duel ID, so the fix shouldn't do anything.

I considered that maybe the unit "disappears", but I don't think there's any code that checks for that.

I'm a bit puzzled and I'll need to try it out myself.

Bodify commented 2 years ago

Well, going through all my clips there was a lot of duels happening but the bug not appearing on any of them. So it is a real possibility that the addon that supposedly fixes it actually doesn't do anything and that I just assumed it did since I wasn't getting the bug. But yea from looking back at my clips it's apparent that the bug isn't as prevalent as it feels, just that when it does happen; it feels really bad :P

vendethiel commented 2 years ago

Even on the clip you posted, the cheapshot dr fades « naturally ». Admittedly the underlying bug is that the kidney doesn’t show up as a dr, but that’s because the target is in a duel and we don’t get the AURA_REMOVED event for the kidney to start the DR.

i’m going to close this one as NOREPRO :).