Skip to content

Commit dc05e82

Browse files
author
Freddie
committed
Show key shards with keys
1 parent d79863f commit dc05e82

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

Modules/Display.lua

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ local STATUS_ICON = {
7171
[2] = '|TInterface\\Addons\\ChoreTracker\\Assets\\status_2.tga:0|t',
7272
}
7373
local KEY_ICON = '|T4622270:0|t'
74+
local KEY_SHARD_ICON = '|T133016:0|t'
7475
local LIGHTNING_ICON = '|T136048:0|t'
7576

7677
function Module:OnEnable()
@@ -493,17 +494,29 @@ function Module:AddDelves(changed, newChildren, seenFrames)
493494
end
494495

495496
local keyCount = CCI_GetCurrencyInfo(3028).quantity
497+
local shardCount = CCI_GetCurrencyInfo(3310).quantity
496498

497499
if (completed < total or showCompletedSections) and
498-
(not onlyWithKeys or keyCount > 0)
500+
(not onlyWithKeys or keyCount > 0 or shardCount >= 100)
499501
then
500502
local prefix = self:GetPercentColor(completed, total)
501503

502504
local headerText = L['category:bountifulDelves']
505+
503506
if showKeys then
504-
local keyColor = self:GetPercentColor(keyCount, total - completed)
505-
headerText = headerText .. ' |cFF888888[|r' .. keyColor .. keyCount .. '|r ' .. KEY_ICON .. '|cFF888888]|r'
507+
local keyColor = self:GetPercentColor((keyCount * 100) + shardCount, (total - completed) * 100)
508+
509+
headerText = headerText .. ' |cFF888888[|r'
510+
511+
headerText = headerText .. keyColor .. keyCount .. '|r ' .. KEY_ICON
512+
513+
if shardCount > 0 then
514+
headerText = headerText .. ' ' .. keyColor .. shardCount .. '|r ' .. KEY_SHARD_ICON
515+
end
516+
517+
headerText = headerText .. '|cFF888888]|r'
506518
end
519+
507520
headerText = headerText .. ' - ' .. prefix .. completed .. '|r|cFF888888/|r' .. prefix ..
508521
total .. '|r'
509522

0 commit comments

Comments
 (0)