# HG changeset patch # User yellowfive # Date 1534142177 25200 # Node ID 57be71eccc0ad398f1fd205e6138c305b4762524 # Parent 41cf09da376df9d5cf1afdbad83f00921d7fa5d6 Small azerite gear fix. diff -r 41cf09da376d -r 57be71eccc0a AskMrRobot-Serializer/AskMrRobot-Serializer.lua --- a/AskMrRobot-Serializer/AskMrRobot-Serializer.lua Wed Jul 25 12:17:38 2018 -0700 +++ b/AskMrRobot-Serializer/AskMrRobot-Serializer.lua Sun Aug 12 23:36:17 2018 -0700 @@ -1,6 +1,6 @@ -- AskMrRobot-Serializer will serialize and communicate character data between users. -local MAJOR, MINOR = "AskMrRobot-Serializer", 62 +local MAJOR, MINOR = "AskMrRobot-Serializer", 63 local Amr, oldminor = LibStub:NewLibrary(MAJOR, MINOR) if not Amr then return end -- already loaded by something else @@ -140,7 +140,9 @@ ["Nightborne"] = 14, ["HighmountainTauren"] = 15, ["VoidElf"] = 16, - ["LightforgedDraenei"] = 17 + ["LightforgedDraenei"] = 17, + ["DarkIronDwarf"] = 18, + ["MagharOrc"] = 19 } Amr.FactionIds = { @@ -253,12 +255,16 @@ return item end -function Amr.GetItemUniqueId(item, noUpgrade) +local AZERITE_EMPOWERED_BONUS_ID = 4775 + +function Amr.GetItemUniqueId(item, noUpgrade, noAzeriteEmpoweredBonusId) if not item then return "" end local ret = item.id .. "" if item.bonusIds then - for i = 1, #item.bonusIds do - ret = ret .. "b" .. item.bonusIds[i] + for i = 1, #item.bonusIds do + if not noAzeriteEmpoweredBonusId or item.bonusIds[i] ~= AZERITE_EMPOWERED_BONUS_ID then + ret = ret .. "b" .. item.bonusIds[i] + end end end if item.suffixId ~= 0 then diff -r 41cf09da376d -r 57be71eccc0a AskMrRobot.toc --- a/AskMrRobot.toc Wed Jul 25 12:17:38 2018 -0700 +++ b/AskMrRobot.toc Sun Aug 12 23:36:17 2018 -0700 @@ -1,7 +1,7 @@ ## Interface: 80000 ## Title: Ask Mr. Robot ## Author: Team Robot, Inc. -## Version: 62 +## Version: 63 ## Notes: Gear import/export, combat logging, and more. ## URL: www.askmrrobot.com ## SavedVariables: AskMrRobotDb4 diff -r 41cf09da376d -r 57be71eccc0a Gear.lua --- a/Gear.lua Wed Jul 25 12:17:38 2018 -0700 +++ b/Gear.lua Sun Aug 12 23:36:17 2018 -0700 @@ -18,7 +18,7 @@ end -- different versions of same item (id + bonus ids + suffix + drop level, constitutes a different physical drop) - if Amr.GetItemUniqueId(item1, true) ~= Amr.GetItemUniqueId(item2, true) then + if Amr.GetItemUniqueId(item1, true, true) ~= Amr.GetItemUniqueId(item2, true, true) then return 1000 end @@ -257,7 +257,7 @@ -- see if item is currently equipped, is false if don't have any item for that slot (e.g. OH for a 2-hander) local isEquipped = false - if equippedItem and optimalItem and Amr.GetItemUniqueId(equippedItem) == Amr.GetItemUniqueId(optimalItem) then + if equippedItem and optimalItem and Amr.GetItemUniqueId(equippedItem, false, true) == Amr.GetItemUniqueId(optimalItem, false, true) then isEquipped = true end @@ -328,7 +328,7 @@ local azt = optimalItem.azerite or {} for i,spellId in ipairs(azt) do if spellId and spellId ~= 0 then - local equippedAzt = equippedItem and equippedItem.azerite or {} + local equippedAzt = matchItem and matchItem.azerite or {} local isPowerActive = Amr.Contains(equippedAzt, spellId) local socketBorder, socketIcon = createSocketWidget(panelMods, prevSocket or lblItem, prevSocket, isPowerActive) @@ -366,7 +366,7 @@ -- enchant if optimalItem.enchantId and optimalItem.enchantId ~= 0 then local isEnchantEquipped = matchItem and matchItem.enchantId and matchItem.enchantId == optimalItem.enchantId - + local lblEnchant = AceGUI:Create("AmrUiLabel") panelMods:AddChild(lblEnchant) lblEnchant:SetPoint("TOPLEFT", lblItem.frame, "TOPRIGHT", 130, 0) diff -r 41cf09da376d -r 57be71eccc0a ui/Ui.lua --- a/ui/Ui.lua Wed Jul 25 12:17:38 2018 -0700 +++ b/ui/Ui.lua Sun Aug 12 23:36:17 2018 -0700 @@ -364,7 +364,7 @@ if not self:IsEnabled() then return end Amr:Hide() - Amr:HideLootWindow() + --Amr:HideLootWindow() Amr:HideShopWindow() Amr.db.profile.options.uiScale = 1 Amr.db.profile.window = {} @@ -389,8 +389,10 @@ obj:SetUserData("ttItemLink", itemLink) obj:SetCallback("OnEnter", function(widget) local tooltipLink = widget:GetUserData("ttItemLink") - GameTooltip:SetOwner(widget.frame, anchor and anchor or "ANCHOR_CURSOR", x, y) - GameTooltip:SetHyperlink(tooltipLink) + if tooltipLink then + GameTooltip:SetOwner(widget.frame, anchor and anchor or "ANCHOR_CURSOR", x, y) + GameTooltip:SetHyperlink(tooltipLink) + end end) obj:SetCallback("OnLeave", function(widget) GameTooltip:Hide() @@ -401,8 +403,10 @@ obj:SetUserData("ttSpellId", spellId) obj:SetCallback("OnEnter", function(widget) local ttSpellId = widget:GetUserData("ttSpellId") - GameTooltip:SetOwner(widget.frame, anchor and anchor or "ANCHOR_CURSOR", x, y) - GameTooltip:SetSpellByID(ttSpellId) + if ttSpellId then + GameTooltip:SetOwner(widget.frame, anchor and anchor or "ANCHOR_CURSOR", x, y) + GameTooltip:SetSpellByID(ttSpellId) + end end) obj:SetCallback("OnLeave", function(widget) GameTooltip:Hide()