Minor inconsistencies with interrupt behavior in castbar
linaori opened this issue ยท 0 comments
I found a few minor issues with the interrupting and I have some fixes that could be done
Issue 1
In the following snippet the code to set the following information is skipped if the player name interrupting is disabled. This results in the following lines of code not being executed and thus not available in mods
castBar.IsInterrupted = true
castBar.InterruptSourceName = sourceName
castBar.InterruptSourceGUID = sourceGUID
Lines 9459 to 9466 in 1bffeb0
Proposal
Move the if (not Plater.db.profile.show_interrupt_author) then
check to wrap around the SetText(INTERRUPTED ..
call only so that all other code is still executed. I suspect the early return also blocks the interrupt animation from playing if the interrupt name is not shown.
Issue 2
The snippet takes sourceName
, and the translit happens only on name
:
Lines 9481 to 9487 in 1bffeb0
Proposal
Set the interrupt source name to be the translit name so mods get this value instead of the original.
castBar.InterruptSourceName = name
Issue 3
In the DF unitframes lib IsInterrupted
isn't set because the key is named interrupted
there. I'm not sure if these 2 are supposed to work together, but both are available in mods
local castBar = unitFrame.castBar
print(castBar.IsInterrupted, castBar.interrupted)
Plater-Nameplates/libs/DF/unitframe.lua
Lines 1821 to 1847 in 1bffeb0
Proposal
Plater could use the same keys as the DF lib. Always sync interrupted
to IsInterrupted
and replace this one by interrupted in the scripting panels. Alternatively DF lib could start using IsInterrupted
instead of interrupted
.
Another thing is that InterruptSourceName
and InterruptSourceGUID
could be moved to the lib if that's where the properties should go.