Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICC-DBS: warn when Blood Beast hit swing (Fix #197) #199

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading