I am going to test a hack of sorts. 1762 is the uiMapID for Torghast, Tower of the Damned, but I want to check the name and compare it to the minimap's zone text in order to apply Ve'nari reputation to all floors of the tower. What I'd like to avoid is having to do data entry for 100+ uiMapIDs or instanceIDs.
Lua Code:
-- Fancy trick to localize all floors of Torghast, Tower of the Damned
local torghastName = C_Map.GetMapInfo(1762).name
local subZone = GetMinimapZoneText()
-- Check for all floors of Torghast, Tower of the Damned
local isTorghast = strmatch(subZone, "^" .. torghastName .. ".*")
if isTorghast then
if self:SetWatchedFactionByFactionID(2432) then -- Ve'nari
return
end
end
self:SetWatchedFactionByFactionID() is a function I borrowed from Diplomancer by Phanx and Talyrus to set the watched reputation as an XP bar, passing in the faction I want watched.