From 13a3d30a1829c2369ccded7003e82d13c8c162f3 Mon Sep 17 00:00:00 2001 From: govtgeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:05:36 -0800 Subject: [PATCH 1/7] Removed special vanilla libraries. Blizzard added enough of the functions to vanilla. --- Libraries/Vanilla-C_AddOns.lua | 4 ---- Libraries/Vanilla-C_Container.lua | 24 ------------------------ Libraries/Vanilla-C_Minimap.lua | 8 -------- 3 files changed, 36 deletions(-) delete mode 100644 Libraries/Vanilla-C_AddOns.lua delete mode 100644 Libraries/Vanilla-C_Container.lua delete mode 100644 Libraries/Vanilla-C_Minimap.lua diff --git a/Libraries/Vanilla-C_AddOns.lua b/Libraries/Vanilla-C_AddOns.lua deleted file mode 100644 index 3591ebf..0000000 --- a/Libraries/Vanilla-C_AddOns.lua +++ /dev/null @@ -1,4 +0,0 @@ -if C_AddOns == nil then - C_AddOns = {} - setmetatable(C_AddOns, {__index = function (t, funcname, args) return _G[funcname] end } ) -end \ No newline at end of file diff --git a/Libraries/Vanilla-C_Container.lua b/Libraries/Vanilla-C_Container.lua deleted file mode 100644 index 0ab45bf..0000000 --- a/Libraries/Vanilla-C_Container.lua +++ /dev/null @@ -1,24 +0,0 @@ -if C_Container == nil then - C_Container = {} - ----[[ - -- Create an autoload function that will try to call the global namespace - setmetatable(C_Container, {__index = function (t, funcname, args) return _G[funcname] end } ) - --]] - function C_Container.GetContainerItemInfo(bagIndex, slotIndex) - icon, itemCount, locked, quality, readable, lootable, itemLink, isFiltered, noValue, itemID, isBound = GetContainerItemInfo(bagIndex, slotIndex) - containerItemInfo = { - ["iconFileID"] = icon, - ["stackCount"] = itemCount, - ["isLocked"] = locked, - ["quality"] = quality, - ["isReadable"] = readable, - ["hasLoot"] = lootable, - ["hyperlink"] = itemLink, - ["isFiltered"] = isFiltered, - ["hasNoValue"] = noValue, - ["itemID"] = itemID, - ["isBound"] = isBound - }; - return containerItemInfo - end -end \ No newline at end of file diff --git a/Libraries/Vanilla-C_Minimap.lua b/Libraries/Vanilla-C_Minimap.lua deleted file mode 100644 index 3b8ef3a..0000000 --- a/Libraries/Vanilla-C_Minimap.lua +++ /dev/null @@ -1,8 +0,0 @@ -if C_Minimap == nil then - C_Minimap = {} - setmetatable(C_Minimap, {__index = function (t, funcname, args) return _G[funcname] end } ) - function C_Minimap.SetTracking(vIndex, pEnabled) - -- pEnabled was sometimes set to 1 instead of true. This forces true/false - return SetTracking(vIndex, pEnabled == true or pEnabled == 1) - end -end \ No newline at end of file From a99560ac731b750c812d202c5e8c4d4fb6e48901 Mon Sep 17 00:00:00 2001 From: govtgeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:06:15 -0800 Subject: [PATCH 2/7] No longer need a special toc for vanilla --- Outfitter_Vanilla.toc | 70 ------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 Outfitter_Vanilla.toc diff --git a/Outfitter_Vanilla.toc b/Outfitter_Vanilla.toc deleted file mode 100644 index 5f59270..0000000 --- a/Outfitter_Vanilla.toc +++ /dev/null @@ -1,70 +0,0 @@ -## Interface: 11504 -## Author: GovtGeek -## X-Original-Author: John Stephen -## X-Credits: Mundocani, Miv, Gogo, LemonDrake -## Title: Outfitter -## Version: 4.4.0.5 -## Notes: Clothing and weapon management and automated equipment changes -## OptionalDeps: -## RequiredDeps: -## SavedVariablesPerCharacter: gOutfitter_Settings -## SavedVariables: gOutfitter_GlobalSettings -## X-ReloadTag: 2 -## X-Curse-Project-ID: -## X-Contributors: GovtGeek - -Libraries/UTF8/utf8data.lua -Libraries/UTF8/utf8.lua - -Libraries/LibStub.lua -Libraries/CallbackHandler-1.0.lua -Libraries/LibDataBroker-1.1.lua -Libraries/LibBabble-3.0.lua -Libraries/LibBabble-SubZone-3.0.lua -Libraries/LibBabble-Inventory-3.0.lua -Libraries/LibTipHooker-1.1.lua -Libraries/LibDropdown-1.0.lua - -OutfitterPrefix.lua - -Libraries/Vanilla-C_Container.lua -Libraries/Vanilla-C_Minimap.lua -Libraries/Vanilla-C_AddOns.lua - -Libraries/MC2AddonLib/MC2AddonLib.lua -Libraries/MC2DebugLib/MC2DebugLib.lua -Libraries/MC2SchedulerLib/MC2SchedulerLib.lua -Libraries/MC2EventLib/MC2EventLib.lua -Libraries/MC2UIElementsLib/MC2UIElementsLib.lua -Libraries/MC2ItemLinkLib/MC2ItemLinkLib.lua -Libraries/MC2TooltipLib/MC2TooltipLib.lua -Libraries/MC2ItemStatsLib/MC2ItemStatsLib.lua - -OutfitterStrings.lua -OutfitterStrings_Vanilla.lua -OutfitterStrings_de.lua -OutfitterStrings_fr.lua -OutfitterStrings_cn.lua -OutfitterStrings_tw.lua -OutfitterStrings_kr.lua -OutfitterStrings_ru.lua - -Outfitter.lua - -OutfitterOutfits.lua -OutfitterInventory.lua -OutfitterEquipment.lua -OutfitterItemStats.lua -OutfitterOptimize.lua -OutfitterUITools.lua -OutfitterScripting.lua -OutfitterScriptDialog.lua -#OutfitterQuickSlots.lua -OutfitterMinimapButton.lua -OutfitterBar.lua -OutfitterAbout.lua - -OutfitterLDB.lua - -Outfitter.xml -OutfitterBar.xml From 9fadb584807d8dc94ce60a1e0828a3aa38166822 Mon Sep 17 00:00:00 2001 From: govtgeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:06:42 -0800 Subject: [PATCH 3/7] Updated version and curse id --- Outfitter_Mainline.toc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Outfitter_Mainline.toc b/Outfitter_Mainline.toc index d6108e0..d48ad88 100644 --- a/Outfitter_Mainline.toc +++ b/Outfitter_Mainline.toc @@ -3,7 +3,7 @@ ## X-Original-Author: John Stephen ## X-Credits: Mundocani, Miv, Gogo, LemonDrake ## Title: Outfitter -## Version: 4.4.0.5 +## Version: 4.4.1.1 ## Notes: Clothing and weapon management and automated equipment changes ## AddonCompartmentFunc: Outfitter_OnAddonCompartmentClick #### AddonCompartmentFuncOnEnter: @@ -14,7 +14,7 @@ ## SavedVariablesPerCharacter: gOutfitter_Settings ## SavedVariables: gOutfitter_GlobalSettings ## X-ReloadTag: 2 -## X-Curse-Project-ID: +## X-Curse-Project-ID: 1011204 Libraries/UTF8/utf8data.lua Libraries/UTF8/utf8.lua From d913aae2009aac0d49421d886e1dc4af1eba31a1 Mon Sep 17 00:00:00 2001 From: govtgeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:07:22 -0800 Subject: [PATCH 4/7] Updated WoW version for classic and bumped Outfitter version --- Outfitter.toc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Outfitter.toc b/Outfitter.toc index 7e3f7dc..f49e5f3 100644 --- a/Outfitter.toc +++ b/Outfitter.toc @@ -1,17 +1,16 @@ -## Interface: 40401, 30403, 20504, 11504 - +## Interface: 40401, 30403, 20504, 11505 ## Author: GovtGeek ## X-Original-Author: John Stephen ## X-Credits: Mundocani, Miv, Gogo, LemonDrake ## Title: Outfitter -## Version: 4.4.1 +## Version: 4.4.1.1 ## Notes: Clothing and weapon management and automated equipment changes ## OptionalDeps: ## RequiredDeps: ## SavedVariablesPerCharacter: gOutfitter_Settings ## SavedVariables: gOutfitter_GlobalSettings ## X-ReloadTag: 2 -## X-Curse-Project-ID: +## X-Curse-Project-ID: 1011204 Libraries/UTF8/utf8data.lua Libraries/UTF8/utf8.lua From 598d9ad601745cbfacf58a5442f6d58131db4d27 Mon Sep 17 00:00:00 2001 From: govtgeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:08:08 -0800 Subject: [PATCH 5/7] Reworked button adjustment code for vanilla/anniversary --- Outfitter.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Outfitter.lua b/Outfitter.lua index 5e18554..fe3b52e 100644 --- a/Outfitter.lua +++ b/Outfitter.lua @@ -1218,6 +1218,13 @@ for vIndex, vSlotName in ipairs(Outfitter.cSlotNames) do Outfitter.cSlotOrder[vSlotName] = vIndex end function Outfitter:OutfitterButtonAdjust() + if Outfitter:IsClassicEra() then + OutfitterButton:SetPoint("TOPRIGHT", PaperDollFrame, "TOPRIGHT", -28, -40) + end + if C_Seasons and C_Seasons.HasActiveSeason() and (C_Seasons.GetActiveSeason() == Enum.SeasonID.SeasonOfDiscovery) then + OutfitterButton:ClearAllPoints() + OutfitterButton:SetPoint("BOTTOMRIGHT", RuneFrameControlButton, "BOTTOMLEFT", 10, -4) + end if not Outfitter:IsClassicCataclysm() then --[[-- TODO? Use this for all adjustments - remove the EquipmentManagerAdjust if cvar == "equipmentManager" and value == "1" then -- cvar values are strings @@ -1239,10 +1246,6 @@ function Outfitter:OutfitterButtonAdjust() OutfitterFrame:SetPoint("TOPLEFT", PaperDollFrame, "TOPRIGHT", -34, -48) end --]]-- - if RuneFrameControlButton ~= nil then - OutfitterButton:ClearAllPoints() - OutfitterButton:SetPoint("BOTTOMRIGHT", RuneFrameControlButton, "BOTTOMLEFT", 10, -4) - end else OutfitterButton:SetPoint("TOPRIGHT", PaperDollFrame, "TOPRIGHT", 4, -28) end @@ -5209,10 +5212,11 @@ function Outfitter:Initialize() -- Season of Discovery handling if C_Seasons and C_Seasons.HasActiveSeason() and (C_Seasons.GetActiveSeason() == Enum.SeasonID.SeasonOfDiscovery) then self.EventLib:RegisterEvent("ENGRAVING_MODE_CHANGED", self.EngravingModeChanged, self) - Outfitter:OutfitterButtonAdjust() end - -- + -- Move the Outfitter button according to the version we're running + Outfitter:OutfitterButtonAdjust() + self:DispatchOutfitEvent("OUTFITTER_INIT") self.SchedulerLib:ScheduleUniqueRepeatingTask(0.5, self.UpdateSwimming, self, nil, "Outfitter:UpdateSwimming") From 2f10abc0a6e15621d9c501a4a54b962ec628029b Mon Sep 17 00:00:00 2001 From: govtgeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:36:30 -0800 Subject: [PATCH 6/7] Fixed IsAddOnLoaded to use proper C_AddOns call --- OutfitterItemStats.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OutfitterItemStats.lua b/OutfitterItemStats.lua index 678f62b..0f429b5 100644 --- a/OutfitterItemStats.lua +++ b/OutfitterItemStats.lua @@ -492,7 +492,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) @@ -564,7 +564,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) From 1efde7f378316919bf31d0d1313e5b031e66687b Mon Sep 17 00:00:00 2001 From: govtgeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 25 Nov 2024 20:37:30 -0800 Subject: [PATCH 7/7] Fixed a buff check to use C_UnitAuras --- Outfitter.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Outfitter.lua b/Outfitter.lua index fe3b52e..21c316d 100644 --- a/Outfitter.lua +++ b/Outfitter.lua @@ -4379,7 +4379,12 @@ function Outfitter:GetPlayerAuraStates() end while true do - local vName, vTexture, _, _, _, _, _, _, _, vSpellID = UnitBuff("player", vBuffIndex) + --local vName, vTexture, _, _, _, _, _, _, _, vSpellID = UnitBuff("player", vBuffIndex) + local auraInfo = C_UnitAuras.GetBuffDataByIndex("player", vBuffIndex) + local vName, vTexture, vSpellID + if auraInfo then + vName, vTexture, vSpellID = auraInfo.name, auraInfo.icon, auraInfo.spellId + end if not vName then return self.AuraStates