Quantcast WoWInterface - View Single Post - Bug: All channel casts are displayed as interruptible
View Single Post
04-23-13, 11:16 PM   #1
Belechannas
A Warpwood Thunder Caller
Join Date: May 2010
Posts: 86
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

Last edited by Belechannas : 04-24-13 at 12:50 AM.