skin: fix invalid index when using empty wdb dir

This commit is contained in:
shagu
2018-08-03 21:17:18 +02:00
parent 5554ebce0b
commit 4ca48fe559
+1 -1
View File
@@ -120,7 +120,7 @@ pfUI:RegisterSkin("Character", function ()
local _, _, itemID = string.find(GetInventoryItemLink("player", slotId), "item:(%d+):%d+:%d+:%d+")
local itemLevel = ShaguScore.Database[tonumber(itemID)] or 0
local _, _, itemRarity, _, _, _, _, itemSlot, _ = GetItemInfo(itemID)
local r,g,b = GetItemQualityColor(itemRarity)
local r,g,b = GetItemQualityColor((itemRarity or 1))
local score = ShaguScore:Calculate(itemSlot, itemRarity, itemLevel)
if score and score > 0 then
if quality and quality > 0 then