Snapshot for release 2026.10.13.1 (internal d2b5fb3)

This commit is contained in:
Tom Bohar 2026-10-13 14:25:49 -04:00
commit 319740ff5d
291 changed files with 58505 additions and 2107 deletions

View file

@ -94,6 +94,24 @@ public static class SpellDatabase
return $"Unknown Spell ({spellId})";
}
/// <summary>Spell family and difficulty (power). False when the spell isn't in SpellData.txt.</summary>
public static bool TryGetSpellMeta(int spellId, out int family, out int difficulty)
{
if (_spellMeta.TryGetValue(spellId, out var meta))
{
family = meta.Category;
difficulty = meta.Power;
return true;
}
family = 0;
difficulty = 0;
return false;
}
/// <summary>True when the spell id is in the embedded table or the built-in recall list.</summary>
public static bool HasSpell(int spellId) =>
_spellNames.ContainsKey(spellId) || _builtinSpells.ContainsKey(spellId);
public static string GetSpellNameOrId(int spellId)
{
if (_spellNames.TryGetValue(spellId, out string? name)) return name;