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:
parent
a5d09da374
commit
2e4f47c98e
1 changed files with 8 additions and 9 deletions
|
|
@ -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
|
||||
|
||||
----------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue