From 7d8982c11a4e879adc236234834fa5194075ffe1 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Thu, 21 Apr 2011 21:15:45 +0200 Subject: [PATCH] Remove the sometimes buggy hack, and instead just show the GearManager --- Broker_Equipment.lua | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/Broker_Equipment.lua b/Broker_Equipment.lua index e62095c..43f41ee 100644 --- a/Broker_Equipment.lua +++ b/Broker_Equipment.lua @@ -54,30 +54,12 @@ local function UpdateDisplay() end end --- Borrowed from tekkub's EquipSetUpdater -local function GetTextureIndex(texture) - RefreshEquipmentSetIconInfo() - - local numIcons = GetNumMacroIcons() - for index = INVSLOT_FIRST_EQUIPPED, INVSLOT_LAST_EQUIPPED do - if(GetInventoryItemTexture('player', index)) then - numIcons = numIcons + 1 - end - end - - for index = 1, numIcons do - local icon, textureIndex = GetEquipmentSetIconInfo(index) - if(icon == texture) then - return textureIndex - end - end -end - local function ModifiedClick(button, name, icon) if(IsShiftKeyDown() and not pendingName) then - local dialog = StaticPopup_Show('CONFIRM_OVERWRITE_EQUIPMENT_SET', name) - dialog.data = name - dialog.selectedIcon = GetTextureIndex(icon) + LDB.OnClick(nil, 'RightButton') + + GearManagerDialog.selectedSetName = name + GearManagerDialog_Update() elseif(IsControlKeyDown() and not pendingName) then local dialog = StaticPopup_Show('CONFIRM_DELETE_EQUIPMENT_SET', name) dialog.data = name -- 1.7.9.5