# HG changeset patch # User MMOSimca # Date 1434454454 14400 # Node ID bf1fbf1c9cb25de4e8b79dec077ed695178657c8 # Parent c8b5277f5e2e3e236305c2cebec144f06575ab2f Added conditional code to account for changes in Patch 6.2's item strings. It now works with Live and PTR builds. diff -r c8b5277f5e2e -r bf1fbf1c9cb2 Constants.lua --- a/Constants.lua Thu Mar 12 03:10:39 2015 -0400 +++ b/Constants.lua Tue Jun 16 07:34:14 2015 -0400 @@ -455,7 +455,7 @@ ----------------------------------------------------------------------- -- Fundamental Constants. ----------------------------------------------------------------------- -private.wow_version, private.build_num = _G.GetBuildInfo() +private.wow_version, private.build_num, _, private.interface_num = _G.GetBuildInfo() private.region = GetCVar("portal"):sub(0,2):upper() -- PTR/Beta return "public-test", but they are properly called "XX" if private.region == "PU" then private.region = "XX" end diff -r c8b5277f5e2e -r bf1fbf1c9cb2 Main.lua --- a/Main.lua Thu Mar 12 03:10:39 2015 -0400 +++ b/Main.lua Tue Jun 16 07:34:14 2015 -0400 @@ -1068,9 +1068,18 @@ local suffix_id = tonumber(item_results[8]) local unique_id = item_results[9] + --local level = tonumber(item_results[10]) + --IN 6.2: local unknown = tonumber(item_results[11]) local upgrade_id = tonumber(item_results[11]) local instance_difficulty_id = tonumber(item_results[12]) local num_bonus_ids = tonumber(item_results[13]) + -- INTEGRATE WHEN 6.2 IS LIVE + if (private.interface_num >= 60200) then + upgrade_id = tonumber(item_results[12]) + instance_difficulty_id = tonumber(item_results[13]) + num_bonus_ids = tonumber(item_results[14]) + end + -- END INTEGRATE if not num_bonus_ids or num_bonus_ids == 0 or not process_bonus_ids then if (suffix_id and suffix_id ~= 0) or (instance_difficulty_id and instance_difficulty_id ~= 0) then @@ -1109,7 +1118,12 @@ local min_bonus_id = 100000 for bonus_index = 1, num_bonus_ids do local temp_bonus_id = tonumber(item_results[13 + bonus_index]) - if (not min_bonus_id_array[temp_bonus_id]) and (temp_bonus_id < min_bonus_id) then + -- INTEGRATE WHEN 6.2 IS LIVE + if (private.interface_num >= 60200) then + temp_bonus_id = tonumber(item_results[14 + bonus_index]) + end + -- END INTEGRATE + if temp_bonus_id and (not min_bonus_id_array[temp_bonus_id]) and (temp_bonus_id < min_bonus_id) then min_bonus_id = temp_bonus_id end end