Remove spaces from spellName in dumpspells and add new line after each spell

main
gotsoul 2 years ago
parent 764655ea51
commit f41b7c04af
  1. 4
      src/_bastion.lua

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

Loading…
Cancel
Save