WoWInterface

WoWInterface (http://www.wowinterface.com/forums/index.php)
-   nUI: Bug Reports (http://www.wowinterface.com/forums/forumdisplay.php?f=90)
-   -   Bug: All channel casts are displayed as interruptible (http://www.wowinterface.com/forums/showthread.php?t=46337)

Belechannas 04-23-13 11:16 PM

Bug: All channel casts are displayed as interruptible
 
This has been driving me nuts for a while. I finally figured out what's going on (and how to fix it).

This is in reference to nUI5, latest version. I have not checked the code for nUI6.

In nUI_UnitCasting.lua, there are calls to the API functions

UnitCastingInfo

and

UnitChannelInfo

Both calls in nUI use 9 return arguments, the last of which is interpreted as the flag indicating whether the cast is (not) interruptible. This is correct for UnitCastingInfo.

The problem is that UnitChannelInfo only returns *8* arguments. The 8th return parameter (castID) of UnitCastingInfo is *not* present for UnitChannelInfo, which means the flag which indicates that a channeled spell is not interruptible is in the 8th (and final) returned value.

Since nUI expects the flag to be in the 9th returned value for both casts and channels, the value it gets for channels is always nil, which makes it think the spell is not "not-interruptible".

Trivial fix: delete the variable this_cast.castID from the list of returned values in the call to UnitChannelInfo (but *not* UnitCastingInfo) in nUI_UnitCasting.lua.

Although the returned value of castID (for casts) is shuffled around various data structures in nUI, it does not appear to be actually used for anything.

Edit: Checked nUI6, and the bug is already fixed there

spiel2001 04-24-13 01:55 PM

I have some bar work to do in nUI5 to deal with the temp shapeshift bar... I'll fix this at the same time.

spiel2001 09-11-13 06:10 PM

This should be in tonight's 5.07.37 release.


All times are GMT -6. The time now is 07:55 PM.

vBulletin © 2017, Jelsoft Enterprises Ltd
© 2004 - 2017 MMOUI