From c96463c0a5752a3a50afba3a187453e3296ff760 Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 6 Dec 2020 20:54:16 +0100 Subject: [PATCH] loot: use native insert link function when possible --- modules/loot.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/loot.lua b/modules/loot.lua index 779623e6..d4bff06d 100644 --- a/modules/loot.lua +++ b/modules/loot.lua @@ -541,10 +541,12 @@ pfUI:RegisterModule("loot", "vanilla:tbc", function () frame:SetPoint("TOP", pfUI.loot, "TOP", 4, (-border*2+22)-(id*22)) frame:SetScript("OnClick", function() - if ( IsControlKeyDown() ) then + if IsControlKeyDown() then DressUpItemLink(GetLootSlotLink(this:GetID())) - elseif ( IsShiftKeyDown() ) then - if ( ChatFrameEditBox:IsVisible() ) then + elseif IsShiftKeyDown() then + if ChatEdit_InsertLink then + ChatEdit_InsertLink(GetLootSlotLink(this:GetID())) + elseif ChatFrameEditBox:IsVisible() then ChatFrameEditBox:Insert(GetLootSlotLink(this:GetID())) end end