From 10e050aa0ed8298e6b83c9dd2703dc47679be16b Mon Sep 17 00:00:00 2001 From: Nick Towle Date: Wed, 6 Nov 2024 20:55:18 -0500 Subject: [PATCH] TBC/TheUnderbog/Hungarfen: Fix Spore Cloud on retail --- TBC/TheUnderbog/Hungarfen.lua | 54 ++++++++++++++++++++---------- TBC/TheUnderbog/Options/Colors.lua | 2 +- TBC/TheUnderbog/Options/Sounds.lua | 2 +- 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/TBC/TheUnderbog/Hungarfen.lua b/TBC/TheUnderbog/Hungarfen.lua index 525b0f140..bcf2ad298 100644 --- a/TBC/TheUnderbog/Hungarfen.lua +++ b/TBC/TheUnderbog/Hungarfen.lua @@ -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") @@ -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) @@ -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 diff --git a/TBC/TheUnderbog/Options/Colors.lua b/TBC/TheUnderbog/Options/Colors.lua index 579eba1fb..51b59b71c 100644 --- a/TBC/TheUnderbog/Options/Colors.lua +++ b/TBC/TheUnderbog/Options/Colors.lua @@ -1,7 +1,7 @@ BigWigs:AddColors("Hungarfen", { [-6008] = {"blue","orange","yellow"}, - [31689] = {"blue","orange"}, + [34168] = {"blue","orange"}, }) BigWigs:AddColors("Ghaz'an", { diff --git a/TBC/TheUnderbog/Options/Sounds.lua b/TBC/TheUnderbog/Options/Sounds.lua index 0d542afca..9dc4b81bd 100644 --- a/TBC/TheUnderbog/Options/Sounds.lua +++ b/TBC/TheUnderbog/Options/Sounds.lua @@ -1,7 +1,7 @@ BigWigs:AddSounds("Hungarfen", { [-6008] = {"alarm","alert"}, - [31689] = {"info","warning"}, + [34168] = {"info","underyou","warning"}, }) BigWigs:AddSounds("Ghaz'an", {