diff --git a/CaerdonItem.lua b/CaerdonItem.lua index 85341a3..d753267 100644 --- a/CaerdonItem.lua +++ b/CaerdonItem.lua @@ -375,7 +375,7 @@ function CaerdonItemMixin:GetCaerdonItemType() caerdonType = CaerdonItemType.Toy elseif isConduit then caerdonType = CaerdonItemType.Conduit - elseif linkType == "battlepet" then + elseif linkType == "battlepet" then caerdonType = CaerdonItemType.BattlePet elseif linkType == "quest" then caerdonType = CaerdonItemType.Quest @@ -415,12 +415,18 @@ function CaerdonItemMixin:GetCaerdonItemType() elseif typeID == Enum.ItemClass.Profession then caerdonType = CaerdonItemType.Profession else - print("Unknown item type " .. tostring(typeID) .. ", " .. tostring(linkType) .. " (unknown): " .. itemLink) + print("Caerdon: Unknown item type " .. tostring(typeID) .. ", " .. tostring(linkType) .. " (unknown): " .. itemLink) end + elseif linkType == "achievement" then + caerdonType = CaerdonItemType.Unhandled + elseif linkType == "journal" then + caerdonType = CaerdonItemType.Unhandled elseif linkType == "keystone" then + caerdonType = CaerdonItemType.Unhandled + elseif linkType == "spell" then caerdonType = CaerdonItemType.Unhandled else - print("Unknown type " .. tostring(typeID) .. ", " .. tostring(linkType) .. " (unknown): " .. itemLink) + print("Caerdon: Unknown type " .. tostring(typeID) .. ", " .. tostring(linkType) .. " (unknown): " .. itemLink) end self.caerdonItemType = caerdonType @@ -573,25 +579,25 @@ function CaerdonItemMixin:GetTooltipData(data) tooltipData.foundRedRequirements = true end elseif line.type == Enum.TooltipDataLineType.Blank then - -- elseif args.type == Enum.TooltipDataLineType.UnitName then + elseif line.type == Enum.TooltipDataLineType.UnitName then elseif line.type == Enum.TooltipDataLineType.GemSocket then elseif line.type == Enum.TooltipDataLineType.AzeriteEssenceSlot then - -- elseif line.type == Enum.TooltipDataLineType.AzeriteEssencePower then + elseif line.type == Enum.TooltipDataLineType.AzeriteEssencePower then -- elseif line.type == Enum.TooltipDataLineType.LearnableSpell then - -- elseif line.type == Enum.TooltipDataLineType.UnitThreat then - -- elseif line.type == Enum.TooltipDataLineType.QuestObjective then - -- elseif line.type == Enum.TooltipDataLineType.AzeriteItemPowerDescription then - -- elseif line.type == Enum.TooltipDataLineType.RuneforgeLegendaryPowerDescription then + elseif line.type == Enum.TooltipDataLineType.UnitThreat then + elseif line.type == Enum.TooltipDataLineType.QuestObjective then + elseif line.type == Enum.TooltipDataLineType.AzeriteItemPowerDescription then + elseif line.type == Enum.TooltipDataLineType.RuneforgeLegendaryPowerDescription then elseif line.type == Enum.TooltipDataLineType.SellPrice then elseif line.type == Enum.TooltipDataLineType.ProfessionCraftingQuality then - -- elseif line.type == Enum.TooltipDataLineType.SpellName then + elseif line.type == Enum.TooltipDataLineType.SpellName then elseif line.type == Enum.TooltipDataLineType.CurrencyTotal then - -- elseif line.type == Enum.TooltipDataLineType.UnitOwner then - -- elseif line.type == Enum.TooltipDataLineType.QuestTitle then - -- elseif line.type == Enum.TooltipDataLineType.QuestPlayer then + elseif line.type == Enum.TooltipDataLineType.UnitOwner then + elseif line.type == Enum.TooltipDataLineType.QuestTitle then + elseif line.type == Enum.TooltipDataLineType.QuestPlayer then elseif line.type == Enum.TooltipDataLineType.NestedBlock then else - print("TOOLTIP PROCESSING NEEDED: " .. self:GetItemLink() .. ", type: " .. tostring(line.type)) + print("Caerdon: TOOLTIP PROCESSING NEEDED: " .. self:GetItemLink() .. ", type: " .. tostring(line.type)) -- DevTools_Dump(line) end end @@ -854,7 +860,7 @@ function CaerdonItemMixin:GetCaerdonStatus(feature, locationInfo) -- TODO: Need if bindingResult.needsItem then local conduitInfo = itemData:GetConduitInfo() if conduitInfo.isUpgrade then - mogStatus = "upgrade" + mogStatus = "upgradeNonEquipment" else mogStatus = "own" end @@ -910,6 +916,12 @@ function CaerdonItemMixin:GetCaerdonStatus(feature, locationInfo) -- TODO: Need else mogStatus = "collected" end + elseif transmogInfo.isUpgrade then + if transmogInfo.hasMetRequirements then + mogStatus = "upgrade" + else + mogStatus = "upgradeLowSkill" + end else if transmogInfo.hasMetRequirements then mogStatus = "collected" @@ -918,6 +930,12 @@ function CaerdonItemMixin:GetCaerdonStatus(feature, locationInfo) -- TODO: Need -- mogStatus = "lowSkill" end end + elseif transmogInfo.isUpgrade then + if transmogInfo.hasMetRequirements then + mogStatus = "upgrade" + else + mogStatus = "upgradeLowSkill" + end else if not transmogInfo.hasMetRequirements then mogStatus = "lowSkill" diff --git a/CaerdonWardrobe.lua b/CaerdonWardrobe.lua index 019baee..6d8778c 100644 --- a/CaerdonWardrobe.lua +++ b/CaerdonWardrobe.lua @@ -232,7 +232,7 @@ function CaerdonWardrobeMixin:SetItemButtonStatus(originalButton, item, feature, button.isWaitingIcon = true end else - if status == "readyToCombine" or status == "own" or status == "ownPlus" or status == "otherSpec" or status == "otherSpecPlus" or status == "refundable" or status == "openable" or status == "locked" or status == "upgrade" or status == "readyToCombine" then + if status == "readyToCombine" or status == "own" or status == "ownPlus" or status == "otherSpec" or status == "otherSpecPlus" or status == "refundable" or status == "openable" or status == "locked" or status == "upgradeNonEquipment" or status == "readyToCombine" then showAnim = true if mogAnim and button.isWaitingIcon then @@ -333,10 +333,38 @@ function CaerdonWardrobeMixin:SetItemButtonStatus(originalButton, item, feature, -- mogStatus:SetTexture("Interface\\QUESTFRAME\\SkillUp-BG") -- mogStatus:SetTexture("Interface\\DialogFrame\\UI-Dialog-Icon-AlertNew") -- mogStatus:SetTexture("Interface\\Buttons\\JumpUpArrow") - elseif status == "upgrade" then + elseif status == "upgradeNonEquipment" then isProminent = false + iconBackgroundAdjustment = 4 + mogStatusBackground:SetTexCoord((512-46-31)/512, (512-31)/512, 5/512, (5+46)/512) + mogStatusBackground:SetTexture("Interface\\HUD\\UIUnitFrameBoss2x") + mogStatusBackground:SetVertexColor(0, 1, 1) + mogStatus:SetTexCoord(-1/32, 33/32, -1/32, 33/32) mogStatus:SetTexture("Interface\\Buttons\\JumpUpArrow") + elseif status == "upgrade" then + isProminent = false + if displayInfo and displayInfo.upgradeIcon.shouldShow then + iconBackgroundAdjustment = 4 + mogStatusBackground:SetTexCoord((512-46-31)/512, (512-31)/512, 5/512, (5+46)/512) + mogStatusBackground:SetTexture("Interface\\HUD\\UIUnitFrameBoss2x") + mogStatusBackground:SetVertexColor(0, 1, 1) + + mogStatus:SetTexCoord(-1/32, 33/32, -1/32, 33/32) + mogStatus:SetTexture("Interface\\Buttons\\JumpUpArrow") + end + elseif status == "upgradeLowSkill" then + isProminent = false + if displayInfo and displayInfo.upgradeIcon.shouldShow then + iconBackgroundAdjustment = 4 + mogStatusBackground:SetTexCoord((512-46-31)/512, (512-31)/512, 5/512, (5+46)/512) + mogStatusBackground:SetTexture("Interface\\HUD\\UIUnitFrameBoss2x") + mogStatusBackground:SetVertexColor(0.4, 1, 0) + + mogStatus:SetTexCoord(-1/32, 33/32, -1/32, 33/32) + mogStatus:SetTexture("Interface\\Buttons\\JumpUpArrow") + mogStatus:SetVertexColor(0.4, 1, 0) + end elseif status == "locked" then isProminent = true mogStatus:SetTexCoord(16/64, 48/64, 16/64, 48/64) diff --git a/CaerdonWardrobe.toc b/CaerdonWardrobe.toc index b70a779..60325d8 100755 --- a/CaerdonWardrobe.toc +++ b/CaerdonWardrobe.toc @@ -5,9 +5,9 @@ ## Title: Caerdon Wardrobe ## Notes: Shows BOE / BOA, openable, and unlearned pets, toys, mounts and wardrobe indicator on bank / bag / auction / merchant / guild bank / loot frame / loot roll / encounter journal slots ## Author: Caerdon -## Version: v3.2.4 +## Version: v3.3.0 ## SavedVariables: CaerdonWardrobeConfig -## OptionalDeps: WagoAnalytics, WoWUnit, AdiBags, AngrierWorldQuests, ArkInventory, Bagnon, BaudBag, cargBags_Nivaya, Combuctor, ElvUI, Inventorian, KkthnxUI, Sorted, VenturePlan, WorldQuestsList, WorldQuestTab, WorldQuestTracker, ZygorGuidesViewer +## OptionalDeps: WagoAnalytics, WoWUnit, AdiBags, AngrierWorldQuests, ArkInventory, Bagnon, BaudBag, cargBags_Nivaya, Combuctor, ElvUI, Inventorian, KkthnxUI, Pawn, Sorted, VenturePlan, WorldQuestsList, WorldQuestTab, WorldQuestTracker, ZygorGuidesViewer libs\libs.xml libs\WagoAnalytics\Shim.lua diff --git a/FeatureMixin.lua b/FeatureMixin.lua index 14b5c76..6aa3567 100644 --- a/FeatureMixin.lua +++ b/FeatureMixin.lua @@ -32,11 +32,15 @@ end function CaerdonWardrobeFeatureMixin:GetDisplayInfoInternal(button, item, feature, locationInfo, options, mogStatus, bindingStatus) -- TODO: Temporary for merging - revisit after pushing everything into Mixins local showBindingStatus = not item:HasItemLocationBankOrBags() or CaerdonWardrobeConfig.Binding.ShowStatus.BankAndBags + local showUpgradeIcon = not item:HasItemLocationBankOrBags() or CaerdonWardrobeConfig.Icon.ShowUpgrades.BankAndBags local showOwnIcon = not item:HasItemLocationBankOrBags() or CaerdonWardrobeConfig.Icon.ShowLearnable.BankAndBags local showOtherIcon = not item:HasItemLocationBankOrBags() or CaerdonWardrobeConfig.Icon.ShowLearnableByOther.BankAndBags local showSellableIcon = not item:HasItemLocationBankOrBags() or CaerdonWardrobeConfig.Icon.ShowSellable.BankAndBags local displayInfo = { + upgradeIcon = { + shouldShow = showUpgradeIcon + }, bindingStatus = { shouldShow = showBindingStatus -- true }, diff --git a/config/BankAndBags.lua b/config/BankAndBags.lua index 4f4bc47..58d05c1 100644 --- a/config/BankAndBags.lua +++ b/config/BankAndBags.lua @@ -15,6 +15,7 @@ function CaerdonWardrobeConfigBankAndBagsMixin:Register() showLearnableByOther = { key = "showLearnableByOther", text = "Show items learnable for a different toon", tooltip = "Highlights items that can be learned and used for transmog but not by your current toon.", configSection="Icon", configSubsection="ShowLearnableByOther", configValue="BankAndBags" }, showSellable = { key = "showSellable", text = "Show items that can probably be sold", tooltip = "Highlights items that are bound to you but not usable and can probably be sold.", configSection="Icon", configSubsection="ShowSellable", configValue="BankAndBags" }, showBindingText = { key = "showBindingText", text = "Show binding text", tooltip = "Show binding text on items based on General configuration.", configSection="Binding", configSubsection="ShowStatus", configValue="BankAndBags" }, + shownPawnUpgrade = { key = "showPawnUpgrade", text = "Show if Pawn identifies as an upgrade", tooltip = "Show upgrade arrow on items (requires Pawn addon).", configSection="Icon", configSubsection="ShowUpgrades", configValue="BankAndBags" }, } self:ConfigureSection(self:GetTitle(), "BankAndBagsSection") @@ -23,6 +24,7 @@ function CaerdonWardrobeConfigBankAndBagsMixin:Register() self:ConfigureCheckboxNew(self.options["showLearnableByOther"]) self:ConfigureCheckboxNew(self.options["showSellable"]) self:ConfigureCheckboxNew(self.options["showBindingText"]) + self:ConfigureCheckboxNew(self.options["shownPawnUpgrade"]) end SettingsRegistrar:AddRegistrant(function () CaerdonWardrobeConfigBankAndBagsMixin:Register() end) \ No newline at end of file diff --git a/config/Config.lua b/config/Config.lua index 93c4997..9a8335b 100644 --- a/config/Config.lua +++ b/config/Config.lua @@ -65,7 +65,7 @@ end function NS:GetDefaultConfig() return { - Version = 21, + Version = 22, Debug = { Enabled = false @@ -84,6 +84,10 @@ function NS:GetDefaultConfig() SameLookDifferentLevel = true }, + ShowUpgrades = { + BankAndBags = true + }, + ShowLearnableByOther = { BankAndBags = true, GuildBank = true, diff --git a/features/Tooltip.lua b/features/Tooltip.lua index 801e4dd..5933113 100644 --- a/features/Tooltip.lua +++ b/features/Tooltip.lua @@ -264,6 +264,11 @@ function TooltipMixin:OnProcessInfo(tooltip, tooltipInfo) local itemLink = GetLootSlotLink(slot); local item = CaerdonItem:CreateFromItemLink(itemLink) Tooltip:ProcessTooltip(tooltip, item) + elseif tooltipInfo.getterName == "GetLootRollItem" then + local rollID = unpack(tooltipInfo.getterArgs) + local itemLink = GetLootRollItemLink(rollID) + local item = CaerdonItem:CreateFromItemLink(itemLink) + Tooltip:ProcessTooltip(tooltip, item) elseif tooltipInfo.getterName == "GetMerchantCostItem" then local slot, costIndex = unpack(tooltipInfo.getterArgs) local itemTexture, itemValue, itemLink, currencyName = GetMerchantItemCostItem(slot, costIndex); @@ -355,10 +360,11 @@ function TooltipMixin:OnProcessInfo(tooltip, tooltipInfo) local tooltipData = tooltip:GetTooltipData(); if tooltipData then if tooltipData.type == Enum.TooltipDataType.Item then - print("MISSING HANDLER FOR " .. tooltipInfo.getterName) + print("Caerdon: MISSING HANDLER FOR " .. tooltipInfo.getterName) local item = CaerdonItem:CreateFromItemID(tooltipData.id) Tooltip:ProcessTooltip(tooltip, item) elseif tooltipData.type == Enum.TooltipDataType.Achievement then + elseif tooltipData.type == Enum.TooltipDataType.EnhancedConduit then elseif tooltipData.type == Enum.TooltipDataType.EquipmentSet then elseif tooltipData.type == Enum.TooltipDataType.Spell then elseif tooltipData.type == Enum.TooltipDataType.Unit then @@ -369,7 +375,7 @@ function TooltipMixin:OnProcessInfo(tooltip, tooltipInfo) elseif tooltipData.type == Enum.TooltipDataType.MinimapMouseover then elseif tooltipData.type == Enum.TooltipDataType.QuestPartyProgress then else - print("MISSING HANDLER FOR " .. tooltipInfo.getterName .. ", type: " .. tostring(tooltipData.type)) + print("Caerdon: MISSING HANDLER FOR " .. tooltipInfo.getterName .. ", type: " .. tostring(tooltipData.type)) end end end @@ -378,8 +384,10 @@ end function TooltipMixin:OnEmbeddedItemTooltipSetItemByQuestReward(tooltip, questLogIndex, questID, rewardType, showCollectionText) rewardType = rewardType or "reward"; local itemLink = GetQuestLogItemLink(rewardType, questLogIndex, questID) - local item = CaerdonItem:CreateFromItemLink(itemLink) - Tooltip:ProcessTooltip(tooltip.Tooltip, item, true) + if itemLink then + local item = CaerdonItem:CreateFromItemLink(itemLink) + Tooltip:ProcessTooltip(tooltip.Tooltip, item, true) + end end -- function TooltipMixin:OnTooltipSetItem(tooltip) diff --git a/types/EquipmentMixin.lua b/types/EquipmentMixin.lua index 671c3b4..c76f30f 100644 --- a/types/EquipmentMixin.lua +++ b/types/EquipmentMixin.lua @@ -361,7 +361,14 @@ function CaerdonEquipmentMixin:GetTransmogInfo() end end + local isUpgrade = nil + + if PawnShouldItemLinkHaveUpgradeArrow then + isUpgrade = PawnShouldItemLinkHaveUpgradeArrow(item:GetItemLink(), false) + end + return { + isUpgrade = isUpgrade, isTransmog = isTransmog, isBindOnPickup = isBindOnPickup, appearanceID = appearanceID, diff --git a/types/QuestMixin.lua b/types/QuestMixin.lua index 0c5b7ee..aefdb25 100644 --- a/types/QuestMixin.lua +++ b/types/QuestMixin.lua @@ -20,6 +20,8 @@ function CaerdonQuestMixin:LoadQuestRewardData(callbackFunction) -- TODO: Temp... pulls out quality info to allow extract link to work - may need to consolidate and use elsewhere or figure out if there's a new way to parse. local tempLink = self.item:GetItemLink():gsub(" |A:.*|a]", "]") local linkType, linkOptions, name = LinkUtil.ExtractLink(tempLink); + if not linkOptions then return end + local questID = strsplit(":", linkOptions); local numQuestRewards