diff gui.lua @ 55:ac57a4342812

More people going to be looking at g_loot entries, so start cleaning up older fields a bit, and handle loading older data.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Sat, 07 Apr 2012 05:40:20 +0000
parents 6d5fcbdc0590
children fcc0d0ff5832
line wrap: on
line diff
--- a/gui.lua	Sat Apr 07 04:59:27 2012 +0000
+++ b/gui.lua	Sat Apr 07 05:40:20 2012 +0000
@@ -302,7 +302,7 @@
 					v = ("wipe (%d:%.2d)"):format(math.floor(e.duration/60), math.floor(e.duration%60))
 				end
 				e.cols = {
-					{value = e.bosskill},
+					{value = e.bossname},
 					{value = e.instance},
 					{value = v or ""},
 				}
@@ -522,7 +522,7 @@
 	df_DELETE = function(rowi)
 		local gone = tremove(g_loot,rowi)
 		addon:Print("Removed %s.",
-			gone.itemlink or gone.bosskill or gone.startday.text)
+			gone.itemlink or gone.bossname or gone.startday.text)
 		if gone.kind == 'loot' and IsShiftKeyDown() then
 			addon:_delHistoryEntry (rowi, gone)
 		end
@@ -553,12 +553,12 @@
 		repeat
 			local e = g_loot[rowi]
 			if e.kind == 'boss' then
-				addon:broadcast('boss', e.reason, e.bosskill, e.instance)
+				addon:broadcast('boss', e.reason, e.bossname, e.instance)
 			elseif e.kind == 'loot' then
 				-- This only works because GetItemInfo accepts multiple argument formats
 				addon:broadcast('loot', e.person, e.itemlink, e.count, e.cols[3].value)
 			end
-			addon:Print("Rebroadcast entry", rowi, e.itemlink or e.bosskill or UNKNOWN)
+			addon:Print("Rebroadcast entry", rowi, e.itemlink or e.bossname or UNKNOWN)
 			rowi = rowi + 1
 		until rowi >= fencepost
 	end,
@@ -804,7 +804,7 @@
 		EasyMenu (eoi_player_dropdown, dropdownmenuframe, cellFrame, 0, 0, "MENU")
 
 	elseif kind == 'boss' then
-		eoi_boss_dropdown[1].text = e.bosskill
+		eoi_boss_dropdown[1].text = e.bossname
 		EasyMenu (eoi_boss_dropdown, dropdownmenuframe, cellFrame, 0, 0, "MENU")
 
 	elseif kind == 'time' then
@@ -967,8 +967,8 @@
 	for i,e in ipairs(g_loot) do
 		if type(e.cols) ~= 'table' then
 			addon:Print("ARGH, index",i,"bad in eoi_OGS, type",type(e.cols),
-				"entry kind", e.kind, "data", e.itemname or e.bosskill or e.startday.text,
-				"-- please take a screenshot and send to Farmbuyer.")
+				"entry kind", e.kind, "data", e.itemname or e.bossname or e.startday.text,
+				"-- please take a screenshot and send to Farmbuyer@US-Kilrogg.")
 			tabledump(e)
 		end
 	end
@@ -996,8 +996,8 @@
 		for i,e in ipairs(g_loot) do
 			if type(e.cols) ~= 'table' then
 				addon:Print("ARGH, index",i,"bad in eoi refresh, refreshed at", opt_index, "type",type(e.cols),
-					"entry kind", e.kind, "data", e.itemname or e.bosskill or e.startday.text,
-					"-- please take a screenshot and send to Farmbuyer.")
+					"entry kind", e.kind, "data", e.itemname or e.bossname or e.startday.text,
+					"-- please take a screenshot and send to Farmbuyer@US-Kilrogg.")
 				tabledump(e)
 			end
 		end
@@ -1152,7 +1152,7 @@
 	["Delete this loot history"] = function(rowi)
 		--local gone = tremove(g_loot,rowi)
 		--addon:Print("Removed %s.",
-			--gone.itemlink or gone.bosskill or gone.startday.text)
+			--gone.itemlink or gone.bossname or gone.startday.text)
 	end,
 }
 local hist_dropdown = gen_easymenu_table(
@@ -2133,7 +2133,7 @@
 		-- been real loot happening at the same time.
 		local boss_index = addon._addLootEntry{
 			kind		= 'boss',
-			bosskill	= (OuroLootSV_opts.snarky_boss and addon.boss_abbrev[data.name] or data.name) or data.name,
+			bossname	= (OuroLootSV_opts.snarky_boss and addon.boss_abbrev[data.name] or data.name) or data.name,
 			reason		= 'kill',
 			instance	= data.instance,
 			duration	= 0,