Skip to content

Commit

Permalink
Merge pull request #38 from icbat/master
Browse files Browse the repository at this point in the history
Fixes reference to GetAddOnMetadata for 11.0.2
  • Loading branch information
Kiatra authored Aug 17, 2024
2 parents a0ee454 + 384ae96 commit 35da0f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local select, strjoin, CreateFrame = select, strjoin, CreateFrame

local _, _, _, tocversion = GetBuildInfo()

local addonVersion = GetAddOnMetadata("ChocolateBar", "Version")
local addonVersion = C_AddOns.GetAddOnMetadata("ChocolateBar", "Version")

ChocolateBar.Jostle = {}
ChocolateBar.Jostle2 = {}
Expand Down Expand Up @@ -278,7 +278,7 @@ end

function ChocolateBar:isNewInstall()
local lastversion = ChocolateBarDB.addonVersion or ""
return lastversion < GetAddOnMetadata("ChocolateBar", "Version") and true or false
return lastversion < C_AddOns.GetAddOnMetadata("ChocolateBar", "Version") and true or false
end

function ChocolateBar:ToggleOrderHallCommandBar()
Expand Down
6 changes: 3 additions & 3 deletions Options.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ local LSM = LibStub("LibSharedMedia-3.0")
local _G, pairs, string = _G, pairs, string
local db, moreChocolate
local index = 0
local version = GetAddOnMetadata("ChocolateBar","X-Curse-Packaged-Version") or ""
local version = C_AddOns.GetAddOnMetadata("ChocolateBar","X-Curse-Packaged-Version") or ""

local function GetStats(info)
local total = 0
Expand Down Expand Up @@ -1556,8 +1556,8 @@ function ChocolateBar:AddObjectOptions(name,obj)
if t ~= "data source" and t ~= "launcher" then
return
end
--local curse = GetAddOnMetadata(name,"X-Curse-Packaged-Version") or ""
--local version = GetAddOnMetadata(name,"Version") or ""
--local curse = C_AddOns.GetAddOnMetadata(name,"X-Curse-Packaged-Version") or ""
--local version = C_AddOns.GetAddOnMetadata(name,"Version") or ""

t = t or "not set"
local cleanName
Expand Down

0 comments on commit 35da0f8

Please sign in to comment.