Quartz

188 - Depleting and reverse cast bars

What does the provided patch do?
The patch was requested by a friend of mine who didn't like the depleting cast bars for channels. I've made the depletion optional and also introduced reversed cast bars. Both options can be configured for normal casts and channels independently and for each of the player, target, focus, and pet bars. Other bars can easily be extended with these options: the actual implementation is done in QuartzStatusBar.lua and CastBarTemplate.lua

Please provide any additional information below.

Default settings keep current behaviour:
- When casting: not depleting, not reversed
- When channeling: depleting, not reversed

Included are a patch against git (0d31d195fa861e5cf977eb41b255df13e52fd1ec) and a zip that can be installed *over* a 3.1.1 release to include this patch. The patch file does not include translation files, the zip does.

Finally nailed where the corner case came from. This turns out not to be a timing issue. It has to do with the way the flight module works. The fix described below (check for perc==nil) is not needed (and indeed should not be used because of performance). Instead, update modules/Flight.lua to include:

at line 137 (directly after setting Player.Bar.casting and Player.Bar.channeling

Triggering the original bug (and hence verifying this fix) in the patched quartz is simple: log in on a character, don't do anything and grab a flight path for which the time is known (have the flight module active, of course). Make sure it's a short flight...

Ran into a small corner case, probably due to a timing issue. In the patched CastBarTemplate.lua at line 80 it is possible for perc to be nil. Add a small check at that line to set perc to 0 in that case to fix this corner case.

My friend has been using this patch to test it and noticed that the latency bars seem incorrect. This was indeed so and has been fixed. A new patch and zip have been uploaded. The addition is that modules/Latency.lua is now aware of depleting and reversing cast bars.