View Single Post
Unread 03-05-11, 04:48 PM   #9
Morsker
A Fallenroot Satyr
 
Morsker's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 22
When trying to make mods compatible between 4.0.6 and 4.1 I noticed that GetBuildInfo() is still returning 40000 as its 4th value on the PTR, even though the 1st value is "4.1.0". I resorted to this for consistency's sake:

Code:
local clientVersion
do
	local version = GetBuildInfo() -- e.g. "4.0.6"
	local a, b, c = strsplit(".", version) -- e.g. "4", "0", "6"
	clientVersion = 10000*a + 100*b + c -- e.g. 40006
end
Morsker is offline   Reply With Quote