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 diff --git a/Outfitter-Vanilla.toc b/Outfitter-Vanilla.toc new file mode 100644 index 0000000..2e8c901 --- /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/VanillaConversion.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 diff --git a/Outfitter.lua b/Outfitter.lua index 8b766ab..655e85c 100644 --- a/Outfitter.lua +++ b/Outfitter.lua @@ -7316,20 +7316,22 @@ 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 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 - SetTracking(vIndex, pEnabled == true or pEnabled == 1) + C_Minimap.SetTracking(vIndex, pEnabled == true or pEnabled == 1) end end 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 diff --git a/OutfitterScripting.lua b/OutfitterScripting.lua index 7bc877e..4a38f38 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 @@ -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