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:
@@ -1117,7 +1117,7 @@ function D:GetSpellsTranslations(FromDIAG)
|
|||||||
}
|
}
|
||||||
for k,v in pairs(heroSpells) do Spells[k] = v end
|
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 = {
|
local defaultSpells = {
|
||||||
["SPELL_POLYMORPH"] = { 1100118, }, -- mage
|
["SPELL_POLYMORPH"] = { 1100118, }, -- mage
|
||||||
["SPELL_CYCLONE"] = { 1133786, }, -- druid
|
["SPELL_CYCLONE"] = { 1133786, }, -- druid
|
||||||
@@ -1157,7 +1157,13 @@ function D:GetSpellsTranslations(FromDIAG)
|
|||||||
}
|
}
|
||||||
for k,v in pairs(defaultSpells) do Spells[k] = v end
|
for k,v in pairs(defaultSpells) do Spells[k] = v end
|
||||||
|
|
||||||
elseif C_Player:IsCustomClass() then -- CoA
|
-- 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 = {
|
local customSpells = {
|
||||||
["COA_CONTINUUM_RESTORATION"] = { 801271, }, -- Chronomancer (Magic)
|
["COA_CONTINUUM_RESTORATION"] = { 801271, }, -- Chronomancer (Magic)
|
||||||
["COA_DEVOUR_CURSE"] = { 800402, }, -- Cultist (Curse)
|
["COA_DEVOUR_CURSE"] = { 800402, }, -- Cultist (Curse)
|
||||||
@@ -1172,6 +1178,7 @@ function D:GetSpellsTranslations(FromDIAG)
|
|||||||
["COA_WITCHBLOOD_TONIC"] = { 802278, }, -- WitchHunter (Curse)
|
["COA_WITCHBLOOD_TONIC"] = { 802278, }, -- WitchHunter (Curse)
|
||||||
}
|
}
|
||||||
for k,v in pairs(customSpells) do Spells[k] = v end
|
for k,v in pairs(customSpells) do Spells[k] = v end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self:Debug("Player class type cannot be determined or is not set up. Aborting Spell Table setup")
|
self:Debug("Player class type cannot be determined or is not set up. Aborting Spell Table setup")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
## SavedVariables: DecursiveDB
|
## 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
|
## Author: Archarodim
|
||||||
|
|
||||||
## X-License: All Rights Reserved
|
## X-License: All Rights Reserved
|
||||||
|
|||||||
Reference in New Issue
Block a user