Skip to content

Commit

Permalink
TBC/TheUnderbog/Hungarfen: Fix Spore Cloud on retail
Browse files Browse the repository at this point in the history
  • Loading branch information
ntowle committed Nov 7, 2024
1 parent 48295ea commit 10e050a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 20 deletions.
54 changes: 36 additions & 18 deletions TBC/TheUnderbog/Hungarfen.lua
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
-------------------------------------------------------------------------------
-- Module Declaration
-- Module Declaration
--

local mod, CL = BigWigs:NewBoss("Hungarfen", 546, 576)
if not mod then return end
mod:RegisterEnableMob(17770)
-- mod.engageId = 1946 -- doesn't fire ENCOUNTER_END on a wipe
-- mod.respawnTime = 0 -- resets, doesn't respawn
--mod:SetEncounterID(1946) -- doesn't fire ENCOUNTER_END on a wipe
--mod:SetRespawnTime(0) -- resets, doesn't respawn

-------------------------------------------------------------------------------
-- Initialization
-- Initialization
--

function mod:GetOptions()
return {
{-6008, "CASTBAR"}, -- Foul Spores
{31689, "ME_ONLY"}, -- Spore Cloud
{34168, "ME_ONLY"}, -- Spore Cloud
}, {
[-6008] = "general",
[31689] = -6006, -- Underbog Mushroom
[34168] = -6006, -- Underbog Mushroom
}
end

function mod:OnBossEnable()
self:Log("SPELL_AURA_APPLIED", "SporeCloud", 31689)
self:Log("SPELL_AURA_APPLIED_DOSE", "SporeCloud", 31689)
self:Log("SPELL_AURA_REMOVED", "SporeCloudRemoved", 31689)

if self:Retail() then
self:Log("SPELL_AURA_APPLIED", "SporeCloud", 455539)
else -- Classic
self:Log("SPELL_AURA_APPLIED", "SporeCloudClassic", 31689)
self:Log("SPELL_AURA_APPLIED_DOSE", "SporeCloudClassic", 31689)
self:Log("SPELL_AURA_REMOVED", "SporeCloudRemovedClassic", 31689)
end
self:Log("SPELL_AURA_APPLIED", "FoulSpores", 31673) -- channel that can be offensively dispelled
self:Log("SPELL_AURA_REMOVED", "FoulSporesRemoved", 31673)
self:Log("SPELL_DAMAGE", "FoulSporesDamage", 31697)
self:Log("SPELL_MISSED", "FoulSporesDamage", 31697)

if self:Classic() then
self:CheckForEngage()
self:RegisterEvent("UNIT_HEALTH")
Expand All @@ -47,15 +51,16 @@ function mod:OnEngage()
end

-------------------------------------------------------------------------------
-- Event Handlers
-- Event Handlers
--

function mod:SporeCloud(args)
self:StackMessageOld(args.spellId, args.destName, args.amount, "orange", self:Me(args.destGUID) and "warning" or "info")
self:TargetBar(args.spellId, 20, args.destName)
end

function mod:SporeCloudRemoved(args)
self:StopBar(args.spellName, args.destName)
if self:Me(args.destGUID) then
self:PersonalMessage(34168, "near")
self:PlaySound(34168, "underyou")
else
self:TargetMessage(34168, "orange", args.destName)
end
end

function mod:FoulSpores(args)
Expand Down Expand Up @@ -93,3 +98,16 @@ function mod:UNIT_HEALTH(event, unit)
end
end
end

-------------------------------------------------------------------------------
-- Classic Event Handlers
--

function mod:SporeCloudClassic(args)
self:StackMessageOld(34168, args.destName, args.amount, "orange", self:Me(args.destGUID) and "warning" or "info")
self:TargetBar(34168, 20, args.destName)
end

function mod:SporeCloudRemovedClassic(args)
self:StopBar(args.spellName, args.destName)
end
2 changes: 1 addition & 1 deletion TBC/TheUnderbog/Options/Colors.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

BigWigs:AddColors("Hungarfen", {
[-6008] = {"blue","orange","yellow"},
[31689] = {"blue","orange"},
[34168] = {"blue","orange"},
})

BigWigs:AddColors("Ghaz'an", {
Expand Down
2 changes: 1 addition & 1 deletion TBC/TheUnderbog/Options/Sounds.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

BigWigs:AddSounds("Hungarfen", {
[-6008] = {"alarm","alert"},
[31689] = {"info","warning"},
[34168] = {"info","underyou","warning"},
})

BigWigs:AddSounds("Ghaz'an", {
Expand Down

0 comments on commit 10e050a

Please sign in to comment.