DarkstarProject/darkstar — pull request #574 by starlightknight (2014-11-09 04:12:46+00:00)
Title: CORE/SQL: Tag Spells/Abilities/Traits w/ Appropriate Expansion + Fixes

Made a pass through attempting to tag spells, abilities, and traits with their appropriate expansion using the new restriction system. With this change, these will only be enabled if the corresponding expansion is enabled in settings.lua. This commit also introduces a variable for Zilart since there isn't one yet, so that I could tag those abilities against it.

The primary source of knowledge for this pass was the official version update history posts, which go all the way back to 2003:
http://forum.square-enix.com/ffxi/forums/84-Version-Updates

Methodology:
-Read all version update posts, starting from 2003, and tag any mentioned spells, abilities, or traits with the expansion the game was on at the time of the post
-For things not explicitly mentioned in the notes, default to Abyssea if 76+, or the expansion the job was introduced in if 1-75.

The official notes were very good for mentioning things specifically with the exception of BLU spells. In TOAU/WOTG days, the notes just said "new blu spells were added" without specifics, leaving me unable to tell which were the few added in the WOTG era. As a result they are all tagged TOAU for now unless 76+

If someone still wants to run a server with all stuff enabled regardless of expansion choice, they can do the following post processing:

update abilities set required_expansion = NULL;
update spell_list set required_expansion = NULL;
update traits set required_expansion = NULL;

If this becomes a common request/issue we can also tie using this column to a settings.lua var fairly easily.

Also added a few additional NULL checks around loading up abiltiies in the case that you're on a job that's been disabled. This handling is helpful when switching back and forth testing

I've tested a lot of basic scenarios. If all expansions are disabled, then jobs that are introduced in an expansion should end up with no spells, abilities, or traits if the code is all working and you've switched to them with the change job gm command, which they do seem to do.

I've also went around and fought mobs with various combinations of expansions and jobs and have not hit anymore crashes other than the one whose fix is included with this PR, which was regarding loading the 2 hour on a job whose expansion is disabled.

This list should make those who just want to play Zilart or just Zilart+COP's gameplay more accurate, as there were a lot of lower level spells, abilities, and traits added in the TOAU/WOTG era.