Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local myName = ...
- local startup = CreateFrame("Frame")
- startup:RegisterEvent("ADDON_LOADED")
- startup:SetScript("OnEvent",function(self, event, addonName)
- if ( addonName == myName ) then
- LoadAddOn("Blizzard_CompactRaidFrames")
- local orderedList = {
- "player",
- "party1",
- "party2",
- "party3",
- "party4",
- }
- local oldFunc = CRFSort_Group;
- CRFSort_Group = function(a, b)
- if IsInRaid() then
- return oldFunc(a,b)
- end
- for i, n in ipairs(orderedList) do
- if ( UnitIsUnit(a,n) or UnitIsUnit(b,n) ) then
- return UnitIsUnit(a,n)
- end
- end
- return a < b
- end
- CompactRaidFrameContainer.flowSortFunc = CRFSort_Group
- startup:UnregisterAllEvents()
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement