From c21e20a297ad60b08b26ddb29c71c821e47e960b Mon Sep 17 00:00:00 2001 From: Darthpred Date: Tue, 1 Oct 2013 11:14:59 +0400 Subject: [PATCH] Added some table searching functions --- ElvUI_SLE/ElvUI_SLE.lua | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/ElvUI_SLE/ElvUI_SLE.lua b/ElvUI_SLE/ElvUI_SLE.lua index 0f7f088..abffb7f 100755 --- a/ElvUI_SLE/ElvUI_SLE.lua +++ b/ElvUI_SLE/ElvUI_SLE.lua @@ -54,8 +54,6 @@ function SLE:ChatPos() end end - - E.UpdateAllSLE = E.UpdateAll function E:UpdateAll() E.UpdateAllSLE(self) @@ -135,6 +133,22 @@ function SLE:BagSearch(itemId) end end +function SLE:ValueTable(table, item) + for i, _ in pairs(table) do + if i == item then return true end + end + return false +end + +function SLE:SimpleTable(table, item) + for i = 1, #table do + if table[i] == item then + return true + end + end + return false +end + function SLE:Print(msg) print(E["media"].hexvaluecolor..'S&L:|r', msg) end -- 1.7.9.5