Skip to content

Commit

Permalink
2.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Ridepad committed Jun 11, 2022
1 parent e9a44f0 commit 9760275
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TrinketCDs v2.0.1
# TrinketCDs v2.0.2

![](https://raw.githubusercontent.com/Ridepad/TrinketCDs/main/showcase/showcase_main.png)

Expand Down
16 changes: 12 additions & 4 deletions TrinketCDs/TrinketCDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -506,23 +506,31 @@ end

local function update_settings(svars_table, settings_table)
if not svars_table then return end
for old_table_key, _ in pairs(settings_table) do

for old_table_key in pairs(settings_table) do
local new_table_value = svars_table[old_table_key]
if new_table_value then
settings_table[old_table_key] = new_table_value
end
end
end

local function update_nested_settings(svars, key)
local _svars = svars[key]
if not _svars then return end

for item_slot_id, settings_item in pairs(SETTINGS[key]) do
update_settings(_svars[item_slot_id], settings_item)
end
end

function ADDON:OnEvent(event, arg1)
if event == "ADDON_LOADED" then
if arg1 ~= ADDON_NAME then return end

local svars = _G[ADDON_PROFILE]
if svars then
for item_slot_id, settings_item in pairs(SETTINGS.ITEMS) do
update_settings(svars.ITEMS[item_slot_id], settings_item)
end
update_nested_settings(svars, "ITEMS")
update_settings(svars.SWITCHES, SWITCHES)
end
_G[ADDON_PROFILE] = SETTINGS
Expand Down
4 changes: 2 additions & 2 deletions TrinketCDs/TrinketCDs.toc
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## Interface: 30300
## Title:|cffee0080TrinketCDs|r
## Author: Ridepad (|cff888888Ridepad#7722|r)
## Version: 2.0.1
## Version: 2.0.2
## SavedVariables: TrinketCDsProfile
## Notes: Trinkets and item enchants proc tracker.
## OptionalDeps: OmniCC

## X-Category: Combat
## X-Date: 2022-06-09--08-00
## X-Date: 2022-06-11--16-30
## X-Website: https://github.com/Ridepad/TrinketCDs

TrinketCDsDB.lua
Expand Down

0 comments on commit 9760275

Please sign in to comment.