Full state of the live install: prodigeomix fork content plus local OctoWoW patches (MC/Onyxia/ZG/Karazhan timers, Golemagg, Thaurissan, aura-scan perf, world markers), and the BWL changes from raid feedback: - Razorgore: exact egg count via SuperWoW cast events, count synced - Firemaw: Flame Buffet timer on by default, retimed from logs - Blackwing Alchemist: assist marking, no Skull/Cross or mob marks, mark follows the fire chain - Wyrmguard/Overseer: vulnerability read from the buff, one bar per mob with its raid mark and click-to-target - Bars: BigWigs_SetBarRaidMark event to show a raid mark beside a bar Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
299 lines
9.7 KiB
Lua
299 lines
9.7 KiB
Lua
|
|
local module, L = BigWigs:ModuleDeclaration("Flamegor", "Blackwing Lair")
|
|
|
|
module.revision = 30141
|
|
module.enabletrigger = module.translatedName
|
|
module.toggleoptions = {"wingbuffet", "shadowflame", "frenzy", -1, "mcalert", "mcbar", "mcmark", "bosskill"}
|
|
module.defaultDB = {
|
|
mcbar = false,
|
|
}
|
|
|
|
L:RegisterTranslations("enUS", function() return {
|
|
cmd = "Flamegor",
|
|
|
|
wingbuffet_cmd = "wingbuffet",
|
|
wingbuffet_name = "Wing Buffet Alert",
|
|
wingbuffet_desc = "Warn for Wing Buffet",
|
|
|
|
shadowflame_cmd = "shadowflame",
|
|
shadowflame_name = "Shadow Flame Alert",
|
|
shadowflame_desc = "Warn for Shadow Flame",
|
|
|
|
frenzy_cmd = "frenzy",
|
|
frenzy_name = "Frenzy Alert",
|
|
frenzy_desc = "Warn for Frenzy",
|
|
|
|
mcalert_cmd = "mcalert",
|
|
mcalert_name = "Overbearing Rage Alert",
|
|
mcalert_desc = "Warn when Overbearing Rage (mind control) happens",
|
|
|
|
mcbar_cmd = "mcbar",
|
|
mcbar_name = "Overbearing Rage Health Bar",
|
|
mcbar_desc = "Show a health bar for victims of Overbearing Rage (bring them to 25% HP to end the effect, they cannot be CCed)",
|
|
|
|
mcmark_cmd = "mcmark",
|
|
mcmark_name = "Overbearing Rage Mark",
|
|
mcmark_desc = "Mark the victim of Overbearing Rage with Diamond",
|
|
|
|
|
|
trigger_wingBuffet = "Flamegor begins to cast Wing Buffet.", --CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE
|
|
bar_wingBuffetCast = "Casting Wing Buffet!",
|
|
bar_wingBuffetCd = "Wing Buffet CD",
|
|
msg_wingBuffetCast = "Casting Wing Buffet!",
|
|
msg_wingBuffetSoon = "Wing Buffet in 2 seconds - Taunt now!",
|
|
|
|
trigger_shadowFlameCast = "Flamegor begins to cast Shadow Flame.", --CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE - seems to no longer appear in logs since 1.18
|
|
bar_shadowFlameCast = "Casting Shadow Flame!",
|
|
msg_shadowFlameCast = "Casting Shadow Flame!",
|
|
trigger_shadowFlameHit = "Flamegor's Shadow Flame hits", --CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE
|
|
bar_shadowFlameCd = "Shadow Flame CD",
|
|
|
|
trigger_frenzy = "Flamegor gains Frenzy.", --CHAT_MSG_SPELL_PERIODIC_CREATURE_BUFFS
|
|
trigger_frenzyFade = "Frenzy fades from Flamegor.", --CHAT_MSG_SPELL_AURA_GONE_OTHER
|
|
bar_frenzyCd = "Frenzy CD",
|
|
bar_frenzyDur = "Frenzy!",
|
|
msg_frenzy = "Frenzy - Tranq now!",
|
|
|
|
trigger_mcYou = "You are afflicted by Overbearing Rage", --CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE
|
|
trigger_mcOther1 = "(.+) is afflicted by Overbearing Rage", --CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE
|
|
trigger_mcOther2 = "(.+) %(Flamegor%) is afflicted by Overbearing Rage", --CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE
|
|
trigger_mcFade = "Overbearing Rage fades from (.+)%.", --CHAT_MSG_SPELL_AURA_GONE_OTHER
|
|
bar_mc = "%s Rage",
|
|
msg_mc = "%s raging out! - bring to 25%% or kill boss",
|
|
|
|
trigger_death = "(.+) dies%."
|
|
} end)
|
|
|
|
local timer = {
|
|
wingBuffetFirstCd = 30,
|
|
wingBuffetCd = 29, --30sec - 1sec cast
|
|
wingBuffetCast = 1,
|
|
|
|
shadowFlameFirstCd = 16,
|
|
shadowFlameCd = 14, --16 - 2sec cast
|
|
shadowFlameCast = 2,
|
|
|
|
frenzyCd = 10,
|
|
frenzyDur = 10,
|
|
}
|
|
local icon = {
|
|
wingBuffet = "INV_Misc_MonsterScales_14",
|
|
shadowFlame = "Spell_Fire_Incinerate",
|
|
frenzy = "Ability_Druid_ChallangingRoar",
|
|
tranquil = "Spell_Nature_Drowsy",
|
|
mc = "Spell_Shadow_ShadowWordDominate",
|
|
}
|
|
local color = {
|
|
wingBuffetCd = "Cyan",
|
|
wingBuffetCast = "Blue",
|
|
|
|
shadowFlameCd = "Orange",
|
|
shadowFlameCast = "Red",
|
|
|
|
frenzyCd = "Black",
|
|
frenzyDur = "Magenta",
|
|
}
|
|
local syncName = {
|
|
wingBuffet = "FlamegorWingBuffet"..module.revision,
|
|
shadowFlameCast = "FlamegorShadowflame"..module.revision,
|
|
shadowFlameHit = "FlamegorShadowflameHit"..module.revision,
|
|
frenzy = "FlamegorFrenzyStart"..module.revision,
|
|
frenzyFade = "FlamegorFrenzyEnd"..module.revision,
|
|
mc = "FlamegorMC"..module.revision,
|
|
mcFade = "FlamegorMCFade"..module.revision,
|
|
}
|
|
local spellId = {
|
|
shadowFlame = 22539,
|
|
}
|
|
|
|
local frenzyStartTime = 0
|
|
local frenzyEndTime = 0
|
|
|
|
function module:OnEnable()
|
|
--self:RegisterEvent("CHAT_MSG_SAY", "Event") --Debug
|
|
|
|
self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_BUFFS", "Event") --trigger_frenzy
|
|
|
|
self:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE", "Event") --trigger_shadowFlameHit
|
|
self:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_PARTY_DAMAGE", "Event") --trigger_shadowFlameHit
|
|
self:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_DAMAGE", "Event") --trigger_wingBuffet, trigger_shadowFlameCast, trigger_shadowFlameHit
|
|
|
|
self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE", "AfflictionEvent") --trigger_mcYou
|
|
self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_HOSTILEPLAYER_DAMAGE", "AfflictionEvent") --trigger_mcOther
|
|
|
|
self:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_SELF", "FadesEvent")
|
|
self:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_PARTY", "FadesEvent")
|
|
self:RegisterEvent("CHAT_MSG_SPELL_AURA_GONE_OTHER", "FadesEvent")--trigger_frenzyFade
|
|
|
|
if SUPERWOW_VERSION or SetAutoloot then
|
|
self:RegisterEvent("UNIT_CASTEVENT")
|
|
end
|
|
|
|
|
|
self:ThrottleSync(3, syncName.wingBuffet)
|
|
self:ThrottleSync(3, syncName.shadowFlameCast)
|
|
self:ThrottleSync(3, syncName.shadowFlameHit)
|
|
self:ThrottleSync(5, syncName.frenzy)
|
|
self:ThrottleSync(1, syncName.frenzyFade)
|
|
self:ThrottleSync(3, syncName.mc)
|
|
self:ThrottleSync(1, syncName.mcFade)
|
|
end
|
|
|
|
function module:OnSetup()
|
|
self.started = nil
|
|
end
|
|
|
|
function module:OnEngage()
|
|
frenzyStartTime = 0
|
|
frenzyEndTime = 0
|
|
|
|
if self.db.profile.wingbuffet then
|
|
self:Bar(L["bar_wingBuffetCd"], timer.wingBuffetFirstCd, icon.wingBuffet, true, color.wingBuffetCd)
|
|
self:DelayedMessage(timer.wingBuffetFirstCd - 2, L["msg_wingBuffetSoon"], "Attention", false, nil, false)
|
|
end
|
|
|
|
if self.db.profile.shadowflame then
|
|
self:Bar(L["bar_shadowFlameCd"], timer.shadowFlameFirstCd, icon.shadowFlame, true, color.shadowFlameCd)
|
|
end
|
|
|
|
if self.db.profile.frenzy then
|
|
self:Bar(L["bar_frenzyCd"], timer.frenzyCd, icon.frenzy, true, color.frenzyCd)
|
|
end
|
|
end
|
|
|
|
function module:OnDisengage()
|
|
end
|
|
|
|
|
|
function module:Event(msg)
|
|
if msg == L["trigger_wingBuffet"] then
|
|
self:Sync(syncName.wingBuffet)
|
|
|
|
elseif msg == L["trigger_shadowFlameCast"] then
|
|
self:Sync(syncName.shadowFlameCast)
|
|
|
|
elseif string.find(msg, L["trigger_shadowFlameHit"]) then
|
|
self:Sync(syncName.shadowFlameHit)
|
|
|
|
elseif msg == L["trigger_frenzy"] then
|
|
self:Sync(syncName.frenzy)
|
|
end
|
|
end
|
|
|
|
function module:AfflictionEvent(msg)
|
|
if string.find(msg, L["trigger_mcYou"]) then
|
|
self:Sync(syncName.mc .. " " .. UnitName("player"))
|
|
else
|
|
local _, _, player = string.find(msg, L["trigger_mcOther1"])
|
|
if player then
|
|
self:Sync(syncName.mc .. " " .. player)
|
|
end
|
|
local _, _, player = string.find(msg, L["trigger_mcOther2"])
|
|
if player then
|
|
self:Sync(syncName.mc .. " " .. player)
|
|
end
|
|
end
|
|
end
|
|
|
|
function module:FadesEvent(msg)
|
|
if msg == L["trigger_frenzyFade"] then
|
|
self:Sync(syncName.frenzyFade)
|
|
end
|
|
|
|
local _, _, player = string.find(msg, L["trigger_mcFade"])
|
|
if player then
|
|
player = player == "you" and UnitName("player") or player
|
|
self:Sync(syncName.mcFade .. " " .. player)
|
|
end
|
|
end
|
|
|
|
function module:OnFriendlyDeath(msg)
|
|
local _, _, player = string.find(msg, L["trigger_death"])
|
|
if player then
|
|
self:OverbearingRageFade(player)
|
|
self:Sync(syncName.mcFade .. " " .. player)
|
|
end
|
|
end
|
|
|
|
function module:UNIT_CASTEVENT(caster,target,action,spell,castTime)
|
|
if spell == spellId.shadowFlame and action == "START" then
|
|
self:Sync(syncName.shadowFlameCast)
|
|
self:DelayedSync(castTime/1000, syncName.shadowFlameHit)
|
|
return
|
|
end
|
|
end
|
|
|
|
|
|
function module:BigWigs_RecvSync(sync, rest, nick)
|
|
if sync == syncName.wingBuffet and self.db.profile.wingbuffet then
|
|
self:WingBuffet()
|
|
elseif sync == syncName.shadowFlameCast and self.db.profile.shadowflame then
|
|
self:RemoveBar(L["bar_shadowFlameCd"])
|
|
self:Bar(L["bar_shadowFlameCast"], timer.shadowFlameCast, icon.shadowFlame, true, color.shadowFlameCast)
|
|
self:Message(L["msg_shadowFlameCast"], "Urgent", false, nil, false)
|
|
elseif sync == syncName.shadowFlameHit and self.db.profile.shadowflame then
|
|
self:RemoveBar(L["bar_shadowFlameCd"])
|
|
self:Bar(L["bar_shadowFlameCd"], timer.shadowFlameCd, icon.shadowFlame, true, color.shadowFlameCd)
|
|
elseif sync == syncName.frenzy and self.db.profile.frenzy then
|
|
self:Frenzy()
|
|
elseif sync == syncName.frenzyFade and self.db.profile.frenzy then
|
|
self:FrenzyFade()
|
|
elseif sync == syncName.mc and rest then
|
|
self:OverbearingRage(rest)
|
|
elseif sync == syncName.mcFade and rest then
|
|
self:OverbearingRageFade(rest)
|
|
end
|
|
end
|
|
|
|
|
|
function module:WingBuffet()
|
|
self:CancelDelayedMessage(L["msg_wingBuffetSoon"])
|
|
self:RemoveBar(L["bar_wingBuffetCd"])
|
|
|
|
self:Bar(L["bar_wingBuffetCast"], timer.wingBuffetCast, icon.wingBuffet, true, color.wingBuffetCast)
|
|
|
|
self:DelayedBar(timer.wingBuffetCast, L["bar_wingBuffetCd"], timer.wingBuffetCd, icon.wingBuffet, true, color.wingBuffetCd)
|
|
self:DelayedMessage(timer.wingBuffetCast + timer.wingBuffetCd - 2, L["msg_wingBuffetSoon"], "Attention", false, nil, false)
|
|
end
|
|
|
|
function module:Frenzy()
|
|
self:RemoveBar(L["bar_frenzyCd"])
|
|
|
|
if UnitClass("Player") == "Hunter" then
|
|
self:Message(L["msg_frenzy"], "Urgent", false, nil, false)
|
|
self:Sound("Info")
|
|
self:WarningSign(icon.tranquil, 1)
|
|
end
|
|
|
|
self:Bar(L["bar_frenzyDur"], timer.frenzyDur, icon.frenzy, true, color.frenzyDur)
|
|
frenzyStartTime = GetTime()
|
|
end
|
|
|
|
function module:FrenzyFade()
|
|
self:RemoveBar(L["bar_frenzyDur"])
|
|
self:RemoveWarningSign(icon.tranquil)
|
|
|
|
frenzyEndTime = GetTime()
|
|
|
|
self:Bar(L["bar_frenzyCd"], timer.frenzyCd - (frenzyEndTime - frenzyStartTime), icon.frenzy, true, color.frenzyCd)
|
|
end
|
|
|
|
function module:OverbearingRage(player)
|
|
if self.db.profile.mcalert then
|
|
self:Message(string.format(L["msg_mc"],player), "Attention", false, "Alert")
|
|
end
|
|
|
|
if self.db.profile.mcbar then
|
|
self:MonitorBar(string.format(L["bar_mc"],player), icon.mc, BigWigs:GetGUIDByName(player, 0))
|
|
end
|
|
|
|
if self.db.profile.mcmark then
|
|
self:SetRaidTargetForPlayer(player, "Diamond")
|
|
end
|
|
end
|
|
|
|
function module:OverbearingRageFade(player)
|
|
self:RestorePreviousRaidTargetForPlayer(player)
|
|
self:RemoveBar(string.format(L["bar_mc"],player))
|
|
end
|