Skip to content

Commit

Permalink
Changes needed due to deprecated API calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
GurliGebis committed Aug 14, 2024
1 parent e277111 commit 863555d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.42.10

* Changes needed due to deprecated API calls.

## v0.42.9

* Updated TOC to match WoW 11.0.2
Expand Down
6 changes: 3 additions & 3 deletions Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ end

function Addon:RegisterAddOnLoaded(name, callback, func)
if func == nil then func = 0 end
if IsAddOnLoaded(name) then
if C_AddOns.IsAddOnLoaded(name) then
if func == 0 then
callback[name](callback)
else
Expand Down Expand Up @@ -133,6 +133,6 @@ function Addon:PLAYER_ENTERING_WORLD()
self:UnregisterEvent('PLAYER_ENTERING_WORLD', self)
end

Addon.Name = GetAddOnMetadata(ADDON, "Title")
Addon.Version = GetAddOnMetadata(ADDON, "X-Packaged-Version")
Addon.Name = C_AddOns.GetAddOnMetadata(ADDON, "Title")
Addon.Version = C_AddOns.GetAddOnMetadata(ADDON, "X-Packaged-Version")
_G[ADDON] = Addon
6 changes: 3 additions & 3 deletions Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function Data:QuestHasFaction(questID, factionID)
end

function Data:RewardIsUpgrade(itemID, questID)
local _, _, _, _, _, _, _, _, equipSlot, _, _ = GetItemInfo(itemID)
local _, _, _, _, _, _, _, _, equipSlot, _, _ = C_Item.GetItemInfo(itemID)
local ilvl = self:RewardItemLevel(itemID, questID)

if equipSlot and invtype_locations[equipSlot] then
Expand All @@ -56,7 +56,7 @@ function Data:RewardIsUpgrade(itemID, questID)
for _, slotID in ipairs(invtype_locations[equipSlot]) do
local currentItem = GetInventoryItemLink("player", slotID)
if currentItem then
local currentIlvl = select(4, GetItemInfo(currentItem))
local currentIlvl = select(4, C_Item.GetItemInfo(currentItem))
if not currentIlvl or ilvl >= (currentIlvl - Addon.Config.lootUpgradesLevel) then
isUpgrade = true
end
Expand All @@ -79,7 +79,7 @@ function Data:RewardItemLevel(itemID, questID)

-- local itemLink = select(2, fakeTooltip:GetItem())
if false and itemLink then
local itemName, _, _, itemLevel, _, _, _, _, itemEquipLoc, _, _, itemClassID, itemSubClassID = GetItemInfo(itemLink)
local itemName, _, _, itemLevel, _, _, _, _, itemEquipLoc, _, _, itemClassID, itemSubClassID = C_Item.GetItemInfo(itemLink)
if itemName then
if (itemClassID == 3 and itemSubClassID == 11) or (itemEquipLoc ~= nil and itemEquipLoc ~= "") then
cachedItems[key] = itemLevel
Expand Down
2 changes: 1 addition & 1 deletion QuestFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ local ANIMA_ITEM_COLOR = { r=.6, g=.8, b=1 }
local ANIMA_SPELLID = {[347555] = 3, [345706] = 5, [336327] = 35, [336456] = 250}

local function GetAnimaValue(itemID)
local _, spellID = GetItemSpell(itemID)
local _, spellID = C_Spell.GetItemSpell(itemID)
return ANIMA_SPELLID[spellID] or 1
end

Expand Down

0 comments on commit 863555d

Please sign in to comment.