Skip to content

Commit

Permalink
2.0.83-Release
Browse files Browse the repository at this point in the history
  • Loading branch information
Goldpaw committed Nov 1, 2023
1 parent cdd1305 commit ec01930
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Bagnon_ItemLevel/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,17 @@ local Module = Bagnon:NewModule(Addon, Private)
local Cache = LibStub("LibItemCache-2.0")
local Container = LibStub("C_Everywhere").Container

-- Speed!
-- Lua API
local _G = _G
local ipairs = ipairs
local string_gsub = string.gsub
local string_match = string.match
local tonumber = tonumber

-- WoW API
local C_TooltipInfo, TooltipUtil = C_TooltipInfo, TooltipUtil
local CreateFrame, GetItemInfoInstant, GetItemQualityColor = CreateFrame, GetItemInfoInstant, GetItemQualityColor

local retail = Private.IsRetail
local cache = Private.cache
local tooltip = Private.tooltip
Expand All @@ -50,8 +55,8 @@ local battlepetclass = Enum.ItemClass.Battlepet
local font_object = NumberFont_Outline_Med or NumberFontNormal

-- Search patterns
local s_item_level = "^" .. string.gsub(ITEM_LEVEL, "%%d", "(%%d+)")
local s_num_slots = "^" .. (string.gsub(string.gsub(CONTAINER_SLOTS, "%%([%d%$]-)d", "(%%d+)"), "%%([%d%$]-)s", "%.+"))
local s_item_level = "^" .. string_gsub(ITEM_LEVEL, "%%d", "(%%d+)")
local s_num_slots = "^" .. (string_gsub(string_gsub(CONTAINER_SLOTS, "%%([%d%$]-)d", "(%%d+)"), "%%([%d%$]-)s", "%.+"))

-- Custom color cache
-- Allows us control, gives us speed.
Expand All @@ -75,6 +80,7 @@ end

Module:AddUpdater(function(self)

local db = BagnonItemLevel_DB
local message, color, _

if (self.hasItem) then
Expand All @@ -91,7 +97,7 @@ Module:AddUpdater(function(self)

-- We only want quality coloring on item- and pet levels, not bag slots.
if (isgear or ispet) then
if (BagnonItemLevel_DB.enableRarityColoring) then
if (db.enableRarityColoring) then
color = quality and colors[quality]
end
-- Update the bagnon cache
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ 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/).

## [2.0.83-Release] 2023-11-01
### Changed
- Some minor performance tweaks. Everything matters!

## [2.0.82-Release] 2023-10-22
### Fixed
- Fixed faulty embeds that may or may not have caused a startup error.
Expand Down

0 comments on commit ec01930

Please sign in to comment.