Skip to content

Commit

Permalink
Fixed alt-clicking items
Browse files Browse the repository at this point in the history
No longer unintentionally morphs while looting
  • Loading branch information
Ketho committed Jul 11, 2020
1 parent 69fee7f commit 03bca0e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions ClickMorph.lua
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ end

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

hooksecurefunc("HandleModifiedItemClick", CM.MorphItem)
hooksecurefunc("HandleModifiedItemClick", function(item)
CM:MorphItem("player", item)
end)

function CM:MorphItemBySource(unit, source, silent)
local morph = self:CanMorph()
Expand Down
2 changes: 1 addition & 1 deletion Inspect.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ function f:InitializeInspect()
end
end
local class = UnitClassBase(unit)
local fullName = GetUnitName(unit, true)
local hex = select(4, GetClassColor(class))
local fullName = GetUnitName(unit, true)
local unitLink = "|c"..TEXT_MODE_A_STRING_DEST_UNIT:format(hex, UnitGUID(unit), fullName, fullName)
CM:PrintChat(format("items -> %s", unitLink))
end
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.0
1.6.1

0 comments on commit 03bca0e

Please sign in to comment.