sell-junk: fallback to 0 value on unknown items

This commit is contained in:
shagu
2022-07-08 19:53:01 +02:00
parent e06b19acbd
commit c3e5cebc29
+1 -1
View File
@@ -85,7 +85,7 @@ module.enable = function(self)
-- get value
local _, icount = GetContainerItemInfo(bag, slot)
local _, _, id = string.find(GetContainerItemLink(bag, slot), "item:(%d+):%d+:%d+:%d+")
local price = ShaguTweaks.SellValueDB[tonumber(id)]
local price = ShaguTweaks.SellValueDB[tonumber(id)] or 0
if this.price then
this.price = this.price + ( price * ( icount or 1 ) )
this.count = this.count + 1