Merge pull request #370 from Flamanis/Wrath-Out-Of-Range

Make sure unit is in range before CanInspect
This commit is contained in:
Tercio Jose
2022-10-27 21:56:17 -03:00
committed by GitHub
+2 -2
View File
@@ -1899,7 +1899,7 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
unitid = unitid [1]
end
if (unitid and CanInspect(unitid) and UnitPlayerControlled(unitid) and CheckInteractDistance(unitid, CONST_INSPECT_ACHIEVEMENT_DISTANCE)) then
if (unitid and UnitPlayerControlled(unitid) and CheckInteractDistance(unitid, CONST_INSPECT_ACHIEVEMENT_DISTANCE) and CanInspect(unitid)) then
--16 = all itens including main and off hand
local item_amount = 16
@@ -3196,4 +3196,4 @@ function CopyText(text) --[[GLOBAL]]
Details.CopyTextField.textField:SetText(text)
Details.CopyTextField.textField:HighlightText()
end)
end
end