Skip to content

Commit fd33688

Browse files
committed
Fix heirloom journal error
1 parent 0c78ab2 commit fd33688

File tree

3 files changed

+24
-129
lines changed

3 files changed

+24
-129
lines changed

!ClassColors.toc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
## X-CompatibleLocales: enUS, deDE, esES, esMX, frFR, itIT, koKR, ptBR, ruRU, zhCN, zhTW
1616
## X-Localizations: enUS, deDE, esES, esMX, ptBR, ruRU
1717
## X-Website: https://github.com/Phanx/ClassColors
18+
## X-Curse-Project-ID: classcolors
19+
## X-WoWI-ID: 12513
1820

1921
## SavedVariables: ClassColorsDB
2022

CHANGELOG.md

Lines changed: 4 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,7 @@
1-
### Version 7.0.3.0
2-
3-
* Updated for WoW 7.0 (Legion)
4-
5-
### Version 6.2.2.0
6-
7-
* Updated for WoW 6.2.2
8-
* Added coloring for heirloom journal class filter dropdown
9-
* Added coloring for loot recipients in the boss banner frame
10-
11-
### Version 6.0.3.24
12-
13-
* Fixed coloring on the character frame level text
14-
* Added a workaround for some addons passing invalid GUIDs to GetColoredName
15-
16-
### Version 6.0.3.23
17-
18-
* Updated for Warlords of Draenor
19-
20-
### Version 5.4.8.101
21-
22-
* Added Russian translations from Yafis
23-
24-
### Version 5.4.7.94
25-
26-
* Updated chat player name coloring for realm name changes in WoW 5.4.7
27-
28-
### Version 5.4.2.90
29-
30-
* Added a NotifyChanges method for addons that provide their own class color options UI, but not their own CUSTOM_CLASS_COLORS implementation, and want to propigate their changes to other addons through the CUSTOM_CLASS_COLORS system.
31-
* Added support for female-specific class names to the GetClassToken method, though I suspect nobody has ever actually used this method.
32-
33-
### Version 5.4.2.88
34-
35-
* Fixed an issue preventing player specialization names from appearing the inspect frame
36-
37-
### Version 5.4.1.87
38-
39-
* Fixed an error on the PTR caused by Blizzard fixing a typo in a function name
40-
41-
### Version 5.4.1.86
42-
43-
* Updated for WoW 5.4
44-
* Fixed coloring in the LFG cooldown list
45-
46-
### Version 5.3.0.83
47-
48-
* Updated for WoW 5.3
49-
* Fixed coloring in Challenge Mode best times tooltips
50-
51-
### Version 5.2.0.80
52-
53-
* Updated for WoW 5.2
54-
55-
### Version 5.1.0.78
1+
### Version 7.0.3.1
562

57-
* Updated for WoW 5.1
3+
- Fixed an error when opening or changing the class filter in the heirloom journal
584

59-
### Version 5.0.4.76
60-
61-
* Updated for WoW 5.0.4
62-
* Added better compatibility with other implementations of CUSTOM_CLASS_COLORS
63-
64-
### Version 4.3.4.56
65-
66-
* Raid and party member blips on the world map will now be recolored using your custom colors.
67-
* *Due to Blizzard restrictions, it is **not** possible to recolor blips on the minimap.*
68-
* Added Português (ptBR) localization.
69-
70-
### Version 4.2.0.51
71-
72-
* Updated for WoW 4.2
73-
74-
### Version 4.1.0.49
75-
76-
* Updated for WoW 4.1
77-
* Removed the IterateClasses metamethod since nobody uses it
78-
* Changed the GetColoredName override to more closely emulate the original Blizzard function, as requested by Funkydude on WowAce
79-
80-
### Version 4.0.3.43
81-
82-
* Fixed LFR browser and who list coloring
83-
84-
### Version 4.0.3.40
85-
86-
* Fixed raid panel coloring
87-
88-
### Version 4.0.1.36
89-
90-
* Someday I will remember to turn off debugging before posting a release...
91-
92-
### Version 4.0.1.35
93-
94-
* Updated Blizzard UI coloring for WoW 4.0
95-
96-
### Version 4.0.1.33
97-
98-
* Removed a function that no longer exists in WoW 4.0
99-
* Guild panel coloring hasn't been updated yet
100-
101-
### Version 3.3.3.29
102-
103-
* Player names in the raid panel will now always be colored correctly
104-
* Added additional checks to prevent GetPlayerInfoByGUID usage errors
105-
106-
### Version 3.3.0.26
107-
108-
* Added coloring of class names in the channel pane of the chat config window
109-
110-
### Version 3.3.0.24
111-
112-
* Added coloring of names in the LookingForRaid interface
113-
* Fixed drycode errors
114-
115-
### Version 3.3.0.22
5+
### Version 7.0.3.0
1166

117-
* Updated for WoW 3.3
118-
* Removed coloring for parts of the UI that aren't normally colored. This functionality may or may not reappear in a separate addon at a later date.
7+
- Updated for WoW 7.0 (Legion)

ClassColorsBlizz.lua

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -508,21 +508,25 @@ end
508508
-- Blizzard_HeirloomCollection.lua
509509

510510
addonFuncs["Blizzard_Collections"] = function()
511+
local NO_CLASS_FILTER = 0
512+
local NO_SPEC_FILTER = 0
513+
511514
function HeirloomsJournal:UpdateClassFilterDropDownText()
512-
local text
513-
if self.classFilter == 0 then -- NO_CLASS_FILTER
514-
text = ALL_CLASSES
515-
else
516-
local className, classTag = GetClassInfoByID(self.classFilter)
517-
local classColorStr = CUSTOM_CLASS_COLORS[classTag].colorStr -- CHANGED
518-
if self.specFilter == 0 then -- NO_SPEC_FILTER
519-
text = HEIRLOOMS_CLASS_FILTER_FORMAT:format(classColorStr, className)
520-
else
521-
local specName = GetSpecializationNameForSpecID(self.specFilter)
522-
text = HEIRLOOMS_CLASS_SPEC_FILTER_FORMAT:format(classColorStr, className, specName)
523-
end
524-
end
525-
UIDropDownMenu_SetText(self.classDropDown, text)
515+
local text;
516+
local classFilter, specFilter = C_Heirloom.GetClassAndSpecFilters()
517+
if classFilter == NO_CLASS_FILTER then
518+
text = ALL_CLASSES
519+
else
520+
local className, classTag = GetClassInfoByID(classFilter)
521+
local classColorStr = CUSTOM_CLASS_COLORS[classTag].colorStr
522+
if specFilter == NO_SPEC_FILTER then
523+
text = HEIRLOOMS_CLASS_FILTER_FORMAT:format(classColorStr, className)
524+
else
525+
local specName = GetSpecializationNameForSpecID(specFilter)
526+
text = HEIRLOOMS_CLASS_SPEC_FILTER_FORMAT:format(classColorStr, className, specName)
527+
end
528+
end
529+
UIDropDownMenu_SetText(self.classDropDown, text)
526530
end
527531
end
528532

0 commit comments

Comments
 (0)