} |
wipe(db.whoTable) -- Wipe the table |
AtlasLoot:LoadModule("all") -- Force AtlasLoot to load all modules |
for k1,v1 in pairs(AtlasLoot_TableNames) do -- in loottables.*.lua |
if type(AtlasLoot_Data[k1]) == "table" then |
for k2,v2 in pairs(AtlasLoot_Data[k1]) do |
if type(v2) == "table" and type(v2[2]) == "number" and v2[2] > 0 and not excludes[v2[2]] and v1[1] ~= "Keys" then |
-- Check if 25 man zone |
if strsub(k1, -5) == "25Man" then |
zone = strtrim(string.format(L["25 Man %s"], AtlasLootReverse:FindZone(strsub(k1, 1, strlen(k1)-5)))) |
else |
zone = AtlasLootReverse:FindZone(k1) |
end |
if zone ~= "" then zone = " (" .. zone .. ")" end |
-- T8 filter |
if string.match(k1, "^Naxx%u") then |
zone = " T7/T8 Token" |
-- T9 filter |
elseif string.match(k1, "^T9%u") then |
zone = " T9 Token" |
end |
if (db.whoTable[v2[2]]) then |
if not string.find(db.whoTable[v2[2]], v1[1] .. zone, 1, true) then |
db.whoTable[v2[2]] = db.whoTable[v2[2]] .. "|" .. v1[1] .. zone |
for _,itable in pairs(AtlasLoot_Data) do |
for k,v in pairs(itable) do |
if k == "Normal" or k == "Heroic" or k == "25Man" or k == "25ManHeroic" then |
for k2,v2 in pairs(v) do |
if type(v2[1]) == "table" and type(v2[1][2]) == "number" and v2[1][2] > 0 and not excludes[v2[1][2]] and itable.info.name ~= "Keys" then |
zone = "" |
if itable.info.instance and AtlasLoot_LootTableRegister.Instances[itable.info.instance] then |
zone = AtlasLoot_LootTableRegister.Instances[itable.info.instance].Info[1] |
end |
else |
db.whoTable[v2[2]] = v1[1] .. zone |
-- Check if non-normal zone |
if k == "Heroic" then |
zone = strtrim(string.format(L["Heroic %s"], zone)) |
elseif k == "25Man" then |
zone = strtrim(string.format(L["25 Man %s"], zone)) |
elseif k == "25ManHeroic" then |
zone = strtrim(string.format(L["25 Man Heroic %s"], zone)) |
end |
if zone ~= "" then |
zone = " (" .. zone .. ")" |
end |
-- Check to see if it drops from multiple people |
if (db.whoTable[v2[1][2]]) then |
if not string.find(db.whoTable[v2[1][2]], itable.info.name .. zone, 1, true) then |
db.whoTable[v2[1][2]] = db.whoTable[v2[1][2]] .. "|" .. itable.info.name .. zone |
end |
else |
db.whoTable[v2[1][2]] = itable.info.name .. zone |
end |
end |
end |
end |
end |
end |
db.dbversion = AtlasLootReverse.version |
db.alversion = ATLASLOOT_VERSION |
db.alversion = ATLASLOOT_VERSION_NUM |
print(AtlasLootReverse.title .. " database rebuilt.") |
end |
TT:AddCallback(AtlasLootReverse.Who) |