Skip to content

Commit

Permalink
Remove TradeSkillUI integration on wrath, since apparently it's broken
Browse files Browse the repository at this point in the history
  • Loading branch information
Numynum committed May 6, 2023
1 parent 4c83164 commit 4197a7e
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions MacroToolkit/MacroToolkit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -125,33 +125,35 @@ function MT:eventHandler(this, event, arg1, ...)
HideUIPanel(MacroFrame)
MTF:Show()
end)
elseif arg1 == "Blizzard_TradeSkillUI" then
--override code to handle tradeskill links
local function btsui_onclick()
local activeEditBox = ChatEdit_GetActiveWindow()
local activeMacroFrameText
if MacroFrameText and MacroFrameText:IsShown() and MacroFrameText:HasFocus() then
activeMacroFrameText = MacroFrameText
elseif MacroToolkitText:IsShown() and MacroToolkitText:HasFocus() then
activeMacroFrameText = MacroToolkitText
end
if activeMacroFrameText then
--local link = GetTradeSkillListLink()
local link = C_TradeSkillUI.GetTradeSkillListLink()
local text = format("%s%s", activeMacroFrameText:GetText(), link)
if 255 >= strlenutf8(text) then activeMacroFrameText:Insert(link) end
elseif activeEditBox then
--local link = GetTradeSkillListLink()
-- ticket 134 - fix by picro
local link = C_TradeSkillUI.GetTradeSkillListLink()
if not ChatEdit_InsertLink(link) then assert(activeEditBox:GetName(), "Failed to add tradeskill link") end
--else ToggleDropDownMenu(1, nil, TradeSkillLinkDropDown, "TradeSkillLinkFrame", 25, 25) end
else ToggleDropDownMenu(1, nil, TradeSkillFrame.LinkToDropDown, TradeSkillFrame.LinkToButton, 25, 25) end
--PlaySound("igMainMenuOptionCheckBoxOn")
PlaySound(856)
end
--TradeSkillLinkButton:SetScript("OnClick", btsui_onclick)
TradeSkillFrame.LinkToButton:SetScript("OnClick", btsui_onclick)
--- breaks on wrath classic
--- @TODO: found out if we care
--elseif arg1 == "Blizzard_TradeSkillUI" then
-- --override code to handle tradeskill links
-- local function btsui_onclick()
-- local activeEditBox = ChatEdit_GetActiveWindow()
-- local activeMacroFrameText
-- if MacroFrameText and MacroFrameText:IsShown() and MacroFrameText:HasFocus() then
-- activeMacroFrameText = MacroFrameText
-- elseif MacroToolkitText:IsShown() and MacroToolkitText:HasFocus() then
-- activeMacroFrameText = MacroToolkitText
-- end
-- if activeMacroFrameText then
-- --local link = GetTradeSkillListLink()
-- local link = C_TradeSkillUI.GetTradeSkillListLink()
-- local text = format("%s%s", activeMacroFrameText:GetText(), link)
-- if 255 >= strlenutf8(text) then activeMacroFrameText:Insert(link) end
-- elseif activeEditBox then
-- --local link = GetTradeSkillListLink()
-- -- ticket 134 - fix by picro
-- local link = C_TradeSkillUI.GetTradeSkillListLink()
-- if not ChatEdit_InsertLink(link) then assert(activeEditBox:GetName(), "Failed to add tradeskill link") end
-- --else ToggleDropDownMenu(1, nil, TradeSkillLinkDropDown, "TradeSkillLinkFrame", 25, 25) end
-- else ToggleDropDownMenu(1, nil, TradeSkillFrame.LinkToDropDown, TradeSkillFrame.LinkToButton, 25, 25) end
-- --PlaySound("igMainMenuOptionCheckBoxOn")
-- PlaySound(856)
-- end
-- --TradeSkillLinkButton:SetScript("OnClick", btsui_onclick)
-- TradeSkillFrame.LinkToButton:SetScript("OnClick", btsui_onclick)
end
elseif event == "PLAYER_LOGIN" then
MT:BuildCommandList()
Expand Down

0 comments on commit 4197a7e

Please sign in to comment.