diff text_tabs.lua @ 61:99ab21f0755f

Fix major breakage in attendance snapshotting.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Thu, 19 Apr 2012 00:52:37 +0000
parents 45d2b153c2df
children 69fd720f853e
line wrap: on
line diff
--- a/text_tabs.lua	Tue Apr 17 20:51:36 2012 +0000
+++ b/text_tabs.lua	Thu Apr 19 00:52:37 2012 +0000
@@ -96,7 +96,7 @@
 
 		end
 	end
-	return true
+	return #cache > 0
 end
 
 local function forum_specials (_,_, container, mkbutton)
@@ -168,9 +168,7 @@
 	return i,o
 end
 
-local saved_g_loot_pointer
 local function att (_, loot, last_printed, _, cache)
-	saved_g_loot_pointer = loot
 	for i = last_printed+1, #loot do
 		local e = loot[i]
 
@@ -187,7 +185,7 @@
 
 		end
 	end
-	return true
+	return #cache > 0
 end
 
 local function att_specials (_, editbox, container, mkbutton)
@@ -195,11 +193,12 @@
 		[[Take attendance now (will continue to take attendance on each boss kill).]])
 	w:SetFullWidth(true)
 	w:SetCallback("OnClick", function(_w)
-		local instance, maxsize = addon.instance_tag()
-		local i,o = do_attendance (saved_g_loot_pointer.raiders, maxsize / MEMBERS_PER_RAID_GROUP)
+		local ss,max,instance = addon:snapshot_raid (--[[inraid=]]true)
+		local i,o = do_attendance (ss, max / MEMBERS_PER_RAID_GROUP)
 		local h, m = GetGameTime()
 
-		local additional = ("Attendance for %s at %.2d:%.2d:\n{+} %s\n{-} %s"):format(instance, h, m, i, o)
+		local additional = ("Attendance for %s at %.2d:%.2d:\n{+} %s\n{-} %s"):
+			format(instance, h, m, i, o)
 		editbox:SetText(editbox:GetText() .. '\n' .. additional)
 	end)
 	container:AddChild(w)