diff CrossRealmAssist.lua @ 38:616d67ff7543 beta-0.8

* Patch 7.0 update
author ShadowTheAge
date Wed, 20 Jul 2016 10:40:16 +0300
parents f39b5803b4c1
children d12ccf325b4b
line wrap: on
line diff
--- a/CrossRealmAssist.lua	Mon Oct 26 01:18:39 2015 +0300
+++ b/CrossRealmAssist.lua	Wed Jul 20 10:40:16 2016 +0300
@@ -199,7 +199,7 @@
 end
 
 local function WeightLfgItem(id, forAutoJoin)
-    local _, action, caption, desc, voice, ilvl, time, bnetfr, charfr, guild, delisted, fullname, pcount, autoinv = C_LFGList.GetSearchResultInfo(id)
+    local _, action, caption, desc, voice, ilvl, unk1, time, bnetfr, charfr, guild, delisted, fullname, pcount, autoinv = C_LFGList.GetSearchResultInfo(id)
     if delisted then return 0 end
     local name,realm = PlayerName(fullname);
     local ldesc = caption .. "|" .. desc;
@@ -241,7 +241,7 @@
 end
 
 local function AddLfgGroupInfo(id, short)
-    local _, action, caption, desc, voice, ilvl, time, bnetfr, charfr, guild, delisted, fullname, pcount, autoinv = C_LFGList.GetSearchResultInfo(id)
+    local _, action, caption, desc, voice, ilvl, unk1, time, bnetfr, charfr, guild, delisted, fullname, pcount, autoinv = C_LFGList.GetSearchResultInfo(id)
     local friends = bnetfr+charfr+guild
     GameTooltip:ClearLines()
     GameTooltip:AddLine(caption,1,1,1)
@@ -282,7 +282,7 @@
     if fShow then
         local rowdata = table:GetRow(realrow);
         local icons = cellFrame.icons
-        local _, action, caption, desc, voice, ilvl, time, bnetfr, charfr, guild, delisted, fullname, pcount, autoinv = C_LFGList.GetSearchResultInfo(rowdata.id)
+        local _, action, caption, desc, voice, ilvl, unk1, time, bnetfr, charfr, guild, delisted, fullname, pcount, autoinv = C_LFGList.GetSearchResultInfo(rowdata.id)
         if not icons then
             local miscdata = createIcon(cellFrame,READY_CHECK_WAITING_TEXTURE,0)
             local autoinv = createIcon(cellFrame,READY_CHECK_READY_TEXTURE, 1)
@@ -302,13 +302,13 @@
 end
 
 local function updateRealmType(id)
-    local name = select(12, C_LFGList.GetSearchResultInfo(id))
+    local name = select(13, C_LFGList.GetSearchResultInfo(id))
     local pname, realm = PlayerName(name);
     return select(4, realmInfo:GetRealmInfo(realm)) or "???"
 end
 
 local function updateGroupAge(id)
-    local age = select(7, C_LFGList.GetSearchResultInfo(id))
+    local age = select(8, C_LFGList.GetSearchResultInfo(id))
     return SecondsToTime(age, false, false, 1, false)
 end
 
@@ -327,13 +327,13 @@
     if rowa == nil or rowb == nil then return false end; -- wtf ScrollingTable???
     local row1 = lfgTable:GetRow(rowa);
     local row2 = lfgTable:GetRow(rowb);
-    local age1 = select(7, C_LFGList.GetSearchResultInfo(row1.id));
-    local age2 = select(7, C_LFGList.GetSearchResultInfo(row2.id));
+    local age1 = select(8, C_LFGList.GetSearchResultInfo(row1.id));
+    local age2 = select(8, C_LFGList.GetSearchResultInfo(row2.id));
     return sortBase(sortbycol, age1<age2);
 end
 
 local function updateJoinAge(id)
-    local name = select(12, C_LFGList.GetSearchResultInfo(id))
+    local name = select(13, C_LFGList.GetSearchResultInfo(id))
     local ago = getJoinedAgo(name);
     if ago then
         return SecondsToTime(ago, false, false, 1, false)
@@ -346,8 +346,8 @@
     if rowa == nil or rowb == nil then return false end; -- wtf ScrollingTable???
     local row1 = lfgTable:GetRow(rowa);
     local row2 = lfgTable:GetRow(rowb);
-    local joinAge1 = getJoinedAgo(select(12, C_LFGList.GetSearchResultInfo(row1.id))) or 1e10;
-    local joinAge2 = getJoinedAgo(select(12, C_LFGList.GetSearchResultInfo(row2.id))) or 1e10;
+    local joinAge1 = getJoinedAgo(select(13, C_LFGList.GetSearchResultInfo(row1.id))) or 1e10;
+    local joinAge2 = getJoinedAgo(select(13, C_LFGList.GetSearchResultInfo(row2.id))) or 1e10;
     return sortBase(sortbycol, joinAge1<joinAge2);
 end
 
@@ -359,11 +359,11 @@
 end
 
 local function updateGroupCount(id)
-    return select(13, C_LFGList.GetSearchResultInfo(id))
+    return select(14, C_LFGList.GetSearchResultInfo(id))
 end
 
 local function updateGroupRealm(id)
-    local name = select(12, C_LFGList.GetSearchResultInfo(id))
+    local name = select(13, C_LFGList.GetSearchResultInfo(id))
     local pname, realm = PlayerName(name);
     return realm;
 end
@@ -374,7 +374,7 @@
 local COLOR_RED = {r=1,g=0,b=0,a=1}
 local COLOR_GREY = {r=0.5,g=0.5,b=0.5,a=1}
 local function updateRealmColor(id)
-    local name = select(12, C_LFGList.GetSearchResultInfo(id))
+    local name = select(13, C_LFGList.GetSearchResultInfo(id))
     local pname, realm = PlayerName(name);
     return recentRealms[realm] and COLOR_YELLOW or COLOR_GREEN;
 end
@@ -388,7 +388,7 @@
 end
 
 local function filterTable(self, row)
-    local _, _, caption, desc, _, _, _, _, _, _, delisted, _, pcount, autoinv = C_LFGList.GetSearchResultInfo(row.id)
+    local _, _, caption, desc, _, _, _, _, _, _, _, delisted, _, pcount, autoinv = C_LFGList.GetSearchResultInfo(row.id)
     if delisted then return false end;
     if filterByCountId > 1 then
         local fobj = filterByCountList[filterByCountId];
@@ -405,7 +405,7 @@
 
 function addon:UpdateResponseData(event, result)
     if not lfgTable then return end
-    if select(11, C_LFGList.GetSearchResultInfo(result)) then
+    if select(12, C_LFGList.GetSearchResultInfo(result)) then
         lfgTable:SetFilter(filterTable)
     end
     hasLfgListChanges = true
@@ -770,7 +770,7 @@
 end
 
 function addon:SetGroupJoinStatus(id, status)
-    local name = select(12, C_LFGList.GetSearchResultInfo(id))
+    local name = select(13, C_LFGList.GetSearchResultInfo(id))
     if name then
         recentgroups[name] = {status=status, time=GetTime()}
     end
@@ -973,7 +973,7 @@
         if button == "RightButton" then
             addon:SetGroupJoinStatus(self.groupToJoin, "_skip")
         else
-            local delisted = select(11, C_LFGList.GetSearchResultInfo(self.groupToJoin))
+            local delisted = select(12, C_LFGList.GetSearchResultInfo(self.groupToJoin))
             if delisted == false then
                 JoinGroup(self.groupToJoin)
             else
@@ -1018,6 +1018,7 @@
 local NeedReset = {
     func = function()
         wipe(autoScanGroups);
+		curLfgGroup = 0;
         local categoryToScan = addon.GetNextAutoScanCategory()
         if categoryToScan then
             addon.LfgScan(categoryToScan)