Skip to content

Commit 03bca0e

Browse files
committed
Fixed alt-clicking items
No longer unintentionally morphs while looting
1 parent 69fee7f commit 03bca0e

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

ClickMorph.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ end
297297

298298
function CM:MorphItem(unit, item, silent)
299299
local morph = CM:CanMorph()
300-
if item and morph and morph.item then
300+
-- nobody wants to morph while looting and it would interfere with dkp addons
301+
if item and morph and morph.item and not LootFrame:IsShown() then
301302
local itemID, itemLink, equipLoc = CM:GetItemInfo(item)
302303
local slotID = InvTypeToSlot[equipLoc]
303304
if slotID then
@@ -310,7 +311,9 @@ function CM:MorphItem(unit, item, silent)
310311
end
311312
end
312313

313-
hooksecurefunc("HandleModifiedItemClick", CM.MorphItem)
314+
hooksecurefunc("HandleModifiedItemClick", function(item)
315+
CM:MorphItem("player", item)
316+
end)
314317

315318
function CM:MorphItemBySource(unit, source, silent)
316319
local morph = self:CanMorph()

Inspect.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ function f:InitializeInspect()
8080
end
8181
end
8282
local class = UnitClassBase(unit)
83-
local fullName = GetUnitName(unit, true)
8483
local hex = select(4, GetClassColor(class))
84+
local fullName = GetUnitName(unit, true)
8585
local unitLink = "|c"..TEXT_MODE_A_STRING_DEST_UNIT:format(hex, UnitGUID(unit), fullName, fullName)
8686
CM:PrintChat(format("items -> %s", unitLink))
8787
end

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.6.0
1+
1.6.1

0 commit comments

Comments
 (0)