From 374e4b3ddab1d621657aa7f492ca8070bcc1775b Mon Sep 17 00:00:00 2001 From: Pinya <800pin.ru@gmail.com> Date: Wed, 18 Jul 2018 15:13:50 +0300 Subject: [PATCH] update Datatext Avoidance --- ElvUI/Modules/DataTexts/Avoidance.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ElvUI/Modules/DataTexts/Avoidance.lua b/ElvUI/Modules/DataTexts/Avoidance.lua index 1c35717..5578b7b 100644 --- a/ElvUI/Modules/DataTexts/Avoidance.lua +++ b/ElvUI/Modules/DataTexts/Avoidance.lua @@ -3,9 +3,10 @@ local DT = E:GetModule("DataTexts"); --Cache global variables --Lua functions -local format, join = string.format, string.join +local find, format, join, match = string.find, string.format, string.join, string.match local abs = math.abs --WoW API / Variables +local GetInventoryItemLink = GetInventoryItemLink local GetInventorySlotInfo = GetInventorySlotInfo local GetItemInfo = GetItemInfo local UnitLevel = UnitLevel @@ -31,7 +32,7 @@ local AVD_DECAY_RATE = 0.2 local function IsWearingShield() local slotID = GetInventorySlotInfo("SecondaryHandSlot") - local itemID = nil + local _, _, itemID = find(GetInventoryItemLink("player", slotID), "(%d+):") if itemID then return select(9, GetItemInfo(itemID))