forked from brendanblackwood/oUF_Hank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom_modifications.default.lua
55 lines (43 loc) · 1.52 KB
/
custom_modifications.default.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
local cfg = oUF_Hank_config
oUF_Hank_hooks = {}
--[[
Your custom modifications go here. Every function of the main addon can be hooked into.
Examples:
____________________________________________
Absolute health number for player frame
----------------------------------------------------------------------
oUF_Hank_hooks.PlayerHealth = {
sharedStyle = function(self, unit)
if unit == "player" then self:Tag(self.power, "[hpDetailed] || [ppDetailed]") end
end,
}
----------------------------------------------------------------------
Health-colored percentage
----------------------------------------------------------------------
oUF_Hank_hooks.HealthColored = {
UpdateHealth = function(self)
if self.unit == "player" and UnitHasVehicleUI("player") then
h, hMax = UnitHealth("pet"), UnitHealthMax("pet")
else
h, hMax = UnitHealth(self.unit), UnitHealthMax(self.unit)
end
if UnitIsConnected(self.unit) and not UnitIsGhost(self.unit) and not UnitIsDead(self.unit) then
for i = 1, 4 do
self.healthFill[5 - i]:SetVertexColor(1 - h / hMax, h / hMax, 0)
end
end
end,
}
----------------------------------------------------------------------
Suppress OmniCC
----------------------------------------------------------------------
oUF_Hank_hooks.NoOmniCC = {
PostCreateIcon = function(icons, icon)
icon.cd.noCooldownCount = true
end,
}
----------------------------------------------------------------------
}
]]
oUF_Hank_hooks.YOUR_MODIFICATION = {
}