remove conversion

This commit is contained in:
Bunny67
2020-06-05 20:44:10 +03:00
parent 7781111643
commit a7a2943bde
+1 -22
View File
@@ -15,7 +15,7 @@ local SendChatMessage, GetChannelName, UnitInBattleground, UnitInRaid, UnitInPar
= SendChatMessage, GetChannelName, UnitInBattleground, UnitInRaid, UnitInParty, GetTime, GetSpellLink, GetItemInfo
local CreateFrame, IsShiftKeyDown, GetScreenWidth, GetScreenHeight, GetCursorPosition, UpdateAddOnCPUUsage, GetFrameCPUUsage, debugprofilestop
= CreateFrame, IsShiftKeyDown, GetScreenWidth, GetScreenHeight, GetCursorPosition, UpdateAddOnCPUUsage, GetFrameCPUUsage, debugprofilestop
local debugstack, IsSpellKnown, GetFileIDFromPath = debugstack, IsSpellKnown, GetFileIDFromPath
local debugstack, IsSpellKnown = debugstack, IsSpellKnown
local GetNumTalentTabs, GetNumTalents = GetNumTalentTabs, GetNumTalents
local ADDON_NAME = "WeakAuras"
@@ -3246,27 +3246,6 @@ function WeakAuras.Modernize(data)
-- Version 16 was introduced May 2019 in BFA
if data.internalVersion < 16 then
-- first conversion: attempt to migrate texture paths to file ids
if data.regionType == "texture" and type(data.texture) == "string" then
local textureId = GetFileIDFromPath(data.texture:gsub("\\\\", "\\"))
if textureId and textureId > 0 then
data.texture = tostring(textureId)
end
end
if data.regionType == "progresstexture" then
if type(data.foregroundTexture) == "string" then
local textureId = GetFileIDFromPath(data.foregroundTexture:gsub("\\\\", "\\"))
if textureId and textureId > 0 then
data.foregroundTexture = tostring(textureId)
end
end
if type(data.backgroundTexture) == "string" then
local textureId = GetFileIDFromPath(data.backgroundTexture:gsub("\\\\", "\\"))
if textureId and textureId > 0 then
data.backgroundTexture = tostring(textureId)
end
end
end
-- second conversion: migrate name/realm conditions to tristate
if data.load.use_name == false then
data.load.use_name = nil