diff --git a/src/_bastion.lua b/src/_bastion.lua index e7d8d5f..06635be 100644 --- a/src/_bastion.lua +++ b/src/_bastion.lua @@ -119,10 +119,12 @@ Command:Register('dumpspells', 'Dump spells to a file', function() -- use spellName and spellSubName here local spellID = select(7, GetSpellInfo(spellName)) + -- remove spaces from spellName + spellName = spellName:gsub("%s+", "") if spellID then WriteFile('bastion-' .. UnitClass('player') .. '-' .. rand .. '.lua', - "local " .. spellName .. " = Bastion.SpellBook:GetSpell(" .. spellID .. ")", true) + "local " .. spellName .. " = Bastion.SpellBook:GetSpell(" .. spellID .. ")\n", true) end i = i + 1 end