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")["Grobbulus"] |
||
6 | local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss) |
||
7 | |||
8 | local started |
||
9 | |||
10 | ---------------------------- |
||
11 | -- Localization -- |
||
12 | ---------------------------- |
||
13 | |||
14 | L:RegisterTranslations("enUS", function() return { |
||
15 | cmd = "Grobbulus", |
||
16 | |||
17 | enrage_cmd = "enrage", |
||
18 | enrage_name = "Enrage Alert", |
||
19 | enrage_desc = "Warn for Enrage", |
||
20 | |||
21 | youinjected_cmd = "youinjected", |
||
22 | youinjected_name = "You're injected Alert", |
||
23 | youinjected_desc = "Warn when you're injected", |
||
24 | |||
25 | otherinjected_cmd = "otherinjected", |
||
26 | otherinjected_name = "Others injected Alert", |
||
27 | otherinjected_desc = "Warn when others are injected", |
||
28 | |||
29 | icon_cmd = "icon", |
||
30 | icon_name = "Place Icon", |
||
31 | icon_desc = "Place a skull icon on an injected person. (Requires promoted or higher)", |
||
32 | |||
33 | cloud_cmd = "cloud", |
||
34 | cloud_name = "Poison Cloud", |
||
35 | cloud_desc = "Warn for Poison Clouds", |
||
36 | |||
37 | inject_trigger = "^([^%s]+) ([^%s]+) afflicted by Mutating Injection", |
||
38 | |||
39 | you = "You", |
||
40 | are = "are", |
||
41 | |||
42 | startwarn = "Grobbulus engaged, 12min to enrage!", |
||
43 | enragebar = "Enrage", |
||
44 | enrage10min = "Enrage in 10min", |
||
45 | enrage5min = "Enrage in 5min", |
||
46 | enrage1min = "Enrage in 1min", |
||
47 | enrage30sec = "Enrage in 30sec", |
||
48 | enrage10sec = "Enrage in 10sec", |
||
49 | bomb_message_you = "You are injected!", |
||
50 | bomb_message_other = "%s is injected!", |
||
51 | bomb_bar = "%s injected", |
||
52 | |||
53 | cloud_trigger = "Grobbulus casts Poison Cloud.", |
||
54 | cloud_warn = "Poison Cloud next in ~15 seconds!", |
||
55 | cloud_bar = "Poison Cloud", |
||
56 | |||
57 | } end ) |
||
58 | |||
59 | L:RegisterTranslations("deDE", function() return { |
||
60 | enrage_name = "Wutanfall", |
||
61 | enrage_desc = "Warnung, wenn Grobbulus w\195\188tend wird.", |
||
62 | |||
63 | youinjected_name = "Du bist verseucht", |
||
64 | youinjected_desc = "Warnung, wenn Du von Mutagene Injektion betroffen bist.", |
||
65 | |||
66 | otherinjected_name = "X ist verseucht", |
||
67 | otherinjected_desc = "Warnung, wenn andere Spieler von Mutagene Injektion betroffen sind.", |
||
68 | |||
69 | icon_cmd = "icon", |
||
70 | icon_name = "Symbol", |
||
71 | icon_desc = "Platziert ein Symbol \195\188ber dem Spieler, der von Mutagene Injektion betroffen ist. (Ben\195\182tigt Anf\195\188hrer oder Bef\195\182rdert Status.)", |
||
72 | |||
73 | inject_trigger = "^([^%s]+) ([^%s]+) von Mutagene Injektion betroffen", |
||
74 | |||
75 | you = "Ihr", |
||
76 | are = "seid", |
||
77 | |||
78 | startwarn = "Grobbulus angegriffen! 12 Minuten bis Wutanfall!", |
||
79 | enragebar = "Wutanfall", |
||
80 | enrage10min = "Wutanfall in 10 Minuten!", |
||
81 | enrage5min = "Wutanfall in 5 Minuten!", |
||
82 | enrage1min = "Wutanfall in 1 Minute!", |
||
83 | enrage30sec = "Wutanfall in 30 Sekunden!", |
||
84 | enrage10sec = "Wutanfall in 10 Sekunden!", |
||
85 | |||
86 | bomb_message_you = "Du bist verseucht!", |
||
87 | bomb_message_other = "%s ist verseucht!", |
||
88 | } end ) |
||
89 | |||
90 | L:RegisterTranslations("koKR", function() return { |
||
91 | |||
92 | enrage_name = "격노 경고", |
||
93 | enrage_desc = "격노에 대한 경고", |
||
94 | |||
95 | youinjected_name = "자신의 돌연변이 경고", |
||
96 | youinjected_desc = "자신이 돌연변이 시 경고", |
||
97 | |||
98 | otherinjected_name = "타인의 돌연변이 경고", |
||
99 | otherinjected_desc = "타인이 돌연변이 시 경고", |
||
100 | |||
101 | icon_name = "아이콘 지정", |
||
102 | icon_desc = "돌연변이 걸린 사람에게 아이콘 지정 (승급자 이상 요구)", |
||
103 | |||
104 | cloud_name = "독구름", |
||
105 | cloud_desc = "독구름에 대한 경고", |
||
106 | |||
107 | inject_trigger = "^([^|;%s]*)(.*)돌연변이 유발에 걸렸습니다%.$", --"(.*)돌연변이 유발에 걸렸습니다.", |
||
108 | |||
109 | you = "", |
||
110 | are = "", |
||
111 | |||
112 | startwarn = "그라불루스 전투 시작, 12분 후 격노!", |
||
113 | enragebar = "격노", |
||
114 | enrage10min = "10분 후 격노!", |
||
115 | enrage5min = "5분 후 격노!", |
||
116 | enrage1min = "1분 후 격노!", |
||
117 | enrage30sec = "30초 후 격노!", |
||
118 | enrage10sec = "10초 후 격노", |
||
119 | bomb_message_you = "당신은 돌연변이 유발에 걸렸습니다.", |
||
120 | bomb_message_other = "%s 님이 돌연변이 유발에 걸렸습니다.", |
||
121 | bomb_bar = "%s 돌연변이", |
||
122 | } end ) |
||
123 | |||
124 | L:RegisterTranslations("zhCN", function() return { |
||
125 | enrage_name = "激怒警报", |
||
126 | enrage_desc = "激怒警报", |
||
127 | |||
128 | youinjected_name = "玩家变异注射警报", |
||
129 | youinjected_desc = "你中了变异注射时发出警报", |
||
130 | |||
131 | otherinjected_name = "队友变异注射警报", |
||
132 | otherinjected_desc = "队友中了变异注射时发出警报", |
||
133 | |||
134 | icon_name = "标记图标", |
||
135 | icon_desc = "在中了变异注射的队友头上标记骷髅图标(需要助理或领袖权限)", |
||
136 | |||
137 | inject_trigger = "^(.+)受(.+)了变异注射", |
||
138 | |||
139 | you = "你", |
||
140 | are = "到", |
||
141 | |||
142 | startwarn = "格罗布鲁斯激活,12分钟后进入激怒状态!", |
||
143 | enragebar = "激怒", |
||
144 | enrage10min = "10分钟后激怒", |
||
145 | enrage5min = "5分钟后激怒", |
||
146 | enrage1min = "1分钟后激怒", |
||
147 | enrage30sec = "30秒后激怒", |
||
148 | enrage10sec = "10秒后激怒", |
||
149 | bomb_message_you = "你中变异注射了!", |
||
150 | bomb_message_other = "%s中变异注射了!", |
||
151 | bomb_bar = "%s被变异注射", |
||
152 | } end ) |
||
153 | |||
154 | L:RegisterTranslations("zhTW", function() return { |
||
155 | --Grobbulus 葛羅巴斯 |
||
156 | enrage_name = "狂怒警報", |
||
157 | enrage_desc = "狂怒警報", |
||
158 | |||
159 | youinjected_name = "突變注射警報", |
||
160 | youinjected_desc = "你中了突變注射時發出警報", |
||
161 | |||
162 | otherinjected_name = "隊友突變注射警報", |
||
163 | otherinjected_desc = "隊友中了突變注射時發出警報", |
||
164 | |||
165 | icon_name = "標記突變注射", |
||
166 | icon_desc = "在中了突變注射的隊友頭上標記骷髏標記(需要助理或領隊權限)", |
||
167 | |||
168 | inject_trigger = "^(.+)受到(.*)突變注射", |
||
169 | |||
170 | you = "你", |
||
171 | are = "了", |
||
172 | |||
173 | startwarn = "葛羅巴斯進入戰鬥 - 12 分鐘後進入狂怒狀態!", |
||
174 | enragebar = "狂怒", |
||
175 | enrage10min = "10 分鐘後狂怒", |
||
176 | enrage5min = "5 分鐘後狂怒", |
||
177 | enrage1min = "1 分鐘後狂怒", |
||
178 | enrage30sec = "30 秒後狂怒", |
||
179 | enrage10sec = "10 秒後狂怒", |
||
180 | bomb_message_you = "你中突變注射了!", |
||
181 | bomb_message_other = "%s 中突變注射了!", |
||
182 | bomb_bar = "%s 被突變注射", |
||
183 | } end ) |
||
184 | |||
185 | L:RegisterTranslations("frFR", function() return { |
||
186 | enrage_name = "Alerte Enrager", |
||
187 | enrage_desc = "Préviens régulièrement quand Grobbulus devient enragé.", |
||
188 | |||
189 | youinjected_name = "Alerte quand vous êtes injecté", |
||
190 | youinjected_desc = "Préviens quand vous êtes injecté.", |
||
191 | |||
192 | otherinjected_name = "Alerte quand les autres sont injectés", |
||
193 | otherinjected_desc = "Préviens quand les autres sont injectés.", |
||
194 | |||
195 | icon_name = "Placer une icône", |
||
196 | icon_desc = "Place une icône sur la personne injectée. (nécessite d'être promu ou mieux)", |
||
197 | |||
198 | cloud_name = "Nuage de poison", |
||
199 | cloud_desc = "Préviens quand Globbulus lance ses nuages de poison.", |
||
200 | |||
201 | inject_trigger = "^([^%s]+) ([^%s]+) les effets de Injection mutante.", |
||
202 | |||
203 | you = "Vous", |
||
204 | are = "subissez", |
||
205 | |||
206 | startwarn = "Grobbulus engagé, 12 min. avant Enrager !", |
||
207 | enragebar = "Enrager", |
||
208 | enrage10min = "Enrager dans 10 min.", |
||
209 | enrage5min = "Enrager dans 5 min.", |
||
210 | enrage1min = "Enrager dans 1 min.", |
||
211 | enrage30sec = "Enrager dans 30 sec.", |
||
212 | enrage10sec = "Enrager dans 10 sec.", |
||
213 | bomb_message_you = "Tu es injecté !", |
||
214 | bomb_message_other = "%s est injecté !", |
||
215 | bomb_bar = "%s injecté", |
||
216 | |||
217 | cloud_trigger = "Grobbulus lance Nuage de poison.", |
||
218 | cloud_warn = "Prochain nuage de poison dans ~15 sec. !", |
||
219 | cloud_bar = "Nuage de poison", |
||
220 | } end ) |
||
221 | |||
222 | |||
223 | ---------------------------------- |
||
224 | -- Module Declaration -- |
||
225 | ---------------------------------- |
||
226 | |||
227 | BigWigsGrobbulus = BigWigs:NewModule(boss) |
||
228 | BigWigsGrobbulus.zonename = AceLibrary("Babble-Zone-2.2")["Naxxramas"] |
||
229 | BigWigsGrobbulus.enabletrigger = boss |
||
230 | BigWigsGrobbulus.toggleoptions = { "youinjected", "otherinjected", "icon", "cloud", -1, "enrage", "bosskill" } |
||
231 | BigWigsGrobbulus.revision = tonumber(string.sub("$Revision: 15709 $", 12, -3)) |
||
232 | |||
233 | ------------------------------ |
||
234 | -- Initialization -- |
||
235 | ------------------------------ |
||
236 | |||
237 | function BigWigsGrobbulus:OnEnable() |
||
238 | started = nil |
||
239 | self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe") |
||
240 | self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage") |
||
241 | |||
242 | self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE", "InjectEvent") |
||
243 | self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE", "InjectEvent") |
||
244 | self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE", "InjectEvent") |
||
245 | |||
246 | self:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF") |
||
247 | |||
248 | self:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH", "GenericBossDeath") |
||
249 | |||
250 | self:RegisterEvent("BigWigs_RecvSync") |
||
251 | self:TriggerEvent("BigWigs_ThrottleSync", "GrobbulusInject", 3) |
||
252 | self:TriggerEvent("BigWigs_ThrottleSync", "GrobbulusCloud", 5) |
||
253 | end |
||
254 | |||
255 | ------------------------------ |
||
256 | -- Event Handlers -- |
||
257 | ------------------------------ |
||
258 | |||
259 | function BigWigsGrobbulus:BigWigs_RecvSync( sync, rest, nick ) |
||
260 | if sync == self:GetEngageSync() and rest and rest == boss and not started then |
||
261 | started = true |
||
262 | if self:IsEventRegistered("PLAYER_REGEN_DISABLED") then self:UnregisterEvent("PLAYER_REGEN_DISABLED") end |
||
263 | if self.db.profile.enrage then |
||
264 | self:TriggerEvent("BigWigs_Message", L["startwarn"], "Attention") |
||
265 | self:TriggerEvent("BigWigs_StartBar", self, L["enragebar"], 720, "Interface\\Icons\\INV_Shield_01") |
||
266 | self:ScheduleEvent("bwgrobbulusenragewarn1", "BigWigs_Message", 120, L["enrage10min"], "Attention") |
||
267 | self:ScheduleEvent("bwgrobbulusenragewarn2", "BigWigs_Message", 420, L["enrage5min"], "Urgent") |
||
268 | self:ScheduleEvent("bwgrobbulusenragewarn3", "BigWigs_Message", 660, L["enrage1min"], "Important") |
||
269 | self:ScheduleEvent("bwgrobbulusenragewarn4", "BigWigs_Message", 690, L["enrage30sec"], "Important") |
||
270 | self:ScheduleEvent("bwgrobbulusenragewarn5", "BigWigs_Message", 710, L["enrage10sec"], "Important") |
||
271 | end |
||
272 | elseif sync == "GrobbulusInject" and rest then |
||
273 | local player = rest |
||
274 | if self.db.profile.youinjected and player == UnitName("player") then |
||
275 | self:TriggerEvent("BigWigs_Message", L["bomb_message_you"], "Personal", true, "Alarm") |
||
276 | self:TriggerEvent("BigWigs_Message", string.format(L["bomb_message_other"], player), "Attention", nil, nil, true) |
||
277 | self:TriggerEvent("BigWigs_StartBar", self, string.format(L["bomb_bar"], player), 10,"Interface\\Icons\\Spell_Shadow_CallofBone") |
||
278 | elseif self.db.profile.otherinjected then |
||
279 | self:TriggerEvent("BigWigs_Message", string.format(L["bomb_message_other"], player), "Attention") |
||
280 | self:TriggerEvent("BigWigs_SendTell", player, L["bomb_message_you"]) |
||
281 | self:TriggerEvent("BigWigs_StartBar", self, string.format(L["bomb_bar"], player), 10,"Interface\\Icons\\Spell_Shadow_CallofBone") |
||
282 | end |
||
283 | if self.db.profile.icon then |
||
284 | self:TriggerEvent("BigWigs_SetRaidIcon", player) |
||
285 | end |
||
286 | elseif sync == "GrobbulusCloud" then |
||
287 | if self.db.profile.cloud then |
||
288 | self:TriggerEvent("BigWigs_Message", L["cloud_warn"], "Urgent") |
||
289 | self:TriggerEvent("BigWigs_StartBar", self, L["cloud_bar"], 15, "Interface\\Icons\\Ability_Creature_Disease_02") |
||
290 | end |
||
291 | end |
||
292 | end |
||
293 | |||
294 | function BigWigsGrobbulus:CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF( msg ) |
||
295 | if string.find( msg, L["cloud_trigger"] ) then |
||
296 | self:TriggerEvent("BigWigs_SendSync", "GrobbulusCloud") |
||
297 | end |
||
298 | end |
||
299 | |||
300 | function BigWigsGrobbulus:InjectEvent( msg ) |
||
301 | local _, _, eplayer, etype = string.find(msg, L["inject_trigger"]) |
||
302 | if eplayer and etype then |
||
303 | if eplayer == L["you"] and etype == L["are"] then |
||
304 | eplayer = UnitName("player") |
||
305 | end |
||
306 | self:TriggerEvent("BigWigs_SendSync", "GrobbulusInject "..eplayer) |
||
307 | end |
||
308 | end |
||
309 |