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
|
||||
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
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user