Enabling a Spec for Dragonflight - WoWAnalyzer/WoWAnalyzer GitHub Wiki
Due to the enormous changes to the talent system in Dragonflight, all specs from Shadowlands have been fully disabled. The first step to supporting a spec for the new expansion is to fix that.
- Remove the
exclude
lines for your spec & class fromtsconfig.json
- Remove the
files
line for your spec fromtsconfig.json
- Uncomment the
CHANGELOG
import in your spec'sCONFIG
file and update thechangelog
key to use it. - Uncomment the
parser
key in your spec'sCONFIG
file.
For example, the CONFIG
file will start looking like this:
// import CHANGELOG from './CHANGELOG';
export default {
// ...
changelog: [],
// The CombatLogParser class for your spec.
// parser: () =>
// import('./CombatLogParser' /* webpackChunkName: "UnholyDeathKnight" */).then(
// (exports) => exports.default,
// ),
// ...
};
After updating, it should look like this:
import CHANGELOG from './CHANGELOG';
export default {
// ...
changelog: CHANGELOG,
// The CombatLogParser class for your spec.
parser: () =>
import('./CombatLogParser' /* webpackChunkName: "UnholyDeathKnight" */).then(
(exports) => exports.default,
),
// ...
};
This will cause your local copy of WoWA to begin to parse and run code for the spec. However, it is likely to throw many, many errors about missing or invalid talent import
s. These import
s either need to be fixed (if the spell still exists and functions the same) or deleted (if the spell is no longer in the game, or now does something different).
If you load the site locally (typically http://localhost:3000/), you'll have a list of errors to handle.
Before getting in too deep, it should be made clear that deleting things is perfectly okay! Old legendary that isn't brought forward? Delete. Spell that got changes in Dragonflight? Delete. Analysis that only exists for an old rotation? Delete. Just can't deal with 300 errors from that one giant analyzer right now? Delete. We use git
for a reason. Anything that you delete can be retrieved---and if you're not sure how to do that, you can always ask for help in the Discord!
With that out of the way, you're typically going to need to handle two different kinds of changes:
If a spell used to be baseline, but is now a talent you'll need to replace uses of the old spell with uses of the new spell. For example, Brewmaster's Purifying Brew became a talent, but used to be baseline. The change for the core PurifyingBrew
module looks like this.
Typically, the process for fixing an analyzer that uses what is are now talents is:
- Add an
import TALENTS from 'common/TALENTS/<className>';
line - Replace uses of
SPELLS.MY_SPELL
withTALENTS.MY_SPELL_TALENT
(orTALENTS.MY_SPELL_SPEC_TALENT
). - If the talent is optional, you may also want to modify the
constructor
to setthis.active = false
when the talent is missing. For example:
class MySpell extends Analyzer {
constructor(options: Options) {
this.active = this.selectedCombatant.hasTalent(TALENTS.MY_SPELL_TALENT);
}
// ... more code here ...
}
(Not every talent is optional for a max level player---the Brewmaster tree requires taking Keg Smash, and it is virtually impossible to skip Purifying Brew).
This is very similar to the previous, except that the old SPELLS
entry will still exist. However, in almost all cases the spell information has changed! This means that the old SPELLS
entry is wrong, so you still want to replace it with the new talent.
- Remove the old
SPELLS
entry for the legendary - Add an
import talents from 'common/TALENTS/<className>';
line - Replace uses of
SPELLS.MY_SPELL
withtalents.MY_SPELL_TALENT
(ortalents.MY_SPELL_SPEC_TALENT
). - Replace uses of
hasLegendary
,hasConduit
, andconduitRankBySpellID
withhasTalent
/getTalentRank
.
- Delete the file.
Enjoy this process :)
If your spec has tests (search for files ending in .test.js
or .test.ts
), then you should go and turn them back on. Very similarly to other changes:
- If the test covers functionality that is dead, gone, or no longer relevant just delete it!
- If the test is going to be too hard to port to Dragonflight (such as requiring new raid logs to test against), you can delete it.
- If the test covers something useful, make an effort to port it---but porting old tests is not that important since the classes are changing so much. Don't get stuck on tests!
Once you've eliminated all of the errors, we strongly recommend that you stop, commit your changes to a branch on your fork, and submit a pull request! These PRs are likely to be large and it makes them take much longer to review if they have new functionality added instead of just reviving the old stuff.