Skip to content

Commit

Permalink
Use the artifact power counter to count the amount of Resonance Crystals
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Aug 26, 2024
1 parent 241a155 commit ccfc56b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
12 changes: 6 additions & 6 deletions WorldQuestTracker_Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4162,17 +4162,17 @@ WorldQuestTracker.OnToggleWorldMap = function(self)
resource_PetFrame.QuestType = WQT_QUESTTYPE_PETBATTLE

-- ~resources ~recursos
local resource_GoldIcon = DF:CreateImage(resource_GoldFrame, [[Interface\AddOns\WorldQuestTracker\media\icons_resourcesT]], 16, 16, "overlay", {64/128, 96/128, 0, .25})
local resource_GoldIcon = DF:CreateImage(resource_GoldFrame, [[Interface\AddOns\WorldQuestTracker\media\icons_resourcesT.png]], 16, 16, "overlay", {64/128, 96/128, 0, .25})
resource_GoldIcon:SetDrawLayer("overlay", 7)
resource_GoldIcon:SetAlpha(.78)
local resource_GoldText = DF:CreateLabel(resource_GoldFrame, "", ResourceFontTemplate)

local resource_ResourcesIcon = DF:CreateImage(resource_ResourcesFrame, [[Interface\AddOns\WorldQuestTracker\media\icons_resourcesT]], 16, 16, "overlay", {0, 32/128, 0, .25})
local resource_ResourcesIcon = DF:CreateImage(resource_ResourcesFrame, [[Interface\AddOns\WorldQuestTracker\media\icons_resourcesT.png]], 16, 16, "overlay", {0, 32/128, 0, .25})
resource_ResourcesIcon:SetDrawLayer("overlay", 7)
resource_ResourcesIcon:SetAlpha(.78)
local resource_ResourcesText = DF:CreateLabel(resource_ResourcesFrame, "", ResourceFontTemplate)

local resource_APowerIcon = DF:CreateImage(resource_APowerFrame, [[Interface\AddOns\WorldQuestTracker\media\icons_resourcesT]], 16, 16, "overlay", {32/128, 64/128, 0, .25})
local resource_APowerIcon = DF:CreateImage(resource_APowerFrame, [[Interface\AddOns\WorldQuestTracker\media\icons_resourcesT.png]], 16, 16, "overlay", {32/128, 64/128, 0, .25})
resource_APowerIcon:SetDrawLayer("overlay", 7)
resource_APowerIcon:SetAlpha(.78)
resource_APowerFrame.Icon = resource_APowerIcon
Expand All @@ -4185,13 +4185,13 @@ WorldQuestTracker.OnToggleWorldMap = function(self)

resource_APowerIcon:SetPoint("right", resource_APowerText, "left", -2, 0)

resource_ResourcesText:SetPoint("right", resource_APowerIcon, "left", -10, 0)
resource_ResourcesText:SetPoint("right", resource_APowerIcon, "left", -24, 0)
resource_ResourcesIcon:SetPoint("right", resource_ResourcesText, "left", -2, 0)

resource_GoldText:SetPoint("right", resource_ResourcesIcon, "left", -10, 0)
resource_GoldText:SetPoint("right", resource_ResourcesIcon, "left", -24, 0)
resource_GoldIcon:SetPoint("right", resource_GoldText, "left", -2, 0)

resource_PetText:SetPoint("right", resource_GoldIcon, "left", -2, 0)
resource_PetText:SetPoint("right", resource_GoldIcon, "left", -24, 0)
resource_PetIcon:SetPoint("right", resource_PetText, "left", -2, 0)

resource_PetText.text = 996
Expand Down
3 changes: 2 additions & 1 deletion WorldQuestTracker_IDs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,8 @@ WorldQuestTracker.MapData.IgnoredRewardTexures = {
}

WorldQuestTracker.MapData.QuestTypeIcons = {
[WQT_QUESTTYPE_APOWER] = {name = L["S_QUESTTYPE_ARTIFACTPOWER"], icon = [[Interface\AddOns\WorldQuestTracker\media\icon_artifactpower_red_roundT]], coords = {0, 1, 0, 1}},
--[WQT_QUESTTYPE_APOWER] = {name = L["S_QUESTTYPE_ARTIFACTPOWER"], icon = [[Interface\AddOns\WorldQuestTracker\media\icon_artifactpower_red_roundT]], coords = {0, 1, 0, 1}},
[WQT_QUESTTYPE_APOWER] = {name = L["S_QUESTTYPE_ARTIFACTPOWER"], icon = 2967113, coords = {0, 1, 0, 1}},
[WQT_QUESTTYPE_GOLD] = {name = L["S_QUESTTYPE_GOLD"], icon = [[Interface\GossipFrame\auctioneerGossipIcon]], coords = {0, 1, 0, 1}},
[WQT_QUESTTYPE_RESOURCE] = {name = L["S_QUESTTYPE_RESOURCE"], icon = [[Interface\AddOns\WorldQuestTracker\media\resource_iconT]], coords = {0, 1, 0, 1}},
[WQT_QUESTTYPE_EQUIPMENT] = {name = L["S_QUESTTYPE_EQUIPMENT"], icon = [[Interface\PaperDollInfoFrame\UI-EquipmentManager-Toggle]], coords = {0, 1, 0, 1}},
Expand Down
18 changes: 14 additions & 4 deletions WorldQuestTracker_MapAPI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -583,10 +583,20 @@ local ItemTooltipScan = CreateFrame ("GameTooltip", "WQTItemTooltipScan", UIPare
if (numQuestCurrencies == 1) then

--is artifact power? bfa
local name, texture, numItems, currencyId, quality = GetQuestLogRewardCurrencyInfo(1, questID)
if (texture == 1830317 or texture == 2065624) then --azerite textures
--numItems are now given the amount of azerite (BFA 17-09-2018), no more tooltip scan required
return name, texture, 0, 1, 1, false, 0, 8, numItems or 0, false, 1
do
local name, texture, numItems, currencyId, quality = GetQuestLogRewardCurrencyInfo(1, questID)
if (texture == 1830317 or texture == 2065624) then --azerite textures
--numItems are now given the amount of azerite (BFA 17-09-2018), no more tooltip scan required
return name, texture, 0, 1, 1, false, 0, 8, numItems or 0, false, 1
end
end

--is artifact power wow11
do
local name, texture, numItems, currencyId, quality = GetQuestLogRewardCurrencyInfo(1, questID)
if (texture == 2967113) then --resonance crystals
return name, texture, 0, 1, 1, false, 0, 8, numItems or 0, false, 1
end
end

--print("currency: ", name, texture, numItems, currencyId, quality)
Expand Down
Binary file removed media/icons_resourcesT.blp
Binary file not shown.

0 comments on commit ccfc56b

Please sign in to comment.