Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. local myFrame = CreateFrame("Frame")
  2. myFrame:SetScript("OnEvent", function(self, event, ...) self[event](self, event, ...) end)
  3.  
  4. myFrame:RegisterEvent("PLAYER_LOGIN")
  5. function myFrame:PLAYER_LOGIN(...)
  6.     SetCVar("cameradistancemaxfactor",4)
  7.     SetCVar("bgloadthrottle",0)
  8.     SetCVar("combatLogOn",0)
  9.     SetCVar("CombatLogPeriodicSpells",0)
  10.  
  11.     COMBATLOG:SetScript("OnUpdate", nil)
  12.     COMBATLOG:SetScript("OnEvent", nil)
  13.     COMBATLOG:SetScript("OnShow", nil)
  14.     COMBATLOG:UnregisterAllEvents()
  15.     CombatLogUpdateFrame:SetScript("OnUpdate", nil)
  16.     CombatLogUpdateFrame:UnregisterAllEvents()
  17. end
  18.  
  19. myFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
  20. function myFrame:PLAYER_ENTERING_WORLD(...)
  21.     local _, instanceType = IsInInstance()
  22.     if instanceType == "raid" or instanceType == "arena" then
  23.         SetCVar("farclip",400)
  24.     elseif instanceType == "none"then
  25.         SetCVar("farclip",1000)
  26.     end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement