Advertisement
berlin

Reorder Raid Frames

Sep 12th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.63 KB | None | 0 0
  1. oldCRFSort_Group = CRFSort_Group
  2. CRFSort_Group = function(token1, token2)
  3.     if IsActiveBattlefieldArena() == nil then
  4.        return oldCRFSort_Group(token1, token2)
  5.     end
  6.  
  7.     local id1 = tonumber(string.sub(token1, 5));
  8.     local id2 = tonumber(string.sub(token2, 5));
  9.  
  10.     if not id1 or not id2 then
  11.         return id1
  12.     end
  13.  
  14.     local name1, _, _, _, class1 = GetRaidRosterInfo(id1);
  15.     local name2, _, _, _, class2 = GetRaidRosterInfo(id2);
  16.  
  17.     if name1 == UnitName("player") then
  18.         return true
  19.     end
  20.  
  21.     if name2 == UnitName("player") then
  22.         return false
  23.     end
  24.  
  25.     return id1 < id2
  26. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement