Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop rate now shown for wishlist and search result items #121

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions Core/AtlasLoot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1351,10 +1351,11 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
priceicon5:Show();
end
end
--Set prices for items, up to 5 different currencies can be used in combination
itemButton.droprate = nil;
if (dataID == "SearchResult" or dataID == "WishList") and dataSource[dataID][i][5] then
local wishDataID, wishDataSource = strsplit("|", dataSource[dataID][i][5])
if wishDataSource == "AtlasLootRepItems" then
--Set prices for items, up to 5 different currencies can be used in combination
if wishDataID and AtlasLoot_IsLootTableAvailable(wishDataID) then
for _, v in ipairs(AtlasLoot_Data[wishDataSource][wishDataID]) do
if dataSource[dataID][i][1] == v[1] then
Expand Down Expand Up @@ -1408,6 +1409,19 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
end
end
end

if wishDataSource == "AtlasLootItems" then
--Set drop rate
if wishDataID and AtlasLoot_IsLootTableAvailable(wishDataID) then
for _, v in ipairs(AtlasLoot_Data[wishDataSource][wishDataID]) do
if dataSource[dataID][i][1] == v[1] then
if v[5] then
itemButton.droprate = v[5]
end
end
end
end
end
end
--For convenience, we store information about the objects in the objects so that it can be easily accessed later
itemButton.itemID = dataSource[dataID][i][1];
Expand Down Expand Up @@ -1464,7 +1478,6 @@ function AtlasLoot_ShowItemsFrame(dataID, dataSource, boss, pFrame)
end
end
end
itemButton.droprate = nil;
if dataID == "SearchResult" or dataID == "WishList" then
itemButton.sourcePage = dataSource[dataID][i][5];
else
Expand Down