From b9dac1f7e78ce313ef866a5626de5e5877b67bc1 Mon Sep 17 00:00:00 2001 From: Spit <19otari98@gmail.com> Date: Thu, 23 Jan 2025 14:22:15 +0300 Subject: [PATCH] aux support now tooltips show source inside aux addon also fixed bug that prevented some enchanting items to show source fixed bug with empty () drop chance showing --- AtlasLoot.toc | 2 +- Core/Tooltip.lua | 41 +++++++++++++++++++++++++++++++++++------ Sets/sets.lua | 4 ++-- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/AtlasLoot.toc b/AtlasLoot.toc index 2a7e38e..28dc05b 100644 --- a/AtlasLoot.toc +++ b/AtlasLoot.toc @@ -3,7 +3,7 @@ ## Notes: Shows possible loot from dungeon bosses and other sources. ## Author: Shagu (pfUI update code), Lexie (Turtle WoW fixes/updates), Otari (overhaul/revamp, menu changes, bugfixes/updates) ## LegacyAuthor: Daviesh, Pompa (Turtle WoW World Bosses), Xerron (Turtle WoW World Bosses), Gurky (Turtle WoW 1.16/1.16.1 Dungeons) -## Version: 3.0.6 +## Version: 3.0.7 ## SavedVariables: AtlasLoot_updateavailable ## SavedVariablesPerCharacter: AtlasLootCharDB ## OptionalDeps: Alphamap, AtlasLoader, LootLink, ItemSync, HewdropLib, Ace2, EquipCompare, EQCompare diff --git a/Core/Tooltip.lua b/Core/Tooltip.lua index 8c61b6d..49f2e70 100644 --- a/Core/Tooltip.lua +++ b/Core/Tooltip.lua @@ -185,6 +185,13 @@ function AtlasLootTip.extendTooltip(tooltip) for k,v in pairs(GetSpellInfoAtlasLootDB["craftspells"]) do if v["craftItem"] == itemID then craftSpell = "s"..tostring(k) + break + end + end + for k, v in pairs(GetSpellInfoAtlasLootDB["enchants"]) do + if v["item"] and v["item"] == itemID then + craftSpell = "e"..tostring(k) + break end end for k1, v1 in pairs(AtlasLoot_Data["AtlasLootCrafting"]) do @@ -192,7 +199,7 @@ function AtlasLootTip.extendTooltip(tooltip) break end for k2, v2 in pairs(AtlasLoot_Data["AtlasLootCrafting"][k1]) do - if v2[1] ~= 0 and v2[1] ~= "" and string.sub(v2[1], 1, 1) ~= "e" then + if v2[1] ~= 0 and v2[1] ~= "" --[[and string.sub(v2[1], 1, 1) ~= "e"]] then if (v2[1] == craftSpell or v2[1] == itemID) and (strfind(k1, "Apprentice", 1, true) or strfind(k1, "Journeyman", 1, true) or @@ -220,6 +227,19 @@ function AtlasLootTip.extendTooltip(tooltip) source = k1 isCraft = true lastDropRate = nil + -- if strfind(k1, "Apprentice", 1, true) then + -- dropRate = "1-75" + -- lastDropRate = dropRate + -- elseif strfind(k1, "Journeyman", 1, true) then + -- dropRate = "75-150" + -- lastDropRate = dropRate + -- elseif strfind(k1, "Expert", 1, true) then + -- dropRate = "150-225" + -- lastDropRate = dropRate + -- elseif strfind(k1, "Artisan", 1, true) then + -- dropRate = "225-300" + -- lastDropRate = dropRate + -- end break end end @@ -235,7 +255,7 @@ function AtlasLootTip.extendTooltip(tooltip) if v2[1] == itemID then source = k1 isWBLoot = true - if v2[5] then + if v2[5] and v2[5] ~= "" then dropRate = v2[5] lastDropRate = dropRate else @@ -273,7 +293,7 @@ function AtlasLootTip.extendTooltip(tooltip) if v2[1] == itemID then source = k1 isRepReward = true - if v2[5] then + if v2[5] and v2[5] ~= "" then dropRate = v2[5] lastDropRate = dropRate else @@ -292,7 +312,7 @@ function AtlasLootTip.extendTooltip(tooltip) if v2[1] == itemID then source = k1 isRepReward = true - if v2[5] and source ~= "Darkmoon" and not strfind(source, "Cenarion",1,true) then + if v2[5] and v2[5] ~= "" --[[and source ~= "Darkmoon" and not strfind(source, "Cenarion",1,true)]] then dropRate = v2[5] lastDropRate = dropRate else @@ -333,7 +353,7 @@ function AtlasLootTip.extendTooltip(tooltip) if v2[1] == itemID then source = k1 isWorldEvent = true - if v2[5] then + if v2[5] and v2[5] ~= "" then dropRate = v2[5] lastDropRate = dropRate else @@ -355,7 +375,7 @@ function AtlasLootTip.extendTooltip(tooltip) if k1 ~= "VanillaKeys" then source = k1 end - if v2[5] then + if v2[5] and v2[5] ~= "" then dropRate = v2[5] lastDropRate = dropRate else @@ -447,6 +467,15 @@ AtlasLootTip:SetScript("OnHide", function() end) AtlasLootTip:SetScript("OnShow", function() + if aux_frame and aux_frame:IsVisible() then + if GetMouseFocus():GetParent() then + if GetMouseFocus():GetParent().row then + if GetMouseFocus():GetParent().row.record.item_id then + GameTooltip.itemID = GetMouseFocus():GetParent().row.record.item_id + end + end + end + end AtlasLootTip.extendTooltip(GameTooltip) end) diff --git a/Sets/sets.lua b/Sets/sets.lua index 7fc0d0e..af064ff 100644 --- a/Sets/sets.lua +++ b/Sets/sets.lua @@ -2626,8 +2626,8 @@ AtlasLoot_Data["AtlasLootSetItems"] = { { 18563, "Spell_Ice_Lament", "=q5=Bindings of the Windseeker", "=ds=#m10# =q1=#m3#", " 3.78%" }, { 17782, "INV_Jewelry_Amulet_04", "=q5=Talisman of Binding Shard", "=ds=#s2#" }, { 0, "", "", "" }, - { 0, "", "", "" }, { 61184, "Inv_weapon_shortblade_23", "=q5=The Scythe of Elune", "=ds=#m2#", "0.85%" }, + { 55505, "Inv_weapon_shortblade_23", "=q5=The Scythe of Elune", "=ds=#s14#" }, { 0, "", "", "" }, { "e57518", "inv_misc_gem_pearl_04", "=q5=Eternal Dreamstone Shard", "=q1=Enchanting"}, { 0, "", "", "" }, @@ -2654,7 +2654,7 @@ AtlasLoot_Data["AtlasLootSetItems"] = { { 19872, "Ability_Mount_Raptor", "=q4=Armored Razzashi Raptor", "=ds=#e7#" }, { 19902, "Ability_Mount_JungleTiger", "=q4=Swift Zulian Tiger", "=ds=#e7#" }, { 13086, "Ability_Mount_PinkTiger", "=q4=Reins of the Winterspring Frostsaber", "=ds=#e7#" }, - { 23720, "Ability_Hunter_Pet_Turtle", "=q4=Riding Turtle", "=ds=#e7#" }, + { 23720, "Ability_Hunter_Pet_Turtle", "=q1=Swift Riding Turtle", "=ds=#e7#" }, { 0, "", "", "" }, { 21218, "INV_Misc_QirajiCrystal_04", "=q3=Blue Qiraji Resonating Crystal", "=ds=#e7#" }, { 21323, "INV_Misc_QirajiCrystal_03", "=q3=Green Qiraji Resonating Crystal", "=ds=#e7#" },