Afternoon all,
I've been trying to set up a weakaura that will show at a glance who has the Nathria group based trinkets equipped without having to go through inspecting the whole raid.
Below is what I've got so far, including some old variables that I haven't removed just yet.
When using this in a raid, I can tell that it's looping correctly and when i = my index, the Stone Legion Heraldry I'm wearing is detected correctly, but every other iteration of the loop returns nil.
Is that something which isn't possible with straight LUA as a guildie suggested to me or am I just missing something obvious?
Thanks,
Arrzarr.
Lua Code:
function()
local SLH = "SLH Users: "
local CH = "\nCH Users: "
local returnValue
local equipped = false
local raiders = GetNumGroupMembers()
local itemID
local index
local name
local names = {}
local trinketIDs = ""
for i = 1, MAX_RAID_MEMBERS
do
--This is inefficient but designed for readability to figure this out
index = "raid"..i
name = GetUnitName(index)
--Check for Stone Legion Heraldry
itemId = GetInventoryItemID(index, 13)
if itemId == 184027 then SLH = SLH .. name .. " " end
itemId = GetInventoryItemID(index, 14)
if itemId == 184027 then SLH = SLH .. name .. " " end
--Check for Cabalist's Hymnal
itemId = GetInventoryItemID(index, 13)
if itemId == 184028 then CH = CH .. name .. " " end
itemId = GetInventoryItemID(index, 14)
if itemId == 184028 then CH = CH .. name .. " " end
end
returnValue = SLH .. CH
return returnValue
end