Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Myslot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -828,11 +828,14 @@ function MySlot:RecoverData(msg, opt)
end
end

for i = 1, MYSLOT_MAX_ACTIONBAR do
if not opt.actionOpt.ignoreActionBars[math.ceil(i / 12)] and not slotBucket[i] then
if GetActionInfo(i) then
PickupAction(i)
ClearCursor()
-- Only clear empty slots if skipClearEmpty is not set
if not opt.skipClearEmpty then
for i = 1, MYSLOT_MAX_ACTIONBAR do
if not opt.actionOpt.ignoreActionBars[math.ceil(i / 12)] and not slotBucket[i] then
if GetActionInfo(i) then
PickupAction(i)
ClearCursor()
end
end
end
end
Expand Down
12 changes: 12 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ You can use the command 'load' to import a profile by name

You can add this line in a macro and safe it in your profile and swap from one profile to another by using the macro.

#### Selective Import with Ignore Mode

You can use the 'ignore' option to only import data that exists in the profile, leaving other action bars unchanged:

/myslot load ProfileName ignore

This is useful when you have a shared profile that only contains specific action bars (e.g., a bar with mounts, professions, or macros that are common across all characters).

For example:
- If your "Horde-Mounts" profile only contains Bar 6, using `/myslot load Horde-Mounts ignore` will only update Bar 6 and leave all other bars unchanged
- Without the 'ignore' option, bars not in the profile would be cleared


## Get Myslot

Expand Down
10 changes: 9 additions & 1 deletion gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ RegEvent("ADDON_LOADED", function()
end)

SlashCmdList["MYSLOT"] = function(msg, editbox)
local cmd, what = msg:match("^(%S*)%s*(%S*)%s*$")
local cmd, what, mode = msg:match("^(%S*)%s*(%S*)%s*(.-)%s*$")

if cmd == "load" then

Expand Down Expand Up @@ -927,9 +927,17 @@ SlashCmdList["MYSLOT"] = function(msg, editbox)
local opt = {}
CreateSettingMenu(opt)

-- Check if "ignore" mode is provided
local skipClearEmpty = false
if mode and mode:lower() == "ignore" then
skipClearEmpty = true
MySlot:Print(L["Loading in ignore mode"])
end

MySlot:RecoverData(importMsg, {
actionOpt = opt,
clearOpt = opt,
skipClearEmpty = skipClearEmpty,
})
end

Expand Down