Advertisement
Ketho

Fix RaidFrame Taint [Proof of Concept]

Sep 30th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.83 KB | None | 0 0
  1. -- http://www.curse.com/addons/wow/showraidframe#c4
  2.  
  3. local container = CompactRaidFrameContainer
  4.  
  5. local t = {
  6.     discrete = "flush",
  7.     flush = "discrete",
  8. }
  9.  
  10. local function FixTaintBug(self)
  11.     -- secure or still in combat somehow
  12.     if issecurevariable("CompactRaidFrame1") or InCombatLockdown() or not container:IsShown() then return end
  13.    
  14.     -- Bug #1: left/joined players not updated
  15.     -- Bug #2: sometimes selecting different than the intended target
  16.    
  17.     -- change back and forth from flush <-> discrete
  18.     local mode = container.groupMode -- groupMode changes after _SetGroupMode calls
  19.     CompactRaidFrameContainer_SetGroupMode(container, t[mode]) -- forth
  20.     CompactRaidFrameContainer_SetGroupMode(container, mode) -- back
  21. end
  22.  
  23. local f = CreateFrame("Frame")
  24. f:RegisterEvent("PLAYER_REGEN_ENABLED")
  25. f:SetScript("OnEvent", FixTaintBug)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement