See what you get with:
lua Code:
function RepByZone:SetWatchedFactionByFactionID(id)
if type(id) == "table" then id = tonumber(id) end
if type(id) ~= "number" then return end
self:OpenAllFactionHeaders()
for i = 1, GetNumFactions() do
local name, _, standingID, _, _, _, _, _, isHeader, _, _, isWatched, _, factionID = GetFactionInfo(i)
self:Print("DEBUG: SetWatchedFactionByFactionID name:", name)
self:Print("DEBUG: SetWatchedFactionByFactionID index:", i)
if id == factionID then
if not isWatched then
SetWatchedFactionIndex(i)
end
self:CloseAllFactionHeaders()
return name, id
end
end
self:CloseAllFactionHeaders()
end