From 3d8099c801188d3dbe0e3b063d46511495aac105 Mon Sep 17 00:00:00 2001 From: Lars Norberg Date: Wed, 17 Jan 2024 17:09:17 +0100 Subject: [PATCH] 1.0.31-Release --- .../BlizzardBags_ItemLevel.toc | 2 +- BlizzardBags_ItemLevel/main.lua | 62 +++++++------------ CHANGELOG.md | 3 + 3 files changed, 28 insertions(+), 39 deletions(-) diff --git a/BlizzardBags_ItemLevel/BlizzardBags_ItemLevel.toc b/BlizzardBags_ItemLevel/BlizzardBags_ItemLevel.toc index ae4acb0..ebf1aa5 100644 --- a/BlizzardBags_ItemLevel/BlizzardBags_ItemLevel.toc +++ b/BlizzardBags_ItemLevel/BlizzardBags_ItemLevel.toc @@ -1,4 +1,4 @@ -## Interface: 100200 +## Interface: 100205 ## IconTexture: Interface\ICONS\Pet_Type_Mechanical ## Title: Bags: |cffffffffItemLevel|r diff --git a/BlizzardBags_ItemLevel/main.lua b/BlizzardBags_ItemLevel/main.lua index 941b637..a84a4c3 100644 --- a/BlizzardBags_ItemLevel/main.lua +++ b/BlizzardBags_ItemLevel/main.lua @@ -97,26 +97,19 @@ local Update = function(self, bag, slot) if (Private.IsRetail) then local tooltipData = C_TooltipInfo.GetBagItem(bag, slot) - - -- Assign data to 'type' and 'guid' fields. - TooltipUtil.SurfaceArgs(tooltipData) - - -- Assign data to 'leftText' fields. - for _, line in ipairs(tooltipData.lines) do - TooltipUtil.SurfaceArgs(line) - end - - for i = 3,4 do - local msg = tooltipData.lines[i] and tooltipData.lines[i].leftText - if (not msg) then break end - - local numslots = string_match(msg, S_SLOTS) - if (numslots) then - numslots = tonumber(numslots) - if (numslots > 0) then - message = numslots + if (tooltipData) then + for i = 3,4 do + local msg = tooltipData.lines[i] and tooltipData.lines[i].leftText + if (not msg) then break end + + local numslots = string_match(msg, S_SLOTS) + if (numslots) then + numslots = tonumber(numslots) + if (numslots > 0) then + message = numslots + end + break end - break end end @@ -150,26 +143,19 @@ local Update = function(self, bag, slot) if (Private.IsRetail) then local tooltipData = C_TooltipInfo.GetBagItem(bag, slot) - - -- Assign data to 'type' and 'guid' fields. - TooltipUtil.SurfaceArgs(tooltipData) - - -- Assign data to 'leftText' fields. - for _, line in ipairs(tooltipData.lines) do - TooltipUtil.SurfaceArgs(line) - end - - for i = 2,3 do - local msg = tooltipData.lines[i] and tooltipData.lines[i].leftText - if (not msg) then break end - - local itemlevel = string_match(msg, S_ILVL) - if (itemlevel) then - itemlevel = tonumber(itemlevel) - if (itemlevel > 0) then - tipLevel = itemlevel + if (tooltipData) then + for i = 2,3 do + local msg = tooltipData.lines[i] and tooltipData.lines[i].leftText + if (not msg) then break end + + local itemlevel = string_match(msg, S_ILVL) + if (itemlevel) then + itemlevel = tonumber(itemlevel) + if (itemlevel > 0) then + tipLevel = itemlevel + end + break end - break end end diff --git a/CHANGELOG.md b/CHANGELOG.md index 3513270..389ec6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.0.31-Release] 2024-01-17 +- Updated for WoW Client Patch 10.2.5. + ## [1.0.30-Release] 2023-11-17 - Updated for WoW Client Patch 1.15.0.