@@ -4,6 +4,8 @@ local S = E:GetModule('Skins')
4
4
local _G = _G
5
5
local next = next
6
6
7
+ local C_SpellBook_GetSpellBookItemInfo = C_SpellBook .GetSpellBookItemInfo
8
+
7
9
local function clearBackdrop (self )
8
10
self :SetBackdropColor (0 , 0 , 0 , 1 )
9
11
end
@@ -95,6 +97,44 @@ function S:Blizzard_ProfessionsBook()
95
97
S :HandleIcon (button .iconTexture , true )
96
98
end
97
99
end
100
+
101
+ -- Some Texture Magic
102
+ hooksecurefunc (' FormatProfession' , function (frame , id )
103
+ if not (id and frame and frame .icon ) then return end
104
+
105
+ local texture = select (2 , GetProfessionInfo (id ))
106
+ if texture then frame .icon :SetTexture (texture ) end
107
+ end )
108
+
109
+ -- FIX ME 11.0
110
+ hooksecurefunc (_G .ProfessionSpellButtonMixin , ' UpdateButton' , function (button )
111
+ local parent = button :GetParent ()
112
+ if not parent or not parent .spellOffset then return end
113
+
114
+ local activeSpellBank = Enum .SpellBookSpellBank .Player
115
+ local spellIndex = button :GetID () + parent .spellOffset
116
+ local spellBookItemInfo = C_SpellBook_GetSpellBookItemInfo (spellIndex , activeSpellBank )
117
+ if spellBookItemInfo .isPassive then
118
+ button .highlightTexture :SetColorTexture (1 , 1 , 1 , 0 )
119
+ else
120
+ button .highlightTexture :SetColorTexture (1 , 1 , 1 , .25 )
121
+ end
122
+
123
+ if E .private .skins .parchmentRemoverEnable then
124
+ if button .spellString then
125
+ button .spellString :SetTextColor (1 , 1 , 1 )
126
+ end
127
+ if button .subSpellString then
128
+ button .subSpellString :SetTextColor (1 , 1 , 1 )
129
+ end
130
+ if button .SpellName then
131
+ button .SpellName :SetTextColor (1 , 1 , 1 )
132
+ end
133
+ if button .SpellSubName then
134
+ button .SpellSubName :SetTextColor (1 , 1 , 1 )
135
+ end
136
+ end
137
+ end )
98
138
end
99
139
100
140
S :AddCallbackForAddon (' Blizzard_ProfessionsBook' )
0 commit comments