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:
+8
-9
@@ -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
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user