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
local originSetItemRef = SetItemRef;
local function HandleAltClick(link, text, button)
local linkType, playerName = strsplit(":", link);
if linkType == "player" and IsAltKeyDown()
then
return InviteUnit(playerName)
else
return originSetItemRef(link, text, button)
local originSetItemRef = SetItemRef
SetItemRef = function(link, text, button, chatFrame)
local linkType, playerName = strsplit(":", link)
if linkType == "player" and IsAltKeyDown() then
InviteUnit(playerName)
return -- Prevent Blizzard from opening whisper
end
-- Otherwise do original Blizzard behavior
originSetItemRef(link, text, button, chatFrame)
end
SetItemRef = HandleAltClick;
end
----------------------------------------------------------------------