diff --git a/src/_bastion.lua b/src/_bastion.lua index b64c986..d765332 100644 --- a/src/_bastion.lua +++ b/src/_bastion.lua @@ -213,9 +213,17 @@ Command:Register('dumpspells', 'Dump spells to a file', function() -- use spellName and spellSubName here local spellID = select(7, GetSpellInfo(spellName)) + local str = string.gsub(spellName, "%s+", "") + str = string.gsub(str, "'", "") + str = string.gsub(str, ":", "") + str = string.gsub(str, "-", "") + str = string.gsub(str, "!", "") + str = string.gsub(str, "%.", "") + str = string.gsub(str, ",", "") + if spellID then WriteFile('bastion-' .. UnitClass('player') .. '-' .. rand .. '.lua', - "local " .. spellName .. " = Bastion.SpellBook:GetSpell(" .. spellID .. ")", true) + "local " .. str .. " = Bastion.SpellBook:GetSpell(" .. spellID .. ")\n", true) end i = i + 1 end