- Fixed the item level calculation when the player is using a main hand and offhand artifact.

This commit is contained in:
Tercio
2016-09-22 16:17:00 -03:00
parent 40f91a8784
commit 4da2839aa7
3 changed files with 23 additions and 14 deletions
+5 -5
View File
File diff suppressed because one or more lines are too long
+8 -2
View File
@@ -1135,8 +1135,14 @@ function ilvl_core:CalcItemLevel (unitid, guid, shout)
if (equip_id == 17) then
local itemId = select (2, strsplit (":", item))
if (artifact_offhands [itemId]) then
item_amount = 15
break
local mainHand = GetInventoryItemLink (unitid, 16)
if (mainHand) then
local iName, _, itemRarity, mainHandILevel, _, _, _, _, equipSlot = GetItemInfo (mainHand)
if (iLevel) then
item = mainHand
iLevel = mainHandILevel
end
end
end
end
+10 -7
View File
@@ -1088,13 +1088,18 @@ function SlashCmdList.DETAILS (msg, editbox)
["137246"] = true, --warlock demo
["128289"] = true, --warrior prot
}
if (equip_id == 17) then
local itemId = select (2, strsplit (":", item))
if (artifact_offhands [itemId]) then
item_amount = 15
break
local mainHand = GetInventoryItemLink (unitid, 16)
if (mainHand) then
local iName, _, itemRarity, mainHandILevel, _, _, _, _, equipSlot = GetItemInfo (mainHand)
if (iLevel) then
item = mainHand
iLevel = mainHandILevel
end
end
end
end
@@ -1125,9 +1130,7 @@ function SlashCmdList.DETAILS (msg, editbox)
end
local average = item_level / item_amount
print (item_level, item_amount, "ilvl:", average)
print ("gear score:", item_level, "item amount:", item_amount, "ilvl:", average)
elseif (msg == "ilvl") then