From f3d03f9a247b60a8c8d60ff82f335dd8cf677f9c Mon Sep 17 00:00:00 2001 From: Zidras <10605951+Zidras@users.noreply.github.com> Date: Tue, 6 Feb 2024 23:33:22 +0000 Subject: [PATCH] ICC-DBS: warn when Blood Beast hit swing (Fix #197) --- DBM-Icecrown/TheLowerSpire/Deathbringer.lua | 13 +++++++++++++ DBM-Icecrown/localization.en.lua | 9 +++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/DBM-Icecrown/TheLowerSpire/Deathbringer.lua b/DBM-Icecrown/TheLowerSpire/Deathbringer.lua index 5b2d4bfa..1ce2468b 100644 --- a/DBM-Icecrown/TheLowerSpire/Deathbringer.lua +++ b/DBM-Icecrown/TheLowerSpire/Deathbringer.lua @@ -63,6 +63,7 @@ local warnAddsSoon = mod:NewPreWarnAnnounce(72173, 10, 3) local warnAdds = mod:NewSpellAnnounce(72173, 4) local specWarnScentofBlood = mod:NewSpecialWarningSpell(72769, nil, nil, nil, nil, nil, 3) -- Heroic Ablility +local specWarnBeastOnYou = mod:NewSpecialWarning("SpecWarnBloodBeastSwing", true, nil, nil, nil, 1, 2, nil, 72173, 72173) local timerCallBloodBeast = mod:NewNextTimer(40, 72173, nil, nil, nil, 1, nil, DBM_COMMON_L.DAMAGE_ICON, nil, 3) local timerNextScentofBlood = mod:NewNextTimer(10, 72769, nil, nil, nil, 2) -- 10 seconds after Beasts spawn, if any of them is alive @@ -149,6 +150,7 @@ function mod:OnCombatEnd() DBM.InfoFrame:Hide() end DBM.BossHealth:Clear() + self:UnregisterShortTermEvents() end function mod:SPELL_CAST_START(args) @@ -218,6 +220,9 @@ function mod:SPELL_SUMMON(args) if self:IsHeroic() then timerNextScentofBlood:Start() end + self:RegisterShortTermEvents( + "SWING_DAMAGE" + ) end if self.Options.BeastIcons then self:ScanForMobs(args.destGUID, 2, self.vb.beastIcon, 1, nil, 10, "BeastIcons") @@ -226,12 +231,20 @@ function mod:SPELL_SUMMON(args) end end +function mod:SWING_DAMAGE(sourceGUID, _, _, destGUID) + if destGUID == UnitGUID("player") and self:GetCIDFromGUID(sourceGUID) == 38508 then -- Blood Beast + specWarnBeastOnYou:Show() + specWarnBeastOnYou:Play("targetyou") + end +end + function mod:UNIT_DIED(args) local cid = self:GetCIDFromGUID(args.destGUID) if cid == 38508 then -- Blood Beast self.vb.bloodBeastAlive = self.vb.bloodBeastAlive - 1 if self.vb.bloodBeastAlive == 0 then timerNextScentofBlood:Cancel() + self:UnregisterShortTermEvents() end end end diff --git a/DBM-Icecrown/localization.en.lua b/DBM-Icecrown/localization.en.lua index bc63f28b..0041e8f9 100644 --- a/DBM-Icecrown/localization.en.lua +++ b/DBM-Icecrown/localization.en.lua @@ -106,9 +106,14 @@ L:SetGeneralLocalization({ name = "Deathbringer Saurfang" }) +L:SetWarningLocalization({ + SpecWarnBloodBeastSwing = "Blood Beast attacking you - Run Away", -- CreatureID 38508 +}) + L:SetOptionLocalization({ - RunePowerFrame = "Show Boss Health + $spell:72371 bar", --- RemoveDI = "Remove $spell:19752 if used to prevent $spell:72293 cast" + RunePowerFrame = "Show Boss Health + $spell:72371 bar", +-- RemoveDI = "Remove $spell:19752 if used to prevent $spell:72293 cast" + SpecWarnVengefulShade = "Show special warning when you are attacked by Blood Beast", -- CreatureID 38508 }) L:SetMiscLocalization({