WoWInterface SVN AtlasLootReverse

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 35 to Rev 37
    Reverse comparison

Rev 35 → Rev 37

AtlasLootReverse.lua
58,7 → 58,7
----------------------
--Loaded
function AtlasLootReverse:OnEnable()
if db.dbversion ~= AtlasLootReverse.version or db.alversion ~= ATLASLOOT_VERSION then
if db.dbversion ~= AtlasLootReverse.version or db.alversion ~= ATLASLOOT_VERSION_NUM then
local zone
local excludes = {
[29434] = true, -- BoJ
74,37 → 74,41
}
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)
121,21 → 125,6
end
end
 
----------------------
--Gets a Zone given an AtlasLoot Boss ID
function AtlasLootReverse:FindZone(ALBID)
for k,v in pairs(AtlasLoot_DewDropDown_SubTables) do
for i,j in pairs(v) do
if j[2] == ALBID then
tmp = ""
tfind(AtlasLoot_DewDropDown, k)
return tmp
end
end
end
return ""
end
 
-- LibExtraTip Call Backs
function AtlasLootReverse:Who(item)
local _, itemId = strsplit(":", item)
AtlasLootReverse.toc
1,7 → 1,7
## Interface: 40000
## Title: AtlasLootReverse
## Notes: Does a reverse lookup of AtlasLoot for an item's drop info.
## Version: 1.8
## Version: 1.9
## Author: pceric
## SavedVariables: AtlasLootReverseDB
## X-Website: http://www.wowinterface.com/downloads/info12834-AtlasLootReverse.html
locales/locale-enUS.lua
10,4 → 10,6
L["Commands:\n/alr embed - Toggles the tooltip being embedded or split into another box"] = true
 
L["Drops from %s"] = true -- %s is boss (instance)
L["Heroic %s"] = true -- %s is instance
L["25 Man %s"] = true -- %s is instance
L["25 Man Heroic %s"] = true -- %s is instance