Quantcast

Added code to check whether we're running on a wrath client or not

James Whitehead II [08-10-08 - 18:38]
Added code to check whether we're running on a wrath client or not
Filename
WowLua.lua
WowLua.xml
diff --git a/WowLua.lua b/WowLua.lua
index 6d329b2..a6e4698 100644
--- a/WowLua.lua
+++ b/WowLua.lua
@@ -5,6 +5,10 @@
   WowLua is an interactive interpreter for World of Warcraft
 --------------------------------------------------------------------------]]--

+function IsWrathBuild()
+	return(tonumber(select(4, GetBuildInfo())) >= 30000)
+end
+
 WowLua = {
 	VERSION = "WowLua 1.0 Interactive Interpreter",
 }
diff --git a/WowLua.xml b/WowLua.xml
index 5ad4549..30e73c1 100644
--- a/WowLua.xml
+++ b/WowLua.xml
@@ -506,7 +506,11 @@
 							<OnCursorChanged>
 								WowLua.lastCursorPos = WowLua.cursorPos
 								WowLua.cursorPos = self:GetCursorPosition()
-								ScrollingEdit_OnCursorChanged(self, x,y,w,h)
+								if IsWrathBuild() then
+									ScrollingEdit_OnCursorChanged(self,x,y,w,h)
+								else
+									ScrollingEdit_OnCursorChanged(x,y,w,h)
+								end
 								WowLua:UpdateLineNums()
 								WowLuaFrameEditScrollFrameScrollBar:SetValue(WowLuaFrameEditScrollFrame:GetVerticalScroll())
 							</OnCursorChanged>