fix error

This commit is contained in:
Bunny67
2018-07-18 17:52:00 +03:00
parent ad88970195
commit 333f08d479
+6 -3
View File
@@ -32,10 +32,13 @@ local AVD_DECAY_RATE = 0.2
local function IsWearingShield()
local slotID = GetInventorySlotInfo("SecondaryHandSlot")
local _, _, itemID = find(GetInventoryItemLink("player", slotID), "(%d+):")
local link = GetInventoryItemLink("player", slotID)
if link then
local _, _, itemID = find(link, "(%d+):")
if itemID then
return select(9, GetItemInfo(itemID))
if itemID then
return select(9, GetItemInfo(itemID))
end
end
end