View Single Post
07-21-21, 04:55 PM   #4
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,240
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:
  1. -- Fancy trick to localize all floors of Torghast, Tower of the Damned
  2. local torghastName = C_Map.GetMapInfo(1762).name
  3.  
  4. local subZone = GetMinimapZoneText()
  5.  
  6. -- Check for all floors of Torghast, Tower of the Damned
  7. local isTorghast = strmatch(subZone, "^" .. torghastName .. ".*")
  8. if isTorghast then
  9.     if self:SetWatchedFactionByFactionID(2432) then -- Ve'nari
  10.         return
  11.     end
  12. 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.
  Reply With Quote