From f41b7c04af6d03a25dc4c4fe79057883768efab2 Mon Sep 17 00:00:00 2001 From: gotsoul Date: Fri, 30 Dec 2022 15:58:10 +0000 Subject: [PATCH] Remove spaces from spellName in dumpspells and add new line after each spell --- src/_bastion.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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