diff --git a/.luacheckrc b/.luacheckrc index 176b785..bf0ef45 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -34,6 +34,8 @@ globals = { "Prio3", "tempty", "tprint", + "tRemoveValue", + "isUserMasterLooter", -- other WoW APIs "GameFontGreenSmall", diff --git a/comms.lua b/comms.lua index 380bdd4..55d54bc 100644 --- a/comms.lua +++ b/comms.lua @@ -47,7 +47,7 @@ function Prio3:GROUP_ROSTER_UPDATE() end Prio3.previousGroupState = UnitInParty("player") - + -- look into Loot Method Prio3:PARTY_LOOT_METHOD_CHANGED() end diff --git a/core.lua b/core.lua index c0362cc..accd90b 100644 --- a/core.lua +++ b/core.lua @@ -152,7 +152,7 @@ function tprint (tbl, indent) return toprint end -function tRemoveValue(t, value) +function tRemoveValue(t, value) local idx = nil for i,v in pairs(t) do -- do not remove while iterating table @@ -176,7 +176,7 @@ function tempty(t) end -function isUserMasterLooter() +function isUserMasterLooter() local _, _, masterlooterRaidID = GetLootMethod() if masterlooterRaidID then local name, rank, subgroup, level, class, fileName, zone, online, isDead, role, isML = GetRaidRosterInfo(masterlooterRaidID); @@ -315,9 +315,9 @@ Prio3.prioOptionsTable = { set = function(info,val) Prio3.db.profile.showmasterlooterhint = val end, get = function(info) return Prio3.db.profile.showmasterlooterhint end }, - + newline60 = { name="", type="description", order=60 }, - priozero = { + priozero = { name = L["Enable Prio 0"], desc = L["Activates output for Prio 0. If someone sets Prio 1, 2 and 3 to the same item, this gets precedence."], type = "toggle", @@ -326,7 +326,7 @@ Prio3.prioOptionsTable = { get = function(info) return Prio3.db.profile.prio0 end, }, - + } }, grpquery = { diff --git a/loot.lua b/loot.lua index 759dd21..c159319 100644 --- a/loot.lua +++ b/loot.lua @@ -287,11 +287,11 @@ function Prio3:HandleLoot(itemLink, qualityFound) tonumber(prios[2]) == tonumber(itemId) and tonumber(prios[3]) == tonumber(itemId) then table.insert(itemprios.p0, user) - + -- if a user has Prio0, remove him from Prio 1,2,3 outputs - tRemoveValue(itemprios.p1, user) - tRemoveValue(itemprios.p2, user) - tRemoveValue(itemprios.p3, user) + tRemoveValue(itemprios.p1, user) + tRemoveValue(itemprios.p2, user) + tRemoveValue(itemprios.p3, user) end end