(fix)non-awesome_wotlk imports and double migration on retail imports #11

This commit is contained in:
NoM0Re
2025-01-06 12:47:41 +01:00
parent 86e98d6bcf
commit 95db2e326e
2 changed files with 38 additions and 19 deletions
+16
View File
@@ -2303,6 +2303,19 @@ local function removeSpellNames(data)
end
end
local function removeNameplateUnits(data)
for _, triggerData in ipairs(data.triggers) do
local trigger = triggerData.trigger
if trigger and trigger.type == "unit" then
if trigger.unit == "nameplate" then
trigger.unit = "target"
elseif trigger.threatUnit == "nameplate" then
trigger.threatUnit = "target"
end
end
end
end
local oldDataStub = {
-- note: this is the minimal data stub which prevents false positives in diff upon reimporting an aura.
-- pending a refactor of other code which adds unnecessary fields, it is possible to shrink it
@@ -2499,6 +2512,9 @@ function WeakAuras.PreAdd(data)
end
validateUserConfig(data, data.authorOptions, data.config)
removeSpellNames(data)
if not(WeakAuras.isAwesomeEnabled()) then
removeNameplateUnits(data)
end
data.init_started = nil
data.init_completed = nil
data.expanded = nil