Skip to content

Commit

Permalink
Add coloring to boss banner and heirloom journal
Browse files Browse the repository at this point in the history
  • Loading branch information
Phanx committed Nov 5, 2015
1 parent efdc79c commit c136c2d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
2 changes: 1 addition & 1 deletion !ClassColors.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 60000
## Interface: 60200
## Version: @project-version@

## Title: Class Colors
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### Version 6.2.2.0

* Updated for WoW 6.2.2
* Added coloring for heirloom journal class filter dropdown
* Added coloring for loot recipients in the boss banner frame

### Version 6.0.3.24

* Fixed coloring on the character frame level text
Expand Down
44 changes: 39 additions & 5 deletions ClassColorsBlizz.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ end

function GetColoredName(event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12)
local chatType = strsub(event, 10)
if strsub(chatType, 1, 17) == "WHISPER" then
if strsub(chatType, 1, 7) == "WHISPER" then
chatType = "WHISPER"
elseif strsub(chatType, 1, 17) == "CHANNEL" then
elseif strsub(chatType, 1, 7) == "CHANNEL" then
chatType = "CHANNEL"..arg8
else
chatType = strsub(event, 10)
end
local info = ChatTypeInfo[chatType]

Expand All @@ -72,7 +70,7 @@ function GetColoredName(event, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, a
end

do
-- Lines 3188-3208
-- Lines 3220+
-- Fix class colors in raid roster listing
local AddMessage = {}

Expand Down Expand Up @@ -129,6 +127,14 @@ hooksecurefunc("WhoList_Update", function()
end
end)

------------------------------------------------------------------------
-- LevelUpDisplay.lua

hooksecurefunc("BossBanner_ConfigureLootFrame", function(lootFrame, data)
local color = CUSTOM_CLASS_COLORS[data.className]
lootFrame.PlayerName:SetTextColor(color.r, color.g, color.b)
end)

------------------------------------------------------------------------
-- LFDFrame.lua

Expand Down Expand Up @@ -498,6 +504,28 @@ addonFuncs["Blizzard_ChallengesUI"] = function()
end)
end

------------------------------------------------------------------------
-- Blizzard_HeirloomCollection.lua

addonFuncs["Blizzard_Collections"] = function()
function HeirloomsJournal:UpdateClassFilterDropDownText()
local text
if self.classFilter == 0 then -- NO_CLASS_FILTER
text = ALL_CLASSES
else
local className, classTag = GetClassInfoByID(self.classFilter)
local classColorStr = CUSTOM_CLASS_COLORS[classTag].colorStr -- CHANGED
if self.specFilter == 0 then -- NO_SPEC_FILTER
text = HEIRLOOMS_CLASS_FILTER_FORMAT:format(classColorStr, className)
else
local specName = GetSpecializationNameForSpecID(self.specFilter)
text = HEIRLOOMS_CLASS_SPEC_FILTER_FORMAT:format(classColorStr, className, specName)
end
end
UIDropDownMenu_SetText(self.classDropDown, text)
end
end

------------------------------------------------------------------------
-- Blizzard_GuildRoster.lua

Expand Down Expand Up @@ -618,6 +646,12 @@ addonFuncs["Blizzard_RaidUI"] = function()
end)
end

------------------------------------------------------------------------
-- Blizzard_StoreUISecure.lua

-- RAID_CLASS_COLORS is referenced several times in here, but it is
-- forbidden to addons, so there's nothing we can do about it.

------------------------------------------------------------------------
-- Blizzard_TradeSkillUI.lua

Expand Down

0 comments on commit c136c2d

Please sign in to comment.