Mercurial > wow > wowdb-profiler
comparison Main.lua @ 447:bf1fbf1c9cb2
Added conditional code to account for changes in Patch 6.2's item strings. It now works with Live and PTR builds.
author | MMOSimca <MMOSimca@gmail.com> |
---|---|
date | Tue, 16 Jun 2015 07:34:14 -0400 |
parents | c8b5277f5e2e |
children | 0462238b0d97 |
comparison
equal
deleted
inserted
replaced
446:c8b5277f5e2e | 447:bf1fbf1c9cb2 |
---|---|
1066 if item_string then | 1066 if item_string then |
1067 local item_results = { (":"):split(item_string) } | 1067 local item_results = { (":"):split(item_string) } |
1068 | 1068 |
1069 local suffix_id = tonumber(item_results[8]) | 1069 local suffix_id = tonumber(item_results[8]) |
1070 local unique_id = item_results[9] | 1070 local unique_id = item_results[9] |
1071 --local level = tonumber(item_results[10]) | |
1072 --IN 6.2: local unknown = tonumber(item_results[11]) | |
1071 local upgrade_id = tonumber(item_results[11]) | 1073 local upgrade_id = tonumber(item_results[11]) |
1072 local instance_difficulty_id = tonumber(item_results[12]) | 1074 local instance_difficulty_id = tonumber(item_results[12]) |
1073 local num_bonus_ids = tonumber(item_results[13]) | 1075 local num_bonus_ids = tonumber(item_results[13]) |
1076 -- INTEGRATE WHEN 6.2 IS LIVE | |
1077 if (private.interface_num >= 60200) then | |
1078 upgrade_id = tonumber(item_results[12]) | |
1079 instance_difficulty_id = tonumber(item_results[13]) | |
1080 num_bonus_ids = tonumber(item_results[14]) | |
1081 end | |
1082 -- END INTEGRATE | |
1074 | 1083 |
1075 if not num_bonus_ids or num_bonus_ids == 0 or not process_bonus_ids then | 1084 if not num_bonus_ids or num_bonus_ids == 0 or not process_bonus_ids then |
1076 if (suffix_id and suffix_id ~= 0) or (instance_difficulty_id and instance_difficulty_id ~= 0) then | 1085 if (suffix_id and suffix_id ~= 0) or (instance_difficulty_id and instance_difficulty_id ~= 0) then |
1077 item = DBEntry("items", item_id) | 1086 item = DBEntry("items", item_id) |
1078 item.unique_id = bit.band(unique_id, 0xFFFF) | 1087 item.unique_id = bit.band(unique_id, 0xFFFF) |
1107 for iterations = 1, num_bonus_ids do | 1116 for iterations = 1, num_bonus_ids do |
1108 -- Find minimum of this iteration | 1117 -- Find minimum of this iteration |
1109 local min_bonus_id = 100000 | 1118 local min_bonus_id = 100000 |
1110 for bonus_index = 1, num_bonus_ids do | 1119 for bonus_index = 1, num_bonus_ids do |
1111 local temp_bonus_id = tonumber(item_results[13 + bonus_index]) | 1120 local temp_bonus_id = tonumber(item_results[13 + bonus_index]) |
1112 if (not min_bonus_id_array[temp_bonus_id]) and (temp_bonus_id < min_bonus_id) then | 1121 -- INTEGRATE WHEN 6.2 IS LIVE |
1122 if (private.interface_num >= 60200) then | |
1123 temp_bonus_id = tonumber(item_results[14 + bonus_index]) | |
1124 end | |
1125 -- END INTEGRATE | |
1126 if temp_bonus_id and (not min_bonus_id_array[temp_bonus_id]) and (temp_bonus_id < min_bonus_id) then | |
1113 min_bonus_id = temp_bonus_id | 1127 min_bonus_id = temp_bonus_id |
1114 end | 1128 end |
1115 end | 1129 end |
1116 | 1130 |
1117 -- Keep track of already processed IDs | 1131 -- Keep track of already processed IDs |