This page is to provide additional information about how this module works and what makes it superior to the default destruction module.
All clcInfo module create a priority list of possible spells to be cast. The main clcInfo program calls the module several times a second and the items in the are constantly updated. The default queuing system is a yes/no based queue. If a spell or debuff is off cooldown, it is given a value that means cast it now. On each update, the first and second spells that are ready are shown in the skill icons. The problem with a yes/no system is when spell come off cooldown in the middle of the GCD, the skill icons will change on the intermediate updates. I call this icon thrashing.
I've rewritten the queue system to use a countdown. Spells that need to be cast right now and are off cooldown are given a zero. Other spells are given a time in milliseconds before the spell is off cooldown or before the related debuff expires.
The first skill icon will always suggest the spell with the highest priority that has a zero time remaining. The queue is then walked to come up with the spell with the next lowest return value in priority order. This avoids icon thrashing because the second skill icon goes from a small positive time to zero and then appears as the first skill icon. You will notice that this module very rarely changes its mind in the middle of a GCD.
Time to Target Calculation
Warlocks are interesting that there are two variables affecting how long it takes for a spell to take effect from the time you begin casting it. First is the actual time to cast the spell. This depends on the current haste and it is updated on refresh cycle to account for any current buffs a procs. The time returned for each spell in the queue is then updated based on current cast time.
Secondly there is the time it takes for many spells to travel from you to the target. If you cast Soul Fire at 40 yards, it will take longer for your Improved Soul Fire buff to occur than if you cast Soul Fire at 10 yards. Although there is no API to exactly determine spell travel time, I wrote some additional code to calculate travel time based on the delay between a cast and when a debuff occurs. I also discovered that spell actually accelerate as they travel to the target.
When this module returns a queue time for spells such as Soul Fire that result in a buff, it is actually the exact time it will take for the spell to hit as the existing buff wears off. There are reminder times that are user configurable, but they should only be set to allow a bit of personal extra time, there is no need to allow for cast and travel time.
Dynamic Rotation Adjustments
- Shadowflame is only suggested in the rotation if the target is within 8 yards. There is a range icon provided that will light up if the target is in range, and disappear if the target is out of range.
- Chaos Bolt is temporarily removed if spell haste is greater than 50%. This is based on the destruction warlock information on the Elitist Jerks website for the 4.3 patch.
- Soul Burn Soul Fire will not suggest Soul Burn if the Empowered Imp proc is active. This change is made by altering the suggested spell icon ID in the priority queue based on the presence of the proc.
- Date created
- Jan 24, 2012
- Last updated
- Jan 27, 2012