|
|
@ -213,9 +213,17 @@ 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)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
|
|
|
if spellID then |
|
|
|
WriteFile('bastion-' .. UnitClass('player') .. '-' .. rand .. '.lua', |
|
|
|
WriteFile('bastion-' .. UnitClass('player') .. '-' .. rand .. '.lua', |
|
|
|
"local " .. spellName .. " = Bastion.SpellBook:GetSpell(" .. spellID .. ")", true) |
|
|
|
"local " .. str .. " = Bastion.SpellBook:GetSpell(" .. spellID .. ")\n", true) |
|
|
|
end |
|
|
|
end |
|
|
|
i = i + 1 |
|
|
|
i = i + 1 |
|
|
|
end |
|
|
|
end |
|
|
|