From 2e4f47c98ef2a27326b83273aa4c0c6fe0c20c8b Mon Sep 17 00:00:00 2001 From: Sattva <74269253+Sattva-108@users.noreply.github.com> Date: Tue, 29 Apr 2025 17:57:14 +0300 Subject: [PATCH] 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 --- Leatrix_Plus.lua | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Leatrix_Plus.lua b/Leatrix_Plus.lua index c6f2301..e34eca5 100644 --- a/Leatrix_Plus.lua +++ b/Leatrix_Plus.lua @@ -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 ----------------------------------------------------------------------