AltClickInvite: fix very old lua error

was happening on every moving chat to new window
was preventing newly moved chat to be opened
and producing origin blizz error without reference to LeatrixPlus, that's why it took so long to find
This commit is contained in:
Sattva
2025-04-29 17:57:14 +03:00
parent a5d09da374
commit 2e4f47c98e
+8 -9
View File
@@ -9045,17 +9045,16 @@
---------------------------------------------------------------------- ----------------------------------------------------------------------
if LeaPlusLC["AltClickInv"] == "On" then if LeaPlusLC["AltClickInv"] == "On" then
local originSetItemRef = SetItemRef; local originSetItemRef = SetItemRef
local function HandleAltClick(link, text, button) SetItemRef = function(link, text, button, chatFrame)
local linkType, playerName = strsplit(":", link); local linkType, playerName = strsplit(":", link)
if linkType == "player" and IsAltKeyDown() if linkType == "player" and IsAltKeyDown() then
then InviteUnit(playerName)
return InviteUnit(playerName) return -- Prevent Blizzard from opening whisper
else
return originSetItemRef(link, text, button)
end end
-- Otherwise do original Blizzard behavior
originSetItemRef(link, text, button, chatFrame)
end end
SetItemRef = HandleAltClick;
end end
---------------------------------------------------------------------- ----------------------------------------------------------------------