Quantcast

Fixing TomTom in wrath, using IsWrathBuild()

James Whitehead II [08-10-08 - 18:43]
Fixing TomTom in wrath, using IsWrathBuild()
Filename
TomTom.lua
TomTom_CrazyArrow.lua
diff --git a/TomTom.lua b/TomTom.lua
index b3a52c6..96bef12 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -2,6 +2,10 @@
 --  TomTom by Cladhaire <cladhaire@gmail.com>
 ----------------------------------------------------------------------------]]

+function IsWrathBuild()
+	return(tonumber(select(4, GetBuildInfo())) >= 30000)
+end
+
 -- Simple localization table for messages
 local L = TomTomLocals
 local Astrolabe = DongleStub("Astrolabe-0.4")
@@ -467,7 +471,11 @@ local dropdown_info = {
 	},
 }

-local function init_dropdown(level)
+local function init_dropdown(self, level)
+	if not IsWrathBuild() then
+		level = self
+	end
+
 	-- Make sure level is set to 1, if not supplied
 	level = level or 1

diff --git a/TomTom_CrazyArrow.lua b/TomTom_CrazyArrow.lua
index ea7bcb6..37c1467 100644
--- a/TomTom_CrazyArrow.lua
+++ b/TomTom_CrazyArrow.lua
@@ -311,7 +311,11 @@ local dropdown_info = {
 	}
 }

-local function init_dropdown(level)
+local function init_dropdown(self, level)
+	if not IsWrathBuild() then
+		level = self
+	end
+
 	-- Make sure level is set to 1, if not supplied
 	level = level or 1