|
1 | | -local mod = DBM:NewMod("Deathbringer", "DBM-Raids-WoTLK", 2) |
2 | | -local L = mod:GetLocalizedStrings() |
3 | | - |
4 | | -mod.statTypes = "normal,normal25,heroic,heroic25" |
5 | | - |
6 | | -mod:SetRevision("@file-date-integer@") |
7 | | -mod:SetCreatureID(37813) |
8 | | -mod:SetEncounterID(not mod:IsPostCata() and 848 or 1096) |
9 | | -mod:SetModelID(30790) |
10 | | -mod:SetUsedIcons(1, 2, 3, 4, 5, 6, 7, 8) |
11 | | -mod:SetZone(631) |
12 | | - |
13 | | -mod:RegisterCombat("combat") |
14 | | - |
15 | | -mod:RegisterEvents( |
16 | | - "CHAT_MSG_MONSTER_YELL" |
17 | | -) |
18 | | - |
19 | | -mod:RegisterEventsInCombat( |
20 | | - "SPELL_CAST_START 72378", |
21 | | - "SPELL_CAST_SUCCESS 72410", |
22 | | - "SPELL_SUMMON 72172 72173 72356 72357 72358", |
23 | | - "SPELL_AURA_APPLIED 72293 72385 72737", |
24 | | - "SPELL_AURA_REMOVED 72385", |
25 | | - "UNIT_HEALTH boss1" |
26 | | -) |
27 | | - |
28 | | -local warnFrenzySoon = mod:NewSoonAnnounce(72737, 2, nil, "Tank|Healer") |
29 | | -local warnAddsSoon = mod:NewPreWarnAnnounce(72173, 10, 3) |
30 | | -local warnAdds = mod:NewSpellAnnounce(72173, 4) |
31 | | -local warnFrenzy = mod:NewSpellAnnounce(72737, 2, nil, "Tank|Healer") |
32 | | -local warnBloodNova = mod:NewSpellAnnounce(72378, 2) |
33 | | -local warnMark = mod:NewTargetCountAnnounce(72293, 4, 72293, nil, nil, nil, nil, nil, true) |
34 | | -local warnBoilingBlood = mod:NewTargetNoFilterAnnounce(72385, 2, nil, "Healer") |
35 | | -local warnRuneofBlood = mod:NewTargetNoFilterAnnounce(72410, 3, nil, "Tank|Healer") |
36 | | - |
37 | | -local specwarnRuneofBlood = mod:NewSpecialWarningTaunt(72410, nil, nil, nil, 1, 2) |
38 | | - |
39 | | -local timerCombatStart = mod:NewCombatTimer(45) |
40 | | -local timerRuneofBlood = mod:NewNextTimer(20, 72410, nil, "Tank|Healer", nil, 5, nil, DBM_COMMON_L.TANK_ICON) |
41 | | -local timerBoilingBlood = mod:NewNextTimer(15.5, 72385, nil, "Healer", nil, 5, nil, DBM_COMMON_L.HEALER_ICON) |
42 | | -local timerBloodNova = mod:NewNextTimer(20, 72378, nil, nil, nil, 2) |
43 | | -local timerCallBloodBeast = mod:NewNextTimer(40, 72173, nil, nil, nil, 1, nil, DBM_COMMON_L.DAMAGE_ICON) |
44 | | - |
45 | | -local enrageTimer = mod:NewBerserkTimer(480) |
46 | | - |
47 | | -mod:AddRangeFrameOption(12, 72378, "Ranged") |
48 | | -mod:AddSetIconOption("BeastIcons", 72173, true, 5, {8, 7, 6, 5, 4}) |
49 | | -mod:AddSetIconOption("BoilingBloodIcons", 72385, false, 0, {1, 2, 3}) |
50 | | - |
51 | | -mod.vb.warned_preFrenzy = false |
52 | | -mod.vb.boilingBloodIcon = 1 |
53 | | -mod.vb.beastIcon = 8 |
54 | | -mod.vb.Mark = 0 |
55 | | -local boilingBloodTargets = {} |
56 | | - |
57 | | -local function warnBoilingBloodTargets(self) |
58 | | - warnBoilingBlood:Show(table.concat(boilingBloodTargets, "<, >")) |
59 | | - table.wipe(boilingBloodTargets) |
60 | | - self.vb.boilingBloodIcon = 1 |
61 | | - timerBoilingBlood:Start() |
62 | | -end |
63 | | - |
64 | | -function mod:OnCombatStart(delay) |
65 | | - if self:IsDifficulty("heroic10", "heroic25") then |
66 | | - enrageTimer:Start(360-delay) |
67 | | - else |
68 | | - enrageTimer:Start(-delay)--480 |
69 | | - end |
70 | | - timerCallBloodBeast:Start(-delay) |
71 | | - warnAddsSoon:Schedule(30-delay) |
72 | | - timerBloodNova:Start(-delay) |
73 | | - timerRuneofBlood:Start(-delay) |
74 | | - timerBoilingBlood:Start(19-delay) |
75 | | - table.wipe(boilingBloodTargets) |
76 | | - self.vb.warned_preFrenzy = false |
77 | | - self.vb.boilingBloodIcon = 1 |
78 | | - self.vb.beastIcon = 8 |
79 | | - self.vb.Mark = 0 |
80 | | - if self.Options.RangeFrame then |
81 | | - DBM.RangeCheck:Show(12) |
82 | | - end |
83 | | -end |
84 | | - |
85 | | -function mod:OnCombatEnd() |
86 | | - if self.Options.RangeFrame then |
87 | | - DBM.RangeCheck:Hide() |
88 | | - end |
89 | | -end |
90 | | - |
91 | | -function mod:SPELL_CAST_START(args) |
92 | | - if args.spellId == 72378 then |
93 | | - warnBloodNova:Show() |
94 | | - timerBloodNova:Start() |
95 | | - end |
96 | | -end |
97 | | - |
98 | | -function mod:SPELL_CAST_SUCCESS(args) |
99 | | - if args.spellId == 72410 then |
100 | | - warnRuneofBlood:Show(args.destName) |
101 | | - if not args:IsPlayer() then |
102 | | - specwarnRuneofBlood:Show(args.destName) |
103 | | - specwarnRuneofBlood:Play("tauntboss") |
104 | | - end |
105 | | - timerRuneofBlood:Start() |
106 | | - end |
107 | | -end |
108 | | - |
109 | | -function mod:SPELL_SUMMON(args) |
110 | | - if args:IsSpellID(72172, 72173, 72356, 72357, 72358) then |
111 | | - if self:AntiSpam(5) then |
112 | | - self.vb.beastIcon = 8 |
113 | | - warnAdds:Show() |
114 | | - warnAddsSoon:Schedule(30) |
115 | | - timerCallBloodBeast:Start() |
116 | | - end |
117 | | - if self.Options.BeastIcons then |
118 | | - self:ScanForMobs(args.destGUID, 2, self.vb.beastIcon, 1, nil, 10, "BeastIcons") |
119 | | - end |
120 | | - self.vb.beastIcon = self.vb.beastIcon - 1 |
121 | | - end |
122 | | -end |
123 | | - |
124 | | -function mod:SPELL_AURA_APPLIED(args) |
125 | | - if args.spellId == 72293 then |
126 | | - self.vb.Mark = self.vb.Mark + 1 |
127 | | - warnMark:Show(self.vb.Mark, args.destName) |
128 | | - elseif args.spellId == 72385 then |
129 | | - boilingBloodTargets[#boilingBloodTargets + 1] = args.destName |
130 | | - if self.Options.BoilingBloodIcons then |
131 | | - self:SetIcon(args.destName, self.vb.boilingBloodIcon) |
132 | | - end |
133 | | - self.vb.boilingBloodIcon = self.vb.boilingBloodIcon + 1 |
134 | | - self:Unschedule(warnBoilingBloodTargets) |
135 | | - if self:IsDifficulty("normal10", "heroic10") or (self:IsDifficulty("normal25", "heroic25") and #boilingBloodTargets >= 3) then |
136 | | - warnBoilingBloodTargets(self) |
137 | | - else |
138 | | - self:Schedule(0.5, warnBoilingBloodTargets, self) |
139 | | - end |
140 | | - elseif args.spellId == 72737 then |
141 | | - warnFrenzy:Show() |
142 | | - end |
143 | | -end |
144 | | - |
145 | | -function mod:SPELL_AURA_REMOVED(args) |
146 | | - if args.spellId == 72385 and self.Options.BoilingBloodIcons then |
147 | | - self:SetIcon(args.destName, 0) |
148 | | - end |
149 | | -end |
150 | | - |
151 | | -function mod:UNIT_HEALTH(uId) |
152 | | - if not self.vb.warned_preFrenzy and self:GetUnitCreatureId(uId) == 37813 and UnitHealth(uId) / UnitHealthMax(uId) <= 0.33 then |
153 | | - self.vb.warned_preFrenzy = true |
154 | | - warnFrenzySoon:Show() |
155 | | - end |
156 | | -end |
157 | | - |
158 | | -function mod:CHAT_MSG_MONSTER_YELL(msg) |
159 | | - if msg:find(L.PullAlliance, 1, true) then |
160 | | - timerCombatStart:Start(self:IsRetail() and 45 or 48) |
161 | | - elseif msg:find(L.PullHorde, 1, true) then |
162 | | - timerCombatStart:Start(self:IsRetail() and 94.5 or 97.5)--Retail has been confirmed 94.5 more than once, but classic is a little slower |
163 | | - end |
164 | | -end |
| 1 | +local mod = DBM:NewMod("Deathbringer", "DBM-Raids-WoTLK", 2) |
| 2 | +local L = mod:GetLocalizedStrings() |
| 3 | + |
| 4 | +mod.statTypes = "normal,normal25,heroic,heroic25" |
| 5 | + |
| 6 | +mod:SetRevision("@file-date-integer@") |
| 7 | +mod:SetCreatureID(37813) |
| 8 | +mod:SetEncounterID(not mod:IsPostCata() and 848 or 1096) |
| 9 | +mod:SetModelID(30790) |
| 10 | +mod:SetUsedIcons(1, 2, 3, 4, 5, 6, 7, 8) |
| 11 | +mod:SetZone(631) |
| 12 | + |
| 13 | +mod:RegisterCombat("combat") |
| 14 | + |
| 15 | +mod:RegisterEvents( |
| 16 | + "CHAT_MSG_MONSTER_YELL" |
| 17 | +) |
| 18 | + |
| 19 | +mod:RegisterEventsInCombat( |
| 20 | + "SPELL_CAST_START 72378", |
| 21 | + "SPELL_CAST_SUCCESS 72410", |
| 22 | + "SPELL_SUMMON 72172 72173 72356 72357 72358", |
| 23 | + "SPELL_AURA_APPLIED 72293 72385 72737", |
| 24 | + "SPELL_AURA_REMOVED 72385", |
| 25 | + "UNIT_HEALTH boss1" |
| 26 | +) |
| 27 | + |
| 28 | +local warnFrenzySoon = mod:NewSoonAnnounce(72737, 2, nil, "Tank|Healer") |
| 29 | +local warnAddsSoon = mod:NewPreWarnAnnounce(72173, 10, 3) |
| 30 | +local warnAdds = mod:NewSpellAnnounce(72173, 4) |
| 31 | +local warnFrenzy = mod:NewSpellAnnounce(72737, 2, nil, "Tank|Healer") |
| 32 | +local warnBloodNova = mod:NewSpellAnnounce(72378, 2) |
| 33 | +local warnMark = mod:NewTargetCountAnnounce(72293, 4, 72293, nil, nil, nil, nil, nil, true) |
| 34 | +local warnBoilingBlood = mod:NewTargetNoFilterAnnounce(72385, 2, nil, "Healer") |
| 35 | +local warnRuneofBlood = mod:NewTargetNoFilterAnnounce(72410, 3, nil, "Tank|Healer") |
| 36 | + |
| 37 | +local specwarnRuneofBlood = mod:NewSpecialWarningTaunt(72410, nil, nil, nil, 1, 2) |
| 38 | + |
| 39 | +local timerCombatStart = mod:NewCombatTimer(45) |
| 40 | +local timerRuneofBlood = mod:NewNextTimer(20, 72410, nil, "Tank|Healer", nil, 5, nil, DBM_COMMON_L.TANK_ICON) |
| 41 | +local timerBoilingBlood = mod:NewNextTimer(15.5, 72385, nil, "Healer", nil, 5, nil, DBM_COMMON_L.HEALER_ICON) |
| 42 | +local timerBloodNova = mod:NewNextTimer(20, 72378, nil, nil, nil, 2) |
| 43 | +local timerCallBloodBeast = mod:NewNextTimer(40, 72173, nil, nil, nil, 1, nil, DBM_COMMON_L.DAMAGE_ICON) |
| 44 | + |
| 45 | +local enrageTimer = mod:NewBerserkTimer(480) |
| 46 | + |
| 47 | +mod:AddSetIconOption("BeastIcons", 72173, true, 5, {8, 7, 6, 5, 4}) |
| 48 | +mod:AddSetIconOption("BoilingBloodIcons", 72385, false, 0, {1, 2, 3}) |
| 49 | + |
| 50 | +mod.vb.warned_preFrenzy = false |
| 51 | +mod.vb.boilingBloodIcon = 1 |
| 52 | +mod.vb.beastIcon = 8 |
| 53 | +mod.vb.Mark = 0 |
| 54 | +local boilingBloodTargets = {} |
| 55 | + |
| 56 | +local function warnBoilingBloodTargets(self) |
| 57 | + warnBoilingBlood:Show(table.concat(boilingBloodTargets, "<, >")) |
| 58 | + table.wipe(boilingBloodTargets) |
| 59 | + self.vb.boilingBloodIcon = 1 |
| 60 | + timerBoilingBlood:Start() |
| 61 | +end |
| 62 | + |
| 63 | +function mod:OnCombatStart(delay) |
| 64 | + if self:IsDifficulty("heroic10", "heroic25") then |
| 65 | + enrageTimer:Start(360-delay) |
| 66 | + else |
| 67 | + enrageTimer:Start(-delay)--480 |
| 68 | + end |
| 69 | + timerCallBloodBeast:Start(-delay) |
| 70 | + warnAddsSoon:Schedule(30-delay) |
| 71 | + timerBloodNova:Start(-delay) |
| 72 | + timerRuneofBlood:Start(-delay) |
| 73 | + timerBoilingBlood:Start(19-delay) |
| 74 | + table.wipe(boilingBloodTargets) |
| 75 | + self.vb.warned_preFrenzy = false |
| 76 | + self.vb.boilingBloodIcon = 1 |
| 77 | + self.vb.beastIcon = 8 |
| 78 | + self.vb.Mark = 0 |
| 79 | +end |
| 80 | + |
| 81 | +function mod:OnCombatEnd() |
| 82 | +end |
| 83 | + |
| 84 | +function mod:SPELL_CAST_START(args) |
| 85 | + if args.spellId == 72378 then |
| 86 | + warnBloodNova:Show() |
| 87 | + timerBloodNova:Start() |
| 88 | + end |
| 89 | +end |
| 90 | + |
| 91 | +function mod:SPELL_CAST_SUCCESS(args) |
| 92 | + if args.spellId == 72410 then |
| 93 | + warnRuneofBlood:Show(args.destName) |
| 94 | + if not args:IsPlayer() then |
| 95 | + specwarnRuneofBlood:Show(args.destName) |
| 96 | + specwarnRuneofBlood:Play("tauntboss") |
| 97 | + end |
| 98 | + timerRuneofBlood:Start() |
| 99 | + end |
| 100 | +end |
| 101 | + |
| 102 | +function mod:SPELL_SUMMON(args) |
| 103 | + if args:IsSpellID(72172, 72173, 72356, 72357, 72358) then |
| 104 | + if self:AntiSpam(5) then |
| 105 | + self.vb.beastIcon = 8 |
| 106 | + warnAdds:Show() |
| 107 | + warnAddsSoon:Schedule(30) |
| 108 | + timerCallBloodBeast:Start() |
| 109 | + end |
| 110 | + if self.Options.BeastIcons then |
| 111 | + self:ScanForMobs(args.destGUID, 2, self.vb.beastIcon, 1, nil, 10, "BeastIcons") |
| 112 | + end |
| 113 | + self.vb.beastIcon = self.vb.beastIcon - 1 |
| 114 | + end |
| 115 | +end |
| 116 | + |
| 117 | +function mod:SPELL_AURA_APPLIED(args) |
| 118 | + if args.spellId == 72293 then |
| 119 | + self.vb.Mark = self.vb.Mark + 1 |
| 120 | + warnMark:Show(self.vb.Mark, args.destName) |
| 121 | + elseif args.spellId == 72385 then |
| 122 | + boilingBloodTargets[#boilingBloodTargets + 1] = args.destName |
| 123 | + if self.Options.BoilingBloodIcons then |
| 124 | + self:SetIcon(args.destName, self.vb.boilingBloodIcon) |
| 125 | + end |
| 126 | + self.vb.boilingBloodIcon = self.vb.boilingBloodIcon + 1 |
| 127 | + self:Unschedule(warnBoilingBloodTargets) |
| 128 | + if self:IsDifficulty("normal10", "heroic10") or (self:IsDifficulty("normal25", "heroic25") and #boilingBloodTargets >= 3) then |
| 129 | + warnBoilingBloodTargets(self) |
| 130 | + else |
| 131 | + self:Schedule(0.5, warnBoilingBloodTargets, self) |
| 132 | + end |
| 133 | + elseif args.spellId == 72737 then |
| 134 | + warnFrenzy:Show() |
| 135 | + end |
| 136 | +end |
| 137 | + |
| 138 | +function mod:SPELL_AURA_REMOVED(args) |
| 139 | + if args.spellId == 72385 and self.Options.BoilingBloodIcons then |
| 140 | + self:SetIcon(args.destName, 0) |
| 141 | + end |
| 142 | +end |
| 143 | + |
| 144 | +function mod:UNIT_HEALTH(uId) |
| 145 | + if not self.vb.warned_preFrenzy and self:GetUnitCreatureId(uId) == 37813 and UnitHealth(uId) / UnitHealthMax(uId) <= 0.33 then |
| 146 | + self.vb.warned_preFrenzy = true |
| 147 | + warnFrenzySoon:Show() |
| 148 | + end |
| 149 | +end |
| 150 | + |
| 151 | +function mod:CHAT_MSG_MONSTER_YELL(msg) |
| 152 | + if msg:find(L.PullAlliance, 1, true) then |
| 153 | + timerCombatStart:Start(self:IsRetail() and 45 or 48) |
| 154 | + elseif msg:find(L.PullHorde, 1, true) then |
| 155 | + timerCombatStart:Start(self:IsRetail() and 94.5 or 97.5)--Retail has been confirmed 94.5 more than once, but classic is a little slower |
| 156 | + end |
| 157 | +end |
0 commit comments