Skip to content

Commit

Permalink
Fixed price parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Jan 26, 2020
1 parent 48a1242 commit 47e4ebd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions RECrystallize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ end
function RE:TooltipAddPrice(self)
if self:IsForbidden() then return end
local _, link = self:GetItem()
if IsLinkType(link, "item") then
if link and IsLinkType(link, "item") then
if link ~= RE.TooltipLink then
RE.TooltipLink = link
RE.TooltipItemID = tonumber(string.match(link, "item:(%d*)"))
Expand Down Expand Up @@ -232,11 +232,11 @@ function RE:Scan()

for i = 0, num - 1 do
if RE.DBScan[i] == nil then
local price, _, _, _, _, _, _, itemID, status = select(10, GetReplicateItemInfo(i))
if status and price and itemID and price > 0 and itemID > 0 then
local count, _, _, _, _, _, _, price, _, _, _, _, _, _, itemID, status = select(3, GetReplicateItemInfo(i))
if status and price and itemID and count and price > 0 and itemID > 0 and count > 0 then
local link = GetReplicateItemLink(i)
if link then
RE.DBScan[i] = {["Price"] = price, ["ItemID"] = itemID, ["ItemLink"] = link}
RE.DBScan[i] = {["Price"] = price / count, ["ItemID"] = itemID, ["ItemLink"] = link}
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion RECrystallize.toc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Interface: 80300
## Title: |cFF74D06CRE|rCrystallize
## Notes: Provide Auction House scanner and add item prices to tooltips.
## Version: 1.2.0
## Version: 1.2.1
## Author: AcidWeb
## SavedVariables: RECrystallizeSettings, RECrystallizeDatabase
## X-Website: https://www.curseforge.com/wow/addons/recrystallize-auction-house-scanner
Expand Down

0 comments on commit 47e4ebd

Please sign in to comment.