Skip to content

Commit

Permalink
Fix keybind migration
Browse files Browse the repository at this point in the history
  • Loading branch information
RagedUnicorn committed May 15, 2021
1 parent b287466 commit 7991319
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/GM_Configuration.lua
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ function me.UpgradeToV2_0_0()
gearBar.slots = nil -- reset slots
gearBar.slots = {}

local slotPosition = 1

for i = 1, #GearMenuConfiguration.slots do
if GearMenuConfiguration.slots[i] ~= RGGM_CONSTANTS.INVSLOT_NONE then
local gearSlot = mod.gearManager.GetGearSlotForSlotId(GearMenuConfiguration.slots[i])
Expand All @@ -313,13 +315,14 @@ function me.UpgradeToV2_0_0()
SetBinding(key)
SetBindingClick(
key,
RGGM_CONSTANTS.ELEMENT_GEAR_BAR_BASE_FRAME_NAME .. gearBar.id .. "Slot_" .. i
RGGM_CONSTANTS.ELEMENT_GEAR_BAR_BASE_FRAME_NAME .. gearBar.id .. "Slot_" .. slotPosition
)

gearSlot.keyBinding = key
end

table.insert(gearBar.slots, gearSlot)
slotPosition = slotPosition + 1
end
end

Expand Down

0 comments on commit 7991319

Please sign in to comment.