vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | ------------------------------ |
2 | -- Are you local? -- |
||
3 | ------------------------------ |
||
4 | |||
5 | local boss = AceLibrary("Babble-Boss-2.2")["Loatheb"] |
||
6 | local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss) |
||
7 | |||
8 | local started = nil |
||
9 | |||
10 | ---------------------------- |
||
11 | -- Localization -- |
||
12 | ---------------------------- |
||
13 | |||
14 | L:RegisterTranslations("enUS", function() return { |
||
15 | cmd = "Loatheb", |
||
16 | |||
17 | doom_cmd = "doom", |
||
18 | doom_name = "Inevitable Doom Alert", |
||
19 | doom_desc = "Warn for Inevitable Doom", |
||
20 | |||
21 | spore_cmd = "spore", |
||
22 | spore_name = "Spore Spawning Alert", |
||
23 | spore_desc = "Warn when a spore spawns", |
||
24 | |||
25 | curse_cmd = "curse", |
||
26 | curse_name = "Remove Curse Alert", |
||
27 | curse_desc = "Warn when curses are removed from Loatheb", |
||
28 | |||
29 | doombar = "Inevitable Doom %d", |
||
30 | doomwarn = "Inevitable Doom %d! %d sec to next!", |
||
31 | doomwarn5sec = "Inevitable Doom %d in 5 sec!", |
||
32 | doomtrigger = "afflicted by Inevitable Doom.", |
||
33 | |||
34 | sporewarn = "Spore %d Spawned", |
||
35 | sporebar = "Summon Spore %d", |
||
36 | sporespawntrigger = "Loatheb casts Summon Spore.", |
||
37 | |||
38 | removecursewarn = "Curses removed on Loatheb", |
||
39 | removecursebar = "Remove Curse", |
||
40 | removecursetrigger = "Loatheb casts Remove Curse on Loatheb.", |
||
41 | |||
42 | doomtimerbar = "Doom every 15sec", |
||
43 | doomtimerwarn = "Doom timerchange in %s sec!", |
||
44 | doomtimerwarnnow = "Inevitable Doom now happens every 15sec!", |
||
45 | |||
46 | startwarn = "Loatheb engaged, 2 minutes to Inevitable Doom!", |
||
47 | |||
48 | you = "You", |
||
49 | are = "are", |
||
50 | } end ) |
||
51 | |||
52 | L:RegisterTranslations("koKR", function() return { |
||
53 | |||
54 | doom_name = "파멸 경고", |
||
55 | doom_desc = "피할 수 없는 파멸에 대한 경고", |
||
56 | |||
57 | spore_name = "포자 경고", |
||
58 | spore_desc = "포자 소환에 대한 경고", |
||
59 | |||
60 | curse_name = "저주 해제 경고", |
||
61 | curse_desc = "로데브 저주 해제에 대한 경고", |
||
62 | |||
63 | doombar = "피할 수 없는 파멸 %d", |
||
64 | doomwarn = "피할 수 없는 파멸 %d! 다음은 %d초 후.", |
||
65 | doomwarn5sec = "피할 수 없는 파멸 %d 5초 전", |
||
66 | doomtrigger = "피할 수 없는 파멸에 걸렸습니다.", |
||
67 | |||
68 | sporewarn = "포자 %d 소환됨!", |
||
69 | sporebar = "포자 소환! %d", |
||
70 | sporespawntrigger = "로데브|1이;가; 포자 소환|1을;를; 시전합니다.", |
||
71 | |||
72 | removecursewarn = "로데브 저주 헤제 시전!", |
||
73 | removecursebar = "저주 해제", |
||
74 | removecursetrigger = "로데브|1이;가; 로데브에게 저주 해제|1을;를; 시전합니다.", |
||
75 | |||
76 | doomtimerbar = "피할 수 없는 파멸 - 매 15초", |
||
77 | doomtimerwarn = "%s초 후 피할 수 없는 파멸 시간변경!", |
||
78 | doomtimerwarnnow = "피할 수 없는 파멸! 지금부터 매 15초마다.", |
||
79 | |||
80 | startwarn = "로데브 전투시작!, 피할 수 없는 파멸까지 2 분!", |
||
81 | |||
82 | you = "", |
||
83 | are = "", |
||
84 | } end ) |
||
85 | |||
86 | L:RegisterTranslations("deDE", function() return { |
||
87 | doom_name = "Unausweichliches Schicksal", |
||
88 | doom_desc = "Warnung f\195\188r Unausweichliches Schicksal.", |
||
89 | |||
90 | spore_name = "Warnung bei Sporen", |
||
91 | spore_desc = "Warnung wenn Sporen auftauchen", |
||
92 | |||
93 | curse_name = "Fluch-Aufhebungs Warnung", |
||
94 | curse_desc = "Warnung wenn Fl\195\188che bei Loatheb aufgehoben wurden", |
||
95 | |||
96 | doombar = "Unausweichliches Schicksal %d", |
||
97 | doomwarn = "Unausweichliches Schicksal %d! %d Sekunden bis zum n\195\164chsten.", |
||
98 | doomwarn5sec = "Unausweichliches Schicksal %d in 5 Sekunden", |
||
99 | doomtrigger = "von Unausweichliches Schicksal betroffen.", |
||
100 | |||
101 | sporewarn = "Spore %d aufgetaucht", |
||
102 | sporebar = "Spore beschw\195\182ren %d", |
||
103 | sporespawntrigger = "Loatheb wirkt Spore beschw\195\182ren.", |
||
104 | |||
105 | removecursewarn = "Fl\195\188che bei Loatheb aufgehoben", |
||
106 | removecursebar = "Fluch aufheben", |
||
107 | removecursetrigger = "Loatheb wirkt Fluch aufheben auf Loatheb.", |
||
108 | |||
109 | doomtimerbar = "Unausweichliches Schicksal alle 15 Sekunden", |
||
110 | doomtimerwarn = "Unausweichliches Schicksal Timer Wechsel in %s Sekunden!", |
||
111 | doomtimerwarnnow = "Unausweichliches Schicksal nun alle 15s!", |
||
112 | |||
113 | startwarn = "Loatheb angegriffen! 2 Minuten bis Unausweichliches Schicksal!", |
||
114 | |||
115 | you = "Ihr", |
||
116 | are = "seid", |
||
117 | } end ) |
||
118 | |||
119 | L:RegisterTranslations("zhCN", function() return { |
||
120 | doom_name = "必然的厄运警报", |
||
121 | doom_desc = "必然的厄运警报", |
||
122 | |||
123 | spore_name = "孢子警报", |
||
124 | spore_desc = "孢子警报", |
||
125 | |||
126 | curse_name = "诅咒驱散警报", |
||
127 | curse_desc = "洛欧塞布驱散了一个诅咒效果时发出警报", |
||
128 | |||
129 | doombar = "必然的厄运", |
||
130 | doomwarn = "必然的厄运 - %s秒后再次发动", |
||
131 | doomwarn5sec = "5秒后发动必然的厄运!", |
||
132 | doomtrigger = "受到了必然的厄运效果的影响", |
||
133 | |||
134 | sporewarn = "孢子出现", |
||
135 | sporebar = "召唤孢子", |
||
136 | sporespawntrigger = "洛欧塞布施放了召唤孢子。", |
||
137 | |||
138 | removecursewarn = "洛欧塞布驱散了一个诅咒效果", |
||
139 | removecursebar = "驱散诅咒", |
||
140 | removecursetrigger = "洛欧塞布对洛欧塞布施放了驱散诅咒。", |
||
141 | |||
142 | doomtimerbar = "每隔15秒发动必然的厄运", |
||
143 | doomtimerwarn = "必然的厄运计时%s秒后改变!", |
||
144 | doomtimerwarnnow = "必然的厄运现在每隔15秒发动一次!", |
||
145 | |||
146 | startwarn = "洛欧塞布已激活 - 2分钟后发动必然的厄运!", |
||
147 | |||
148 | you = "你", |
||
149 | are = "到", |
||
150 | } end ) |
||
151 | |||
152 | L:RegisterTranslations("zhTW", function() return { |
||
153 | doom_name = "無可避免的末日警報", |
||
154 | doom_desc = "無可避免的末日警報", |
||
155 | |||
156 | spore_name = "孢子警報", |
||
157 | spore_desc = "孢子警報", |
||
158 | |||
159 | curse_name = "詛咒驅散警報", |
||
160 | curse_desc = "洛斯伯驅散了一個詛咒效果時發出警報", |
||
161 | |||
162 | doombar = "無可避免的末日", |
||
163 | doomwarn = "無可避免的末日 - %s 秒後再次發動", |
||
164 | doomwarn5sec = "5 秒後發動無可避免的末日!", |
||
165 | doomtrigger = "受到了無可避免的末日效果的影響", |
||
166 | |||
167 | sporewarn = "孢子出現", |
||
168 | sporebar = "召喚孢子", |
||
169 | sporespawntrigger = "洛斯伯施放了召喚孢子。", |
||
170 | |||
171 | removecursewarn = "洛斯伯消除了一個詛咒效果", |
||
172 | removecursebar = "消除詛咒", |
||
173 | removecursetrigger = "洛斯伯對洛斯伯施放了消除詛咒。", |
||
174 | |||
175 | doomtimerbar = "每隔 15 秒發動無可避免的末日", |
||
176 | doomtimerwarn = "無可避免的末日計時 %s 秒後改變!", |
||
177 | doomtimerwarnnow = "無可避免的末日現在每隔 15 秒發動一次!", |
||
178 | |||
179 | startwarn = "洛斯伯已進入戰鬥 - 2 分鐘後發動無可避免的末日!", |
||
180 | |||
181 | you = "你", |
||
182 | are = "到", |
||
183 | } end ) |
||
184 | |||
185 | L:RegisterTranslations("frFR", function() return { |
||
186 | cmd = "Horreb", |
||
187 | |||
188 | doomtrigger = "les effets de Mal\195\169diction in\195\169vitable.", |
||
189 | |||
190 | sporespawntrigger = "Horreb lance Invocation de spore.", |
||
191 | |||
192 | removecursetrigger = "Horreb lance D\195\169livrance de la mal\195\169diction sur Horreb.", |
||
193 | |||
194 | you = "Vous", |
||
195 | are = "subissez", |
||
196 | } end ) |
||
197 | |||
198 | ---------------------------------- |
||
199 | -- Module Declaration -- |
||
200 | ---------------------------------- |
||
201 | |||
202 | BigWigsLoatheb = BigWigs:NewModule(boss) |
||
203 | BigWigsLoatheb.zonename = AceLibrary("Babble-Zone-2.2")["Naxxramas"] |
||
204 | BigWigsLoatheb.enabletrigger = boss |
||
205 | BigWigsLoatheb.toggleoptions = {"doom", "spore", "curse", "bosskill"} |
||
206 | BigWigsLoatheb.revision = tonumber(string.sub("$Revision: 15709 $", 12, -3)) |
||
207 | |||
208 | ------------------------------ |
||
209 | -- Initialization -- |
||
210 | ------------------------------ |
||
211 | |||
212 | function BigWigsLoatheb:OnEnable() |
||
213 | self.doomTime = 30 |
||
214 | self.sporeCount = 1 |
||
215 | self.doomCount = 1 |
||
216 | started = nil |
||
217 | |||
218 | self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe") |
||
219 | self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage") |
||
220 | self:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH", "GenericBossDeath") |
||
221 | self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE", "Event") |
||
222 | self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE", "Event") |
||
223 | self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE", "Event") |
||
224 | self:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF") |
||
225 | |||
226 | self:RegisterEvent("BigWigs_RecvSync") |
||
227 | |||
228 | -- 2: Doom and SporeSpawn versioned up because of the sync including the |
||
229 | -- doom/spore count now, so we don't hold back the counter. |
||
230 | self:TriggerEvent("BigWigs_ThrottleSync", "LoathebDoom2", 10) |
||
231 | self:TriggerEvent("BigWigs_ThrottleSync", "LoathebSporeSpawn2", 5) |
||
232 | self:TriggerEvent("BigWigs_ThrottleSync", "LoathebRemoveCurse", 10) |
||
233 | end |
||
234 | |||
235 | function BigWigsLoatheb:BigWigs_RecvSync(sync, rest, nick) |
||
236 | if sync == self:GetEngageSync() and rest and rest == boss and not started then |
||
237 | started = true |
||
238 | if self:IsEventRegistered("PLAYER_REGEN_DISABLED") then |
||
239 | self:UnregisterEvent("PLAYER_REGEN_DISABLED") |
||
240 | end |
||
241 | if self.db.profile.doom then |
||
242 | self:TriggerEvent("BigWigs_StartBar", self, L["doomtimerbar"], 300, "Interface\\Icons\\Spell_Shadow_UnholyFrenzy") |
||
243 | self:ScheduleEvent("bwloathebtimerreduce1", "BigWigs_Message", 240, string.format(L["doomtimerwarn"], 60), "Attention") |
||
244 | self:ScheduleEvent("bwloathebtimerreduce2", "BigWigs_Message", 270, string.format(L["doomtimerwarn"], 30), "Attention") |
||
245 | self:ScheduleEvent("bwloathebtimerreduce3", "BigWigs_Message", 290, string.format(L["doomtimerwarn"], 10), "Urgent") |
||
246 | self:ScheduleEvent("bwloathebtimerreduce4", "BigWigs_Message", 295, string.format(L["doomtimerwarn"], 5), "Important") |
||
247 | self:ScheduleEvent("bwloathebtimerreduce5", "BigWigs_Message", 300, L["doomtimerwarnnow"], "Important") |
||
248 | |||
249 | self:ScheduleEvent("bwloathebdoomtimerreduce", function () BigWigsLoatheb.doomTime = 15 end, 300) |
||
250 | |||
251 | self:TriggerEvent("BigWigs_Message", L["startwarn"], "Red") |
||
252 | self:TriggerEvent("BigWigs_StartBar", self, string.format(L["doombar"], self.doomCount), 120, "Interface\\Icons\\Spell_Shadow_NightOfTheDead") |
||
253 | self:ScheduleEvent("bwloathebdoom", "BigWigs_Message", 115, string.format(L["doomwarn5sec"], self.doomCount), "Urgent") |
||
254 | end |
||
255 | elseif sync == "LoathebDoom2" and rest then |
||
256 | rest = tonumber(rest) |
||
257 | if not rest then return end |
||
258 | |||
259 | if rest == (self.doomCount + 1) then |
||
260 | if self.db.profile.doom then |
||
261 | self:TriggerEvent("BigWigs_Message", string.format(L["doomwarn"], self.doomCount, self.doomTime), "Important") |
||
262 | end |
||
263 | self.doomCount = self.doomCount + 1 |
||
264 | if self.db.profile.doom then |
||
265 | self:TriggerEvent("BigWigs_StartBar", self, string.format(L["doombar"], self.doomCount), self.doomTime, "Interface\\Icons\\Spell_Shadow_NightOfTheDead") |
||
266 | self:ScheduleEvent("bwloathebdoom", "BigWigs_Message", self.doomTime - 5, string.format(L["doomwarn5sec"], self.doomCount), "Urgent") |
||
267 | end |
||
268 | end |
||
269 | elseif sync == "LoathebSporeSpawn2" and rest then |
||
270 | rest = tonumber(rest) |
||
271 | if not rest then return end |
||
272 | |||
273 | if rest == (self.sporeCount + 1) then |
||
274 | if self.db.profile.spore then |
||
275 | self:TriggerEvent("BigWigs_Message", string.format(L["sporewarn"], self.sporeCount), "Important") |
||
276 | end |
||
277 | self.sporeCount = self.sporeCount + 1 |
||
278 | if self.db.profile.spore then |
||
279 | self:TriggerEvent("BigWigs_StartBar", self, string.format(L["sporebar"], self.sporeCount), 12, "Interface\\Icons\\Ability_TheBlackArrow") |
||
280 | end |
||
281 | end |
||
282 | elseif sync == "LoathebRemoveCurse" then |
||
283 | if self.db.profile.curse then |
||
284 | self:TriggerEvent("BigWigs_Message", L["removecursewarn"], "Important") |
||
285 | self:TriggerEvent("BigWigs_StartBar", self, L["removecursebar"], 30, "Interface\\Icons\\Spell_Holy_RemoveCurse") |
||
286 | end |
||
287 | end |
||
288 | end |
||
289 | |||
290 | function BigWigsLoatheb:Event( msg ) |
||
291 | if string.find(msg, L["doomtrigger"]) then |
||
292 | self:TriggerEvent("BigWigs_SendSync", "LoathebDoom2 "..tostring(self.doomCount + 1)) |
||
293 | end |
||
294 | end |
||
295 | |||
296 | function BigWigsLoatheb:CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF( msg ) |
||
297 | if msg == L["sporespawntrigger"] then |
||
298 | self:TriggerEvent("BigWigs_SendSync", "LoathebSporeSpawn2 "..tostring(self.sporeCount + 1)) |
||
299 | elseif msg == L["removecursetrigger"] then |
||
300 | self:TriggerEvent("BigWigs_SendSync", "LoathebRemoveCurse") |
||
301 | end |
||
302 | end |
||
303 |