Skip to content

Commit

Permalink
ICC-DBS: warn when Blood Beast hit swing (Fix #197)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zidras committed Feb 6, 2024
1 parent b633010 commit f3d03f9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
13 changes: 13 additions & 0 deletions DBM-Icecrown/TheLowerSpire/Deathbringer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -149,6 +150,7 @@ function mod:OnCombatEnd()
DBM.InfoFrame:Hide()
end
DBM.BossHealth:Clear()
self:UnregisterShortTermEvents()
end

function mod:SPELL_CAST_START(args)
Expand Down Expand Up @@ -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")
Expand All @@ -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
Expand Down
9 changes: 7 additions & 2 deletions DBM-Icecrown/localization.en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit f3d03f9

Please sign in to comment.