From 41d8d0d0eec7bb9e0f88ca134032626facc666c8 Mon Sep 17 00:00:00 2001 From: GovtGeek <26489473+GovtGeek@users.noreply.github.com> Date: Sun, 16 Apr 2023 23:13:02 -0700 Subject: [PATCH 01/10] Add files via upload --- Outfitter-Vanilla.toc | 66 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Outfitter-Vanilla.toc diff --git a/Outfitter-Vanilla.toc b/Outfitter-Vanilla.toc new file mode 100644 index 0000000..5019187 --- /dev/null +++ b/Outfitter-Vanilla.toc @@ -0,0 +1,66 @@ +## Interface: 11403 +## Author: Gogo, LemonDrake Updates: GovtGeek +## X-Credits: Mundocani, Miv +## Title: Outfitter +## Version: 3.0.4 +## Notes: Automate Gear Set Changes, and Build Gear Sets using Pawn Stat Weights +## OptionalDeps: +## RequiredDeps: +## SavedVariablesPerCharacter: gOutfitter_Settings +## SavedVariables: gOutfitter_GlobalSettings +## X-ReloadTag: 2 +## X-Curse-Project-ID: 356701 + +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/C_Container.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_de.lua +OutfitterStrings_fr.lua +OutfitterStrings_cn.lua +OutfitterStrings_tw.lua +OutfitterStrings_kr.lua +OutfitterStrings_ru.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 f1297a990d781fe06e3ff3ab7ee8c073c0b29f25 Mon Sep 17 00:00:00 2001 From: GovtGeek <26489473+GovtGeek@users.noreply.github.com> Date: Sun, 16 Apr 2023 23:14:12 -0700 Subject: [PATCH 02/10] Add files via upload --- Libraries/C_Container.lua | 44 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Libraries/C_Container.lua diff --git a/Libraries/C_Container.lua b/Libraries/C_Container.lua new file mode 100644 index 0000000..6bc42d8 --- /dev/null +++ b/Libraries/C_Container.lua @@ -0,0 +1,44 @@ +if C_Container == nil then + C_Container = {} + function C_Container.GetContainerItemLink(bagIndex, slotIndex) + return GetContainerItemLink(bagIndex, slotIndex) + end + function C_Container.GetContainerItemInfo(bagIndex, slotIndex) + return GetContainerItemInfo(bagIndex, slotIndex) + end + function C_Container.GetContainerNumSlots(vBagIndex) + return GetContainerNumSlots(vBagIndex) + end + function C_Container.GetContainerNumFreeSlots(vBagIndex) + return GetContainerNumFreeSlots(vBagIndex) + 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 + function C_Container.PickupContainerItem(containerIndex, slotIndex) + return PickupContainerItem(containerIndex, slotIndex) + end + function C_Container.ContainerIDToInventoryID(pBagIndex) + return ContainerIDToInventoryID(pBagIndex) + end + function C_Container.ShowContainerSellCursor(BagIndex, BagSlotIndex) + return ShowContainerSellCursor(BagIndex, BagSlotIndex) + end + function C_Container.UseContainerItem(BagIndex, BagSlotIndex) + return UseContainerItem(BagIndex, BagSlotIndex) + end +end From f87f7a1d371b4d7465f5b03e1995b3a4d3be380f Mon Sep 17 00:00:00 2001 From: GovtGeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 17 Apr 2023 10:16:52 -0700 Subject: [PATCH 03/10] Delete C_Container.lua --- Libraries/C_Container.lua | 44 --------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 Libraries/C_Container.lua diff --git a/Libraries/C_Container.lua b/Libraries/C_Container.lua deleted file mode 100644 index 6bc42d8..0000000 --- a/Libraries/C_Container.lua +++ /dev/null @@ -1,44 +0,0 @@ -if C_Container == nil then - C_Container = {} - function C_Container.GetContainerItemLink(bagIndex, slotIndex) - return GetContainerItemLink(bagIndex, slotIndex) - end - function C_Container.GetContainerItemInfo(bagIndex, slotIndex) - return GetContainerItemInfo(bagIndex, slotIndex) - end - function C_Container.GetContainerNumSlots(vBagIndex) - return GetContainerNumSlots(vBagIndex) - end - function C_Container.GetContainerNumFreeSlots(vBagIndex) - return GetContainerNumFreeSlots(vBagIndex) - 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 - function C_Container.PickupContainerItem(containerIndex, slotIndex) - return PickupContainerItem(containerIndex, slotIndex) - end - function C_Container.ContainerIDToInventoryID(pBagIndex) - return ContainerIDToInventoryID(pBagIndex) - end - function C_Container.ShowContainerSellCursor(BagIndex, BagSlotIndex) - return ShowContainerSellCursor(BagIndex, BagSlotIndex) - end - function C_Container.UseContainerItem(BagIndex, BagSlotIndex) - return UseContainerItem(BagIndex, BagSlotIndex) - end -end From 066a3d2145b5074021dfbaf8ae47d0a9b04cd35e Mon Sep 17 00:00:00 2001 From: GovtGeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 17 Apr 2023 10:17:13 -0700 Subject: [PATCH 04/10] Add files via upload --- Libraries/VanillaConversion.lua | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Libraries/VanillaConversion.lua diff --git a/Libraries/VanillaConversion.lua b/Libraries/VanillaConversion.lua new file mode 100644 index 0000000..275d47d --- /dev/null +++ b/Libraries/VanillaConversion.lua @@ -0,0 +1,58 @@ +if C_Container == nil then + C_Container = {} + function C_Container.GetContainerItemLink(bagIndex, slotIndex) + return GetContainerItemLink(bagIndex, slotIndex) + end + function C_Container.GetContainerItemInfo(bagIndex, slotIndex) + return GetContainerItemInfo(bagIndex, slotIndex) + end + function C_Container.GetContainerNumSlots(vBagIndex) + return GetContainerNumSlots(vBagIndex) + end + function C_Container.GetContainerNumFreeSlots(vBagIndex) + return GetContainerNumFreeSlots(vBagIndex) + 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 + function C_Container.PickupContainerItem(containerIndex, slotIndex) + return PickupContainerItem(containerIndex, slotIndex) + end + function C_Container.ContainerIDToInventoryID(pBagIndex) + return ContainerIDToInventoryID(pBagIndex) + end + function C_Container.ShowContainerSellCursor(BagIndex, BagSlotIndex) + return ShowContainerSellCursor(BagIndex, BagSlotIndex) + end + function C_Container.UseContainerItem(BagIndex, BagSlotIndex) + return UseContainerItem(BagIndex, BagSlotIndex) + end +end + +if C_Minimap == nil then + C_Minimap = {} + function C_Minimap.GetNumTrackingTypes() + return GetNumTrackingTypes() + end + function C_Minimap.GetTrackingInfo(vIndex) + return GetTrackingInfo(vIndex) + 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 748243368e6dea891be7ce4f3d30f8420e4f56f1 Mon Sep 17 00:00:00 2001 From: GovtGeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:02:33 -0700 Subject: [PATCH 05/10] Update Outfitter-Vanilla.toc --- Outfitter-Vanilla.toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Outfitter-Vanilla.toc b/Outfitter-Vanilla.toc index 5019187..2e8c901 100644 --- a/Outfitter-Vanilla.toc +++ b/Outfitter-Vanilla.toc @@ -25,7 +25,7 @@ Libraries/LibDropdown-1.0.lua OutfitterPrefix.lua -Libraries/C_Container.lua +Libraries/VanillaConversion.lua Libraries/MC2AddonLib/MC2AddonLib.lua Libraries/MC2DebugLib/MC2DebugLib.lua From 03ff509415bf450fd42c2acd10d0c27a2ecf1d08 Mon Sep 17 00:00:00 2001 From: GovtGeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:04:32 -0700 Subject: [PATCH 06/10] Update OutfitterScripting.lua --- OutfitterScripting.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OutfitterScripting.lua b/OutfitterScripting.lua index 7bc877e..bd77011 100644 --- a/OutfitterScripting.lua +++ b/OutfitterScripting.lua @@ -822,7 +822,7 @@ if event == "OUTFIT_EQUIPPED" then if setting.EnableFishTracking then setting.savedTracking = Outfitter:GetTrackingEnabled(133888) - Outfitter:SetTrackingEnabled(133888, 1) + Outfitter:SetTrackingEnabled(133888, true) setting.didSetTracking = true end From 90b38fc5679accca77c20e2cdde2d6410ceb4922 Mon Sep 17 00:00:00 2001 From: GovtGeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:07:21 -0700 Subject: [PATCH 07/10] Update OutfitterBar.lua --- OutfitterBar.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OutfitterBar.lua b/OutfitterBar.lua index e94ca6c..2eb1426 100644 --- a/OutfitterBar.lua +++ b/OutfitterBar.lua @@ -440,7 +440,7 @@ function Outfitter.OutfitBar:GetCursorTexture() local vItemLink = C_Container.GetContainerItemLink(vBagIndex, vBagSlotIndex) if vItemLink == vParam2 then - local itemInfo = C_Containeer.GetContainerItemInfo(vBagIndex, vBagSlotIndex) + local itemInfo = C_Container.GetContainerItemInfo(vBagIndex, vBagSlotIndex) local vTexture = itemInfo.iconFileID return vTexture @@ -1311,7 +1311,7 @@ function Outfitter.OutfitBar.TextureSets.Inventory:Activate() if vNumBagSlots > 0 then for vSlotIndex = 1, vNumBagSlots do - local itemInfo = C_Containeer.GetContainerItemInfo(vBagIndex, vBagSlotIndex) + local itemInfo = C_Container.GetContainerItemInfo(vBagIndex, vBagSlotIndex) local vTexture = itemInfo.iconFileID if vTexture and not vUsedTextures[vTexture] then From 82dfe6b08405021b0a2dd24525c3ccb9ba1f4fe6 Mon Sep 17 00:00:00 2001 From: GovtGeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:10:01 -0700 Subject: [PATCH 08/10] Update Outfitter.lua --- Outfitter.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Outfitter.lua b/Outfitter.lua index 8b766ab..7bb5610 100644 --- a/Outfitter.lua +++ b/Outfitter.lua @@ -7316,10 +7316,10 @@ function Outfitter:PlayerIsOnQuestID(pQuestID) end function Outfitter:GetTrackingEnabled(pTexture) - local vNumTypes = GetNumTrackingTypes() + local vNumTypes = C_Minimap.GetNumTrackingTypes() for vIndex = 1, vNumTypes do - local vName, vTexture, vActive = GetTrackingInfo(vIndex) + local vName, vTexture, vActive = C_Minimap.GetTrackingInfo(vIndex) if vTexture == pTexture then return vActive, vIndex end @@ -7329,7 +7329,7 @@ end function Outfitter:SetTrackingEnabled(pTexture, pEnabled) local vActive, vIndex = self:GetTrackingEnabled(pTexture) if vActive ~= pEnabled then - SetTracking(vIndex, pEnabled == true or pEnabled == 1) + C_Minimap.SetTracking(vIndex, pEnabled == true or pEnabled == 1) end end From 446f56b2321d20211b07c97bf1b7a70d02b1f438 Mon Sep 17 00:00:00 2001 From: GovtGeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:11:54 -0700 Subject: [PATCH 09/10] Update OutfitterScripting.lua --- OutfitterScripting.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OutfitterScripting.lua b/OutfitterScripting.lua index bd77011..4a38f38 100644 --- a/OutfitterScripting.lua +++ b/OutfitterScripting.lua @@ -1168,7 +1168,7 @@ end if select(1, ...) ~= "player" then return end -if UnitBuff("player", setting.buffName) then +if AuraUtil.FindAuraByName(setting.buffName, "player") then equip = true end From 4785b7cd0b25769df2508edba3fd75a1f52ef91d Mon Sep 17 00:00:00 2001 From: GovtGeek <26489473+GovtGeek@users.noreply.github.com> Date: Mon, 17 Apr 2023 14:14:50 -0700 Subject: [PATCH 10/10] Update Outfitter.lua --- Outfitter.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Outfitter.lua b/Outfitter.lua index 7bb5610..655e85c 100644 --- a/Outfitter.lua +++ b/Outfitter.lua @@ -7324,10 +7324,12 @@ function Outfitter:GetTrackingEnabled(pTexture) return vActive, vIndex end end + return false, 0 end function Outfitter:SetTrackingEnabled(pTexture, pEnabled) local vActive, vIndex = self:GetTrackingEnabled(pTexture) + if pEnabled == 1 then pEnabled = true else pEnabled = false end if vActive ~= pEnabled then C_Minimap.SetTracking(vIndex, pEnabled == true or pEnabled == 1) end