Add leave vehicle button. Change ilvl calc

This commit is contained in:
andrew6180
2023-06-21 00:26:27 -07:00
parent 2d5ce963c1
commit ffac1e4000
2 changed files with 32 additions and 4 deletions
@@ -816,13 +816,16 @@ local function GetAverageItemLevel()
-- same ilvl calculation as C_Player:GetAverageItemLevel()
for slot = INVSLOT_FIRST_EQUIPPED, INVSLOT_LAST_EQUIPPED do
if slot ~= INVSLOT_BODY and slot ~= INVSLOT_TABARD and slot ~= INVSLOT_RANGED and slot ~= INVSLOT_OFFHAND then
if slot ~= INVSLOT_BODY and slot ~= INVSLOT_TABARD then
local itemLink = GetInventoryItemLink("player", slot)
if itemLink then
local _, _, quality, itemLevel, _, _, _, _, itemEquipLoc = GetItemInfo(itemLink)
if itemLevel then
if slot == INVSLOT_RANGED or slot == INVSLOT_OFFHAND then
items = items + 1
end
ilvl = ilvl + itemLevel
colorCount = colorCount + 1