I was looking at the global strings, and found NOT_IN_TORGHAST, which is partially useful to me. What I want is just the word "Torghast" without the rest of the phrase "Can't do that in Torghast, Tower of the Damned".
In English, I could match that easily enough, I think, but would my snippet work across all languages the game supports?
local torghast = NOT_IN_TORGHAST:match("^Torghast$")
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.
-- 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
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.