From 844ed68db90a087227d2359e844633b5c1b70362 Mon Sep 17 00:00:00 2001 From: Logan Payton Date: Tue, 20 Feb 2018 13:00:39 -0500 Subject: [PATCH 1/2] Old Lua didnt like the OO-style syntax --- ElvUI/Modules/Misc/Loot.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ElvUI/Modules/Misc/Loot.lua b/ElvUI/Modules/Misc/Loot.lua index 50d05da..a35b944 100644 --- a/ElvUI/Modules/Misc/Loot.lua +++ b/ElvUI/Modules/Misc/Loot.lua @@ -207,7 +207,7 @@ function M:LOOT_OPENED(_, autoLoot) local color = ITEM_QUALITY_COLORS[quality] if(LootSlotIsCoin(i)) then - item = item:gsub("\n", ", ") + item = string.gsub(item, "\n", ", ") end if quantity and (quantity > 1) then From dc8e8308d864e4b96752768472406407c5e0d7eb Mon Sep 17 00:00:00 2001 From: Logan Payton Date: Tue, 20 Feb 2018 13:08:56 -0500 Subject: [PATCH 2/2] Cache gsub --- ElvUI/Modules/Misc/Loot.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ElvUI/Modules/Misc/Loot.lua b/ElvUI/Modules/Misc/Loot.lua index a35b944..b98087c 100644 --- a/ElvUI/Modules/Misc/Loot.lua +++ b/ElvUI/Modules/Misc/Loot.lua @@ -6,6 +6,7 @@ local M = E:GetModule("Misc"); local max = math.max local tinsert = table.insert local unpack, pairs = unpack, pairs +local gsub = string.gsub --WoW API / Variables local CloseLoot = CloseLoot local CursorOnUpdate = CursorOnUpdate @@ -207,7 +208,7 @@ function M:LOOT_OPENED(_, autoLoot) local color = ITEM_QUALITY_COLORS[quality] if(LootSlotIsCoin(i)) then - item = string.gsub(item, "\n", ", ") + item = gsub(item, "\n", ", ") end if quantity and (quantity > 1) then