Skip to content

Commit

Permalink
Scoping prices from ATT to tooltip setting
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymclane committed Jul 2, 2018
1 parent be4bf97 commit ddec325
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion loot/Loot.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
local SECONDS_IN_DAY = 86400

-- Local functions --
local function GetATTPrice(itemLink)
if (ArkadiusTradeTools == nil or ArkadiusTradeTools.Modules.Sales == nil) then
return nil
end
local itemPrice = ArkadiusTradeTools.Modules.Sales:GetAveragePricePerItem(itemLink)
local days = ArkadiusTradeToolsSalesData.settings.tooltips.days
local startingDate = GetTimeStamp() - (SECONDS_IN_DAY * days)
local itemPrice = ArkadiusTradeTools.Modules.Sales:GetAveragePricePerItem(itemLink, startingDate)
return itemPrice
end

Expand Down

0 comments on commit ddec325

Please sign in to comment.