changeset 53:7af58a7dce7d

Don't collapse wipes into kills across normal/heroic boundaries. Apply preferredIndex change to popup dialogs to avoid memory tainting.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Fri, 06 Apr 2012 18:23:22 +0000
parents 94dacaeff463
children 6d5fcbdc0590
files LibFarmbuyer.lua core.lua gui.lua
diffstat 3 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/LibFarmbuyer.lua	Wed Feb 01 06:53:34 2012 +0000
+++ b/LibFarmbuyer.lua	Fri Apr 06 18:23:22 2012 +0000
@@ -54,7 +54,7 @@
   Ditto for table recycling.
 ]]
 
-local MAJOR, MINOR = "LibFarmbuyer", 14
+local MAJOR, MINOR = "LibFarmbuyer", 15
 assert(LibStub,MAJOR.." requires LibStub")
 local lib = LibStub:NewLibrary(MAJOR, MINOR)
 if not lib then return end
@@ -215,6 +215,7 @@
     t.whileDead = true
     t.hideOnEscape = true
 	t.enterClicksFirstButton = true
+	t.preferredIndex = 3  -- http://forums.wowace.com/showthread.php?t=19960
 
     return t
 end
--- a/core.lua	Wed Feb 01 06:53:34 2012 +0000
+++ b/core.lua	Fri Apr 06 18:23:22 2012 +0000
@@ -1463,6 +1463,7 @@
 		while d ~= e do
 			if d.bosskill and
 			   d.bosskill == e.bosskill and
+			   d.instance == e.instance and
 			   d.reason == 'wipe'
 			then
 				first = first or i
--- a/gui.lua	Wed Feb 01 06:53:34 2012 +0000
+++ b/gui.lua	Fri Apr 06 18:23:22 2012 +0000
@@ -2269,6 +2269,7 @@
 	enterClicksFirstButton = true,
 	hasEditBox = true,
 	editBoxWidth = 350,
+	preferredIndex = 3,
 	OnShow = function (dialog, url)
 		dialog.editBox:SetText(url)
 		dialog.editBox:SetFocus()