Skip to content

Commit

Permalink
Update for patch 1.15.0 and 3.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ketho committed Dec 5, 2023
1 parent ade9656 commit 47ef4fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
20 changes: 5 additions & 15 deletions VendorPrice.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ local VP = VendorPrice
local isVanilla = WOW_PROJECT_ID == WOW_PROJECT_CLASSIC
local isWrath = WOW_PROJECT_ID == WOW_PROJECT_WRATH_CLASSIC

local ContainerIDToInventoryID = ContainerIDToInventoryID or C_Container.ContainerIDToInventoryID

local SELL_PRICE_TEXT = format("%s:", SELL_PRICE)
local overridePrice

Expand All @@ -14,8 +12,8 @@ for i = CONTAINER_BAG_OFFSET+1, 23 do
CharacterBags[i] = true
end

local firstBankBag = ContainerIDToInventoryID(NUM_BAG_SLOTS + 1)
local lastBankBag = ContainerIDToInventoryID(NUM_BAG_SLOTS + NUM_BANKBAGSLOTS)
local firstBankBag = C_Container.ContainerIDToInventoryID(NUM_BAG_SLOTS + 1)
local lastBankBag = C_Container.ContainerIDToInventoryID(NUM_BAG_SLOTS + NUM_BANKBAGSLOTS)
for i = firstBankBag, lastBankBag do
CharacterBags[i] = true
end
Expand Down Expand Up @@ -100,17 +98,9 @@ local SetItem = {
VP:SetPrice(tt, true, "SetAuctionSellItem", count)
end,
SetBagItem = function(tt, bag, slot)
local count
if GetContainerItemInfo then
count = select(2, GetContainerItemInfo(bag, slot))
else
local info = C_Container.GetContainerItemInfo(bag, slot)
if info then
count = info.stackCount
end
end
if count then
VP:SetPrice(tt, true, "SetBagItem", count)
local info = C_Container.GetContainerItemInfo(bag, slot)
if info and info.stackCount then
VP:SetPrice(tt, true, "SetBagItem", info.stackCount)
end
end,
--SetBagItemChild
Expand Down
4 changes: 2 additions & 2 deletions VendorPrice.toc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Interface: 30402
## Interface-Classic: 11404
## Interface: 30403
## Interface-Classic: 11500
## Version: @project-version@
## Title: Vendor Price
## Notes: Displays the price of an item when not at a vendor
Expand Down

0 comments on commit 47ef4fa

Please sign in to comment.