Fix possible nil error
This commit is contained in:
parent
5476912b00
commit
75ed05e1d9
|
@ -6,4 +6,4 @@ Quality of Life improvements for auction house
|
|||
- Adjust price by itemlevel (default blizz uses the lowest price regardless the itemlevel)
|
||||
|
||||
#### Links
|
||||
[Releases](https://git.grml.de/rilgamon/BurnBaby/releases "Releases") | [Source](https://git.grml.de/rilgamon/BurnBaby "Source") | [Bugs&Comments](https://git.grml.de/rilgamon/BurnBaby/issues "Bugs&Comments") | [Donate](https://liberapay.com/bundesloser "Donate") | [Contact](https://mastodon.grml.de/@robin "Contact")
|
||||
[Releases](https://git.grml.de/rilgamon/zzAuctions/releases "Releases") | [Source](https://git.grml.de/rilgamon/zzAuctions "Source") | [Bugs&Comments](https://git.grml.de/rilgamon/zzAuctions/issues "Bugs&Comments") | [Donate](https://liberapay.com/bundesloser "Donate") | [Contact](https://mastodon.grml.de/@robin "Contact")
|
24
core.lua
24
core.lua
|
@ -41,17 +41,19 @@ local function hookItem(self, ...)
|
|||
local il = cItemLoc or ItemLoc
|
||||
if(il:IsValid() and il:IsBagAndSlot()) then
|
||||
local bid = C_Item.GetItemID(il)
|
||||
-- print("hook",self:GetName(), ...)
|
||||
-- print(AuctionHouseFrame.CommoditiesSellFrame.ItemDisplay.ItemButton:GetItemLocation())
|
||||
-- print(AuctionHouseFrame.ItemSellFrame.ItemDisplay.ItemButton:GetItemLocation())
|
||||
if(C_AuctionHouse.GetItemCommodityStatus(il) and prices[bid]) then
|
||||
-- print("Price", prices[bid])
|
||||
else
|
||||
local lvl = C_Item.GetCurrentItemLevel(il)
|
||||
-- print(lvl)
|
||||
-- print("Price",pricesIlvl[bid][lvl])
|
||||
if(lvl and pricesIlvl[bid][lvl]) then
|
||||
AuctionHouseFrame.ItemSellFrame.PriceInput:SetAmount(pricesIlvl[bid][lvl])
|
||||
if(bid) then
|
||||
-- print("hook",self:GetName(), ...)
|
||||
-- print(AuctionHouseFrame.CommoditiesSellFrame.ItemDisplay.ItemButton:GetItemLocation())
|
||||
-- print(AuctionHouseFrame.ItemSellFrame.ItemDisplay.ItemButton:GetItemLocation())
|
||||
if(C_AuctionHouse.GetItemCommodityStatus(il) and prices[bid]) then
|
||||
-- print("Price", prices[bid])
|
||||
else
|
||||
local lvl = C_Item.GetCurrentItemLevel(il)
|
||||
-- print(lvl)
|
||||
-- print("Price",pricesIlvl[bid][lvl])
|
||||
if(lvl and pricesIlvl[bid] and pricesIlvl[bid][lvl]) then
|
||||
AuctionHouseFrame.ItemSellFrame.PriceInput:SetAmount(pricesIlvl[bid][lvl])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue