Skip to content

Commit

Permalink
Legion/Karazhan: Add win events to opera bosses, closes #57
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Jul 9, 2017
1 parent 6c596ab commit 19b0831
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Legion/Karazhan/OperaBeast.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ function mod:OnBossEnable()
self:Log("SPELL_CAST_START", "DinnerBell", 227987)
self:Log("SPELL_CAST_START", "KaraKazham", 232153)

self:RegisterEvent("BOSS_KILL")

self:Death("AddsKilled",
114329, -- Luminore
114522, -- Mrs. Cauldrons
Expand Down Expand Up @@ -109,11 +111,16 @@ function mod:AddsKilled(args)
addsKilled = addsKilled + 1
self:Message("stages", "Neutral", "Long", CL.mob_killed:format(args.destName, addsKilled, 3), false)

local mobId = self:MobId(args.destGUID)
if mobId == 114329 then -- Luminore
if args.mobId == 114329 then -- Luminore
self:StopBar(228025) -- Heat Wave
elseif mobId == 114522 then -- Mrs. Cauldrons
elseif args.mobId == 114522 then -- Mrs. Cauldrons
self:StopBar(228019) -- Leftovers
--elseif mobId == 114330 then -- Babblet
--elseif args.mobId == 114330 then -- Babblet
end
end

function mod:BOSS_KILL(_, id)
if id == 1957 then
self:Win()
end
end
8 changes: 8 additions & 0 deletions Legion/Karazhan/OperaWestfall.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "ThunderRitualApplied", 227777)
self:Log("SPELL_AURA_REMOVED", "ThunderRitualRemoved", 227777)
self:Log("SPELL_CAST_START", "WashAway", 227783)

self:RegisterEvent("BOSS_KILL")
end

function mod:OnEngage()
Expand Down Expand Up @@ -100,3 +102,9 @@ function mod:WashAway(args)
self:Message(args.spellId, "Urgent", "Info")
self:Bar(args.spellId, 23)
end

function mod:BOSS_KILL(_, id)
if id == 1957 then
self:Win()
end
end
8 changes: 8 additions & 0 deletions Legion/Karazhan/OperaWikket.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function mod:OnBossEnable()
self:Log("SPELL_CAST_SUCCESS", "WondrousRadiance", 227410)
self:Log("SPELL_CAST_START", "MagicMagnificent", 227776)
self:Log("SPELL_CAST_SUCCESS", "SummonAssistants", 227477)

self:RegisterEvent("BOSS_KILL")
end

function mod:OnEngage()
Expand Down Expand Up @@ -59,3 +61,9 @@ function mod:SummonAssistants(args)
self:Message(args.spellId, "Urgent", "Alert")
self:CDBar(args.spellId, 32.5)
end

function mod:BOSS_KILL(_, id)
if id == 1957 then
self:Win()
end
end

0 comments on commit 19b0831

Please sign in to comment.