forked from nebularg/Parrot2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCombatStatus.lua
55 lines (50 loc) · 1.11 KB
/
CombatStatus.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 _, ns = ...
local Parrot = ns.addon
local L = LibStub("AceLocale-3.0"):GetLocale("Parrot")
Parrot:RegisterCombatEvent{
category = "Notification",
subCategory = L["Combat status"],
name = "Enter combat",
localName = L["Enter combat"],
defaultTag = L["+Combat"],
events = {
PLAYER_REGEN_DISABLED = {},
},
color = "ffffff", -- white
}
Parrot:RegisterCombatEvent{
category = "Notification",
subCategory = L["Combat status"],
name = "Leave combat",
localName = L["Leave combat"],
defaultTag = L["-Combat"],
events = {
PLAYER_REGEN_ENABLED = {},
},
color = "ffffff", -- white
}
Parrot:RegisterPrimaryTriggerCondition{
name = "Enter combat",
localName = L["Enter combat"],
events = {
PLAYER_REGEN_DISABLED = true,
},
exclusive = true,
}
Parrot:RegisterPrimaryTriggerCondition{
name = "Leave combat",
localName = L["Leave combat"],
events = {
PLAYER_REGEN_ENABLED = true,
},
exclusive = true,
}
Parrot:RegisterSecondaryTriggerCondition{
name = "In combat",
localName = L["In combat"],
notLocalName = L["Not in combat"],
check = function()
return InCombatLockdown()
end,
exclusive = true,
}