Skip to content

Commit

Permalink
kel: reworked event handling, removed unnecessary messages and bars a…
Browse files Browse the repository at this point in the history
…nd added audio warning to important events
  • Loading branch information
xorann committed Jul 3, 2018
1 parent 744ffcb commit daef088
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 141 deletions.
62 changes: 39 additions & 23 deletions Raids/Naxxramas/Kelthuzad/Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ local L = BigWigs.i18n[bossName]
module.revision = 20018 -- To be overridden by the module!
module.enabletrigger = module.translatedName -- string or table {boss, add1, add2}
--module.wipemobs = { L["add_name"] } -- adds which will be considered in CheckForEngage
module.toggleoptions = {"frostbolt", "frostboltbar", -1, "frostblast", "proximity", "fissure", "mc", "ktmreset", -1, "fbvolley", -1, "detonate", "detonateicon", -1 ,"guardians", -1, "addcount", "phase", "bosskill"}
module.toggleoptions = {"frostbolt", "frostboltbar", -1, "frostblast", "proximity", "fissure", "mc", "ktmreset", -1, "fbvolley", -1, "detonate", -1 ,"guardians", -1, "addcount", "phase", "bosskill"}

-- Proximity Plugin
module.proximityCheck = function(unit) return CheckInteractDistance(unit, 2) end
Expand Down Expand Up @@ -67,6 +67,7 @@ module.syncName = {
}
local syncName = module.syncName

local _, playerClass = UnitClass("player")

module.timeLastFrostboltVolley = 0 -- saves time of first frostbolt
module.numFrostboltVolleyHits = 0 -- counts the number of people hit by frostbolt
Expand All @@ -92,15 +93,15 @@ function module:BigWigs_RecvSync(sync, rest, nick)
elseif sync == syncName.frostblast then
self:FrostBlast()
elseif sync == syncName.detonate and rest then
self:Detonate()
self:Detonate(rest)
elseif sync == syncName.frostbolt then -- changed from only frostbolt (thats only alert, if someone still wants to see the bar, it wouldnt work then)
self:Frostbolt()
elseif sync == syncName.frostboltOver then
self:FrostboltOver()
elseif sync == syncName.frostboltVolley then
self:FrostboltVolley()
elseif sync == syncName.fissure then
self:Fissure()
elseif sync == syncName.fissure and rest then
self:Fissure(rest)
elseif sync == syncName.abomination and rest then
self:AbominationDies(rest)
elseif sync == syncName.soulWeaver and rest then
Expand Down Expand Up @@ -145,8 +146,10 @@ function module:Phase3()
end

function module:MindControl()
self:Message(L["msg_mindControl"], "Urgent", nil, "Beware")
self:Bar(L["bar_mindControl"], timer.mindcontrol, icon.mindcontrol, true, BigWigsColors.db.profile.mindControl)
if self.db.profile.mc then
self:Message(L["msg_mindControl"], "Urgent", nil, "Beware")
self:Bar(L["bar_mindControl"], timer.mindcontrol, icon.mindcontrol, true, BigWigsColors.db.profile.mindControl)
end

self:KTM_Reset()
end
Expand All @@ -159,27 +162,35 @@ function module:Guardians()
end

function module:FrostBlast()
self:Message(L["msg_frostblast"], "Attention")
if playerClass == "PRIEST" or playerClass == "DRUID" or playerClass == "SHAMAN" then
self:Message(L["msg_frostblast"], "Attention", true, "Alarm")
else
self:Message(L["msg_frostblast"], "Attention")
end
--self:DelayedMessage(timer.frostblast - 5, L["msg_frostblastSoon"])
self:Bar(L["bar_frostBlast"], timer.frostblast, icon.frostblast)
end

function module:Detonate(name)
if name and self.db.profile.detonate then
self:Message(string.format(L["msg_detonateNow"], name), "Attention")
if self.db.profile.detonateicon then
self:Icon(name, -1, timer.detonate)
if name == UnitName("player") then
self:Say(L["misc_say_detonate"]) -- verify
end
self:Bar(string.format(L["bar_detonateNow"], name), timer.detonate, icon.detonate)
self:Bar(L["bar_detonateNext"], timer.nextDetonate, icon.detonate)
--self:Bar(string.format(L["bar_detonateNow"], name), timer.detonate, icon.detonate) -- useful or rather distracting?
--self:Bar(L["bar_detonateNext"], timer.nextDetonate, icon.detonate) -- useful or rather rdistracting?
end
end

function module:Frostbolt()
if self.db.profile.frostbolt or self.db.profile.frostboltbar then
module.frostbolttime = GetTime()
if self.db.profile.frostbolt then
self:Message(L["msg_frostbolt"], "Personal")
if playerClass == "WARRIOR" or playerClass == "ROGUE" then
self:Message(L["msg_frostbolt"], "Personal", true, "Alarm")
else
self:Message(L["msg_frostbolt"], "Personal")
end
end
if self.db.profile.frostboltbar then
self:Bar(L["bar_frostbolt"], timer.frostbolt, icon.frostbolt, true, BigWigsColors.db.profile.interrupt)
Expand Down Expand Up @@ -210,30 +221,34 @@ function module:FrostboltVolley()
end
end

function module:Fissure()
if self.db.profile.fissure then
self:Message(L["msg_fissure"], "Urgent", true, "Alarm")
-- add bar?
function module:Fissure(name)
if name and self.db.profile.fissure then
if name == UnitName("player") then
self:Message(string.format(L["msg_fissure"], name), "Urgent", true, "RunAway")
self:Say(L["misc_say_fissure"]) -- verify
else
self:Message(string.format(L["msg_fissure"], name), "Urgent")
end
end
end

function module:AbominationDies(name)
if name and self.db.profile.addcount then
self:RemoveBar(string.format(L["bar_add"], module.numAbominations, name))
--self:RemoveBar(string.format(L["bar_add"], module.numAbominations, name))
module.numAbominations = module.numAbominations + 1
if module.numAbominations < 14 then
self:Bar(string.format(L["bar_add"], module.numAbominations, name), (module.timePhase1Start + timer.phase1 - GetTime()), icon.abomination)
--self:Bar(string.format(L["bar_add"], module.numAbominations, name), (module.timePhase1Start + timer.phase1 - GetTime()), icon.abomination)
end
end
self:KTM_Reset()
end

function module:WeaverDies(name)
if name and self.db.profile.addcount then
self:RemoveBar(string.format(L["bar_add"], module.numWeavers, name))
--self:RemoveBar(string.format(L["bar_add"], module.numWeavers, name))
module.numWeavers = module.numWeavers + 1
if module.numWeavers < 14 then
self:Bar(string.format(L["bar_add"], module.numWeavers, name), (module.timePhase1Start + timer.phase1 - GetTime()), icon.soulWeaver)
--self:Bar(string.format(L["bar_add"], module.numWeavers, name), (module.timePhase1Start + timer.phase1 - GetTime()), icon.soulWeaver)
end
end
end
Expand All @@ -248,11 +263,12 @@ function module:TestModuleCore()
-- check core functions
module:WeaverDies("test")
module:AbominationDies("test")
module:Fissure()
module:Fissure(UnitName("player"))
module:Fissure("Test")
module:FrostboltVolley()
module:FrostboltOver()
module:Frostbolt()
module:Detonate("test")
module:Detonate(UnitName("player"))
module:FrostBlast()
module:Guardians()
module:MindControl()
Expand All @@ -268,7 +284,7 @@ function module:TestModuleCore()
module:BigWigs_RecvSync(syncName.frostbolt)
module:BigWigs_RecvSync(syncName.frostboltOver)
module:BigWigs_RecvSync(syncName.frostboltVolley)
module:BigWigs_RecvSync(syncName.fissure)
module:BigWigs_RecvSync(syncName.fissure, "test")
module:BigWigs_RecvSync(syncName.abomination, "test")
module:BigWigs_RecvSync(syncName.soulWeaver, "test")
end
18 changes: 10 additions & 8 deletions Raids/Naxxramas/Kelthuzad/I18n.lua
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ L:RegisterTranslations("enUS", function() return {
detonate_name = "Detonate Mana Warning",
detonate_desc = "Warns about Detonate Mana soon.",

detonateicon_cmd = "detonateicon",
detonateicon_name = "Raid Icon on Detonate",
detonateicon_desc = "Place a raid icon on people with Detonate Mana.",

guardians_cmd = "guardians",
guardians_name = "Guardian Spawns",
guardians_desc = "Warn for incoming Icecrown Guardians in phase 3.",
Expand All @@ -65,8 +61,10 @@ L:RegisterTranslations("enUS", function() return {
-- triggers
trigger_mindControl1 = "Your soul, is bound to me now!",
trigger_mindControl2 = "There will be no escape!",
trigger_mindControl = "^([^%s]+) ([^%s]+) afflicted by Chains of Kel'Thuzad.",
trigger_engage1 = "Minions, servants, soldiers of the cold dark, obey the call of Kel'Thuzad!",
trigger_engage2 = "Minions, servants, soldiers of the cold dark! Obey the call of Kel'Thuzad!",

trigger_attack1 = "Kel'Thuzad attacks",
trigger_attack2 = "Kel'Thuzad misses",
trigger_attack3 = "Kel'Thuzad hits",
Expand All @@ -82,17 +80,19 @@ L:RegisterTranslations("enUS", function() return {
trigger_shieldBash3 = "Shield Bash was blocked by Kel'Thuzad",
trigger_earthShock1 = "Earth Shock hits Kel'Thuzad",
trigger_earthShock2 = "Earth Shock crits Kel'Thuzad",

trigger_phase2_1 = "Pray for mercy!",
trigger_phase2_2 = "Scream your dying breath!",
trigger_phase2_3 = "The end is upon you!",
trigger_phase3 = "Master, I require aid!",
trigger_guardians = "Very well. Warriors of the frozen wastes, rise up! I command you to fight, kill and die for your master! Let none survive!",
trigger_fissure = "casts Shadow Fissure.",
trigger_fissure = "^([^%s]+) casts Shadow Fissure.",
trigger_fissure_self = "You cast Shadow Fissure.",
trigger_frostbolt = "Kel'Thuzad begins to cast Frostbolt.",
trigger_frostboltVolley = "afflicted by Frostbolt",
trigger_addDeath = "(.*) dies",
trigger_frostBlast = "I will freeze the blood in your veins!",
trigger_frostBlast_yell = "I will freeze the blood in your veins!",
trigger_frostBlast = "^([^%s]+) ([^%s]+) afflicted by Frost Blast.",
trigger_detonate = "^([^%s]+) ([^%s]+) afflicted by Detonate Mana",

-- messages
Expand All @@ -103,8 +103,8 @@ L:RegisterTranslations("enUS", function() return {
msg_phase3Soon = "Phase 3 soon!",
msg_phase3Now = "Phase 3, Guardians in ~15sec!",
msg_guardians = "Guardians incoming in ~10sec!",
msg_fissure = "Shadow Fissure!",
msg_frostbolt = "Frostbolt! Interrupt!",
msg_fissure = "Shadow Fissure - %s",
msg_frostbolt = "Frostbolt!",
msg_frostblast = "Frost Blast!",
msg_frostblastSoon = "Possible Frost Blast in ~5sec!",
msg_mindControlAndfrostblastSoon = "Possible Frost Blast and Mind Control in ~5sec!",
Expand All @@ -128,6 +128,8 @@ L:RegisterTranslations("enUS", function() return {
misc_zone = "Kel'Thuzad Chamber",
misc_you = "You",
misc_are = "are",
misc_say_detonate = "Detonate Mana on me",
misc_say_fissure = "Shadow Fissure",

} end )

Expand Down
Loading

0 comments on commit daef088

Please sign in to comment.