diff --git a/Outfitter.lua b/Outfitter.lua index 94cd0f2..596c3e4 100644 --- a/Outfitter.lua +++ b/Outfitter.lua @@ -3661,7 +3661,7 @@ function Outfitter:GetBagType(pBagIndex) return nil end - return GetItemFamily(vItemLink) + return C_Item.GetItemFamily(vItemLink) end function Outfitter:GetEmptyBagSlot(pStartBagIndex, pStartBagSlotIndex, pIncludeBank) @@ -4147,7 +4147,7 @@ function Outfitter:GetPlayerAuraStates() end while true do - local vName, _, vTexture, _, _, _, _, _, _, _, vSpellID = UnitBuff("player", vBuffIndex) + local vName, _, vTexture, _, _, _, _, _, _, _, vSpellID = C_UnitAuras.GetAuraDataByIndex("PLAYER", vBuffIndex) if not vName then return self.AuraStates @@ -4465,7 +4465,7 @@ function Outfitter:GetCurrentZoneIDs(pRecycleTable) vZoneSpecialIDMap = self.cZoneSpecialIDMap[GetRealZoneText()] end - local vPVPType, vIsArena, vFactionName = GetZonePVPInfo() + local vPVPType, vIsArena, vFactionName = C_PvP.GetZonePVPInfo() if vZoneSpecialIDMap then for _, vZoneSpecialID in ipairs(vZoneSpecialIDMap) do @@ -4656,7 +4656,7 @@ function Outfitter:Initialize() end -- Make sure they're not upgrading with a reloadui when there are new files - if tonumber(GetAddOnMetadata("Outfitter", "X-ReloadTag")) ~= 2 then + if tonumber(C_AddOns.GetAddOnMetadata("Outfitter", "X-ReloadTag")) ~= 2 then OutfitterMinimapButton:Hide() -- Remove access to Outfitter so more errors don't start coming up OutfitterButtonFrame:Hide() StaticPopup_Show("OUTFITTER_CANT_RELOADUI") @@ -7159,7 +7159,7 @@ function Outfitter:GenerateItemLink(pItem) return end - local _, _, vQuality = GetItemInfo(pItem.Code) + local _, _, vQuality = C_Item.GetItemInfo(pItem.Code) if pItem.Quality then vQuality = pItem.Quality end local _, _, _, vQualityColorCode = GetItemQualityColor(vQuality or 1) @@ -7307,7 +7307,7 @@ function Outfitter._ExtendedCompareTooltip:ShowCompareItem() vTooltipItemType, vTooltipItemSubType, vTooltipItemCount, - vTooltipItemInvType = GetItemInfo(vTooltipItemCodes[1]) + vTooltipItemInvType = C_Item.GetItemInfo(vTooltipItemCodes[1]) if not vTooltipItemInvType or vTooltipItemType ~= "Armor" then return diff --git a/Outfitter.toc b/Outfitter.toc index 6bc9522..d29e3b8 100644 --- a/Outfitter.toc +++ b/Outfitter.toc @@ -1,7 +1,7 @@ ## Interface: 100207 ## Author: John Stephen ## Title: Outfitter -## Version: 10.2.7.0 +## Version: 10.2.7.1 ## Notes: Clothing and weapon management and automated equipment changes ## OptionalDeps: ## RequiredDeps: diff --git a/OutfitterBar.lua b/OutfitterBar.lua index 58c1353..bd2d471 100644 --- a/OutfitterBar.lua +++ b/OutfitterBar.lua @@ -391,7 +391,7 @@ function Outfitter.OutfitBar:GetOutfitTexture(pOutfit) end if vOutfitItem then - local vTexture = GetItemIcon(vOutfitItem.Code) + local vTexture = C_Item.GetItemIconByID(vOutfitItem.Code) if vTexture then return vTexture diff --git a/OutfitterInventory.lua b/OutfitterInventory.lua index 922b048..01ce0a3 100644 --- a/OutfitterInventory.lua +++ b/OutfitterInventory.lua @@ -8,7 +8,7 @@ function Outfitter:FindNextCooldownItem(pItemCodes, pIgnoreSwapCooldown) for _, vItemCode in ipairs(pItemCodes) do if type(vItemCode) == "string" then - local vItemName, vItemLink = GetItemInfo(vItemCode) + local vItemName, vItemLink = C_Item.GetItemInfo(vItemCode) if vItemLink then vItemCode = self:ParseItemLink2(vItemLink)[1] @@ -101,7 +101,7 @@ function Outfitter:GetBagItemInvType(bagIndex, slotIndex) return end - local _, _, _, _, _, _, _, _, itemInvType = GetItemInfo(itemLink) + local _, _, _, _, _, _, _, _, itemInvType = C_Item.GetItemInfo(itemLink) return itemInvType end @@ -144,7 +144,7 @@ function Outfitter:GetBagItemBagType(pBagIndex, pSlotIndex) return end - return GetItemFamily(vItemCodes[1]) + return C_Item.GetItemFamily(vItemCodes[1]) end function Outfitter:GetSlotIDLinkInfo(pSlotID) @@ -158,7 +158,7 @@ function Outfitter:GetSlotIDItemBagType(pSlotID) return end - return GetItemFamily(vItemCodes[1]) + return C_Item.GetItemFamily(vItemCodes[1]) end function Outfitter:ParseItemLink2(pItemLink) @@ -248,7 +248,7 @@ function Outfitter._ItemInfo:GetItemInfoFromCode(itemCode) itemType, itemSubType, itemCount, - itemInvType = GetItemInfo(itemCode) + itemInvType = C_Item.GetItemInfo(itemCode) -- @@ -328,7 +328,7 @@ function Outfitter._ItemInfo:GetItemInfoFromLink(itemLink) local _, _, itemQuality, itemLevel, - itemMinLevel = GetItemInfo(itemLink) + itemMinLevel = C_Item.GetItemInfo(itemLink) self.Name = itemName self.Link = itemLink diff --git a/OutfitterItemStats.lua b/OutfitterItemStats.lua index 33cae23..cbad000 100644 --- a/OutfitterItemStats.lua +++ b/OutfitterItemStats.lua @@ -433,7 +433,7 @@ Outfitter._PawnScaleStatMetaTable = {__index = Outfitter._PawnScaleStat} -- Install Pawn scales ---------------------------------------- -if IsAddOnLoaded("Pawn") then +if C_AddOns.IsAddOnLoaded("Pawn") then table.insert(Outfitter.StatCategories, Outfitter.PawnScalesCategory) else Outfitter.EventLib:RegisterEvent("ADDON_LOADED", function (pEventID, pAddOnName) @@ -505,7 +505,7 @@ Outfitter._WeightsWatcherStatMetaTable = {__index = Outfitter._WeightsWatcherSta -- Install WeightsWatcher ---------------------------------------- -if IsAddOnLoaded("WeightsWatcher") then +if C_AddOns.IsAddOnLoaded("WeightsWatcher") then table.insert(Outfitter.StatCategories, Outfitter.WeightsWatcherCategory) else Outfitter.EventLib:RegisterEvent("ADDON_LOADED", function (pEventID, pAddOnName) @@ -595,7 +595,7 @@ end -- Install TankPoints ---------------------------------------- --[[ -if IsAddOnLoaded("TankPoints") then +if C_AddOns.IsAddOnLoaded("TankPoints") then table.insert(Outfitter.StatCategories, Outfitter.TankPointsCategory) else Outfitter.EventLib:RegisterEvent("ADDON_LOADED", function (pEventID, pAddOnName) diff --git a/OutfitterScripting.lua b/OutfitterScripting.lua index c2075cf..a58529a 100644 --- a/OutfitterScripting.lua +++ b/OutfitterScripting.lua @@ -1172,7 +1172,7 @@ end if select(1, ...) ~= "player" then return end -if UnitBuff("player", setting.buffName) then +if C_UnitAuras.GetAuraDataByIndex("PLAYER", setting.buffName) then equip = true end diff --git a/OutfitterStrings.lua b/OutfitterStrings.lua index cb4b5b7..70eb0c3 100644 --- a/OutfitterStrings.lua +++ b/OutfitterStrings.lua @@ -1,4 +1,4 @@ -Outfitter.cVersion = GetAddOnMetadata("Outfitter", "Version") +Outfitter.cVersion = C_AddOns.GetAddOnMetadata("Outfitter", "Version") Outfitter.cTitle = "Outfitter" Outfitter.cTitleVersion = Outfitter.cTitle.." "..Outfitter.cVersion