View Single Post
04-11-21, 08:42 AM   #2
DahkCeles
A Cliff Giant
 
DahkCeles's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2020
Posts: 73
Something I threw together really quick, using the uiMapID of the Oribos top floor (because I happened to be standing next to a portal when I logged on) and fps of 45 and 60 (because I cannot dream of 144fps).

A simpler solution probably would just ask IsInInstance() and slow things a bit in all dungeons? Or, for that matter, why not just toggle the instance graphics settings in the control panel?

Lua Code:
  1. local zonesToSlowDown =
  2. {
  3.     [1671] = true,      -- Orbios: Ring of Transference
  4. }
  5.  
  6. local f = CreateFrame("Frame")
  7.  
  8. f:RegisterEvent("ZONE_CHANGED")
  9. f:RegisterEvent("ZONE_CHANGED_INDOORS")
  10. f:RegisterEvent("PLAYER_ENTERING_WORLD")
  11.  
  12. f:SetScript("OnEvent", function()
  13.     if (zonesToSlowDown[C_Map.GetBestMapForUnit("player") or 0]) then
  14.         C_CVar.SetCVar("maxFPS", 45)
  15.     else
  16.         C_CVar.SetCVar("maxFPS", 60)
  17.     end
  18. end)
  Reply With Quote