-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathHazzarah.lua
72 lines (58 loc) · 2.47 KB
/
Hazzarah.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
------------------------------
-- Are you local? --
------------------------------
local boss = AceLibrary("Babble-Boss-2.2")["Hazza'rah"]
local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss)
----------------------------
-- Localization --
----------------------------
L:RegisterTranslations("enUS", function() return {
cmd = "Hazzarah",
nightmaresummon_trigger = "Hazza\'rah casts Summon Nightmare Illusions\.",
nightmaresummon_message = "Kill the spawns!",
nightmaresummon_cmd = "spawns",
nightmaresummon_name = "Spawns alert",
nightmaresummon_desc = "Shows a warning when the boss summons Nightmare Illusions.",
} end )
L:RegisterTranslations("deDE", function() return {
cmd = "Hazzarah",
nightmaresummon_trigger = "Hazza\'rah wirkt Alptraumillusionen beschw\195\182ren\.",
nightmaresummon_message = "T\195\182tet die Adds!",
nightmaresummon_cmd = "spawns",
nightmaresummon_name = "Alarm f\195\188r die Adds",
nightmaresummon_desc = "Zeigt eine Warnung wenn der Boss Alptraumillusionen beschw\195\182rt.",
} end )
----------------------------------
-- Module Declaration --
----------------------------------
BigWigsHazzarah = BigWigs:NewModule(boss)
BigWigsHazzarah.zonename = AceLibrary("Babble-Zone-2.2")["Zul'Gurub"]
BigWigsHazzarah.enabletrigger = boss
BigWigsHazzarah.bossSync = "Hazza'rah"
BigWigsHazzarah.toggleoptions = {"nightmaresummon", "bosskill"}
BigWigsHazzarah.revision = tonumber(string.sub("$Revision: 11203 $", 12, -3))
------------------------------
-- Initialization --
------------------------------
function BigWigsHazzarah:OnEnable()
self.started = nil
self:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF")
self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
self:RegisterEvent("BigWigs_RecvSync")
self:TriggerEvent("BigWigs_ThrottleSync", "HazzarahIllusions", 5)
end
------------------------------
-- Events --
------------------------------
function BigWigsHazzarah:CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF(msg)
if msg == L["nightmaresummon_trigger"] then
self:TriggerEvent("BigWigs_SendSync", "HazzarahIllusions")
end
end
function BigWigsHazzarah:BigWigs_RecvSync(sync, rest, nick)
if not self.started and sync == "BossEngaged" and rest == self.bossSync then
self:StartFight()
elseif sync == "HazzarahIllusions" and self.db.profile.nightmaresummon then
self:TriggerEvent("BigWigs_Message", L["nightmaresummon_message"], "Important", true, "Alarm")
end
end