fix(spells): load complete retail DAT catalog

Replace the incomplete 3,956-row production CSV with one immutable projection of all 6,266 records in portal.dat. Preserve retail formula targeting, shared Spellbook/MagicRuntime metadata ownership, and fail startup when the required SpellTable is absent.

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-15 21:17:13 +02:00
parent 09612f9981
commit 0eab7497c1
19 changed files with 633 additions and 114 deletions

View file

@ -419,13 +419,13 @@ public sealed class SpellbookWindowController : IRetainedPanelController
private bool IsVisible(SpellMetadata metadata, uint filters)
{
uint school = metadata.School switch
uint school = metadata.SchoolId switch
{
"Creature Enchantment" => 0x0001u,
"Item Enchantment" => 0x0002u,
"Life Magic" => 0x0004u,
"War Magic" => 0x0008u,
"Void Magic" => 0x2000u,
MagicSchool.CreatureEnchantment => 0x0001u,
MagicSchool.ItemEnchantment => 0x0002u,
MagicSchool.LifeMagic => 0x0004u,
MagicSchool.WarMagic => 0x0008u,
MagicSchool.VoidMagic => 0x2000u,
_ => 0u,
};
int spellLevel = _spellLevel(metadata.SpellId);