coa: extend default-realm spell IDs to CustomClass branch

CoA characters were crashing on load with table-index-is-nil at
Dcr_opt.lua:292 (DebuffsToIgnore[DS["Phase Shift"]]), then cascading
into self.db being nil at DCR_init.lua:724 and ScanTime nil arithmetic
at Dcr_LiveList.lua:389.

Root cause: D:GetSpellsTranslations populates DC.DS by iterating the
class-specific Spells table. The IsCustomClass branch added in
32324ff only filled COA_* dispel spells, but Dcr_opt.lua DebuffsToIgnore
/ BuffDebuff and DCR_init.lua SpellsToUse reference DS["Phase Shift"]
/ "SPELL_CURE_POISON" / etc. unconditionally - keys that only existed
in the heroSpells / defaultSpells branches.

Merged the IsDefaultClass and IsCustomClass branches so both share the
same defaultSpells base table; the CoA-specific dispels remain a
nested IsCustomClass-gated extension. CoA realm shares world content
with the default realm so the prefixed IDs apply; _LOST SPELL_ fallback
in GetSpellsTranslations handles any that don't resolve.
This commit is contained in:
2026-05-10 22:15:18 +02:00
parent 26abb6d513
commit 3869a067c6
2 changed files with 24 additions and 17 deletions
+23 -16
View File
@@ -1117,7 +1117,7 @@ function D:GetSpellsTranslations(FromDIAG)
}
for k,v in pairs(heroSpells) do Spells[k] = v end
elseif C_Player:IsDefaultClass() then
elseif C_Player:IsDefaultClass() or C_Player:IsCustomClass() then
local defaultSpells = {
["SPELL_POLYMORPH"] = { 1100118, }, -- mage
["SPELL_CYCLONE"] = { 1133786, }, -- druid
@@ -1157,21 +1157,28 @@ function D:GetSpellsTranslations(FromDIAG)
}
for k,v in pairs(defaultSpells) do Spells[k] = v end
elseif C_Player:IsCustomClass() then -- CoA
local customSpells = {
["COA_CONTINUUM_RESTORATION"] = { 801271, }, -- Chronomancer (Magic)
["COA_DEVOUR_CURSE"] = { 800402, }, -- Cultist (Curse)
["COA_REBUKE"] = { 525051, }, -- Templar/Monk (Magic, Disease, Poison)
["COA_ANTIVENOM"] = { 800905, }, -- Venomancer/Prophet (Curse)
["COA_BLIGHT_ANTIDOTE"] = { 520153, }, -- Venomancer/Prophet MoA (Curse)
["COA_BURN_IMPURITIES"] = { 520149, }, -- Pyromancer (Disease, Poison)
["COA_SURVIVAL_POTION"] = { 802839, }, -- Ranger (Disease, Poison)
["COA_HEMAL_EXCISION"] = { 803681, }, -- Bloodmage/SonOfArugal (Curse)
["COA_WARDING_RUNE"] = { 804232, }, -- Runemaster/SpiritMage (Magic)
["COA_PRAYER_OF_ELUNE"] = { 801987, }, -- Starcaller (Magic)
["COA_WITCHBLOOD_TONIC"] = { 802278, }, -- WitchHunter (Curse)
}
for k,v in pairs(customSpells) do Spells[k] = v end
-- CoA: extend the default-realm set with CoA custom-class dispels.
-- The default IDs above are kept so DS lookups for "Phase Shift" /
-- "SPELL_CURE_POISON" / etc. still resolve on a CoA character (those
-- names are referenced unconditionally by Dcr_opt.lua DebuffsToIgnore
-- and DCR_init.lua SpellsToUse). _LOST SPELL_ fallback in
-- GetSpellsTranslations catches any IDs that don't resolve.
if C_Player:IsCustomClass() then -- CoA
local customSpells = {
["COA_CONTINUUM_RESTORATION"] = { 801271, }, -- Chronomancer (Magic)
["COA_DEVOUR_CURSE"] = { 800402, }, -- Cultist (Curse)
["COA_REBUKE"] = { 525051, }, -- Templar/Monk (Magic, Disease, Poison)
["COA_ANTIVENOM"] = { 800905, }, -- Venomancer/Prophet (Curse)
["COA_BLIGHT_ANTIDOTE"] = { 520153, }, -- Venomancer/Prophet MoA (Curse)
["COA_BURN_IMPURITIES"] = { 520149, }, -- Pyromancer (Disease, Poison)
["COA_SURVIVAL_POTION"] = { 802839, }, -- Ranger (Disease, Poison)
["COA_HEMAL_EXCISION"] = { 803681, }, -- Bloodmage/SonOfArugal (Curse)
["COA_WARDING_RUNE"] = { 804232, }, -- Runemaster/SpiritMage (Magic)
["COA_PRAYER_OF_ELUNE"] = { 801987, }, -- Starcaller (Magic)
["COA_WITCHBLOOD_TONIC"] = { 802278, }, -- WitchHunter (Curse)
}
for k,v in pairs(customSpells) do Spells[k] = v end
end
else
self:Debug("Player class type cannot be determined or is not set up. Aborting Spell Table setup")
end
+1 -1
View File
@@ -18,7 +18,7 @@
## SavedVariables: DecursiveDB
## Version: Asc-1.1.1-coa (orig 2.5.1-6-gd3885c5)
## Version: Asc-1.1.2-coa (orig 2.5.1-6-gd3885c5)
## Author: Archarodim
## X-License: All Rights Reserved