diff --git a/WeakAuras/Modernize.lua b/WeakAuras/Modernize.lua index 2c9502f3c9..d5698bcf8e 100644 --- a/WeakAuras/Modernize.lua +++ b/WeakAuras/Modernize.lua @@ -1734,13 +1734,14 @@ function Private.Modernize(data) end end - if data.internalVersion < 67 then - local function migrateToTable(tab, field) - local value = tab[field] - if value ~= nil and type(value) ~= "table" then - tab[field] = { value } - end + local function migrateToTable(tab, field) + local value = tab[field] + if value ~= nil and type(value) ~= "table" then + tab[field] = { value } end + end + + if data.internalVersion < 67 then do local trigger_migration = { ["Cast"] = { @@ -1967,6 +1968,10 @@ function Private.Modernize(data) end end + if data.internalVersion < 69 then + migrateToTable(data.load, "itemequiped") + end + data.internalVersion = max(data.internalVersion or 0, WeakAuras.InternalVersion()) end diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 72b238cd69..d0886af65e 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -1825,9 +1825,22 @@ Private.load_prototype = { name = "itemequiped", display = L["Item Equipped"], type = "item", + multiEntry = { + operator = "or" + }, test = "IsEquippedItem(GetItemInfo(%s))", events = { "UNIT_INVENTORY_CHANGED", "PLAYER_EQUIPMENT_CHANGED"} }, + { + name = "not_itemequiped", + display = WeakAuras.newFeatureString .. L["|cFFFF0000Not|r Item Equipped"], + type = "item", + multiEntry = { + operator = "or" + }, + test = "not IsEquippedItem(GetItemInfo(%s))", + events = { "UNIT_INVENTORY_CHANGED", "PLAYER_EQUIPMENT_CHANGED"} + }, { name = "itemtypeequipped", display = L["Item Type Equipped"], diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index 8a9570aa85..993faed099 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -1,7 +1,7 @@ --- @type string, Private local AddonName, Private = ... -local internalVersion = 68 +local internalVersion = 69 -- Lua APIs local insert = table.insert