vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 ------------------------------
2 -- Are you local? --
3 ------------------------------
4  
5 local boss = AceLibrary("Babble-Boss-2.2")["Anubisath Guardian"]
6 local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss)
7  
8 ----------------------------
9 -- Localization --
10 ----------------------------
11  
12 L:RegisterTranslations("enUS", function() return {
13 cmd = "Guardian",
14  
15 summon_cmd = "summon",
16 summon_name = "Summon Alert",
17 summon_desc = "Warn for summoned adds",
18  
19 plagueyou_cmd = "plagueyou",
20 plagueyou_name = "Plague on you alert",
21 plagueyou_desc = "Warn for plague on you",
22  
23 plagueother_cmd = "plagueother",
24 plagueother_name = "Plague on others alert",
25 plagueother_desc = "Warn for plague on others",
26  
27 icon_cmd = "icon",
28 icon_name = "Place icon",
29 icon_desc = "Place raid icon on the last plagued person (requires promoted or higher)",
30  
31 explode_cmd = "explode",
32 explode_name = "Explode Alert",
33 explode_desc = "Warn for incoming explosion",
34  
35 enrage_cmd = "enrage",
36 enrage_name = "Enrage Alert",
37 enrage_desc = "Warn for enrage",
38  
39 explodetrigger = "Anubisath Guardian gains Explode.",
40 explodewarn = "Exploding!",
41 enragetrigger = "Anubisath Guardian gains Enrage.",
42 enragewarn = "Enraged!",
43 summonguardtrigger = "Anubisath Guardian casts Summon Anubisath Swarmguard.",
44 summonguardwarn = "Swarmguard Summoned",
45 summonwarriortrigger = "Anubisath Guardian casts Summon Anubisath Warrior.",
46 summonwarriorwarn = "Warrior Summoned",
47 plaguetrigger = "^([^%s]+) ([^%s]+) afflicted by Plague%.$",
48 plaguewarn = " has the Plague!",
49 plaguewarnyou = "You have the Plague!",
50 plagueyou = "You",
51 plagueare = "are",
52 } end )
53  
54 L:RegisterTranslations("deDE", function() return {
55 summon_name = "Beschw\195\182rung",
56 summon_desc = "Warnung, wenn Besch\195\188tzer des Anubisath Schwarmwachen oder Krieger beschw\195\182rt.",
57  
58 plagueyou_name = "Du hast die Seuche",
59 plagueyou_desc = "Warnung, wenn Du die Seuche hast.",
60  
61 plagueother_name = "X hat die Seuche",
62 plagueother_desc = "Warnung, wenn andere Spieler die Seuche haben.",
63  
64 icon_name = "Symbol",
65 icon_desc = "Platziert ein Symbol \195\188ber dem Spieler, der die Seuche hat. (Ben\195\182tigt Anf\195\188hrer oder Bef\195\182rdert Status.)",
66  
67 explode_name = "Explosion",
68 explode_desc = "Warnung vor Explosion.",
69  
70 enrage_name = "Wutanfall",
71 enrage_desc = "Warnung vor Wutanfall.",
72  
73 explodetrigger = "Besch\195\188tzer des Anubisath bekommt 'Explodieren'.",
74 explodewarn = "Explosion!",
75 enragetrigger = "Besch\195\188tzer des Anubisath bekommt 'Wutanfall'.",
76 enragewarn = "Wutanfall!",
77 summonguardtrigger = "Besch\195\188tzer des Anubisath wirkt Schwarmwache des Anubisath beschw\195\182ren.",
78 summonguardwarn = "Schwarmwache beschworen!",
79 summonwarriortrigger = "Besch\195\188tzer des Anubisath wirkt Krieger des Anubisath beschw\195\182ren.",
80 summonwarriorwarn = "Krieger beschworen!",
81 plaguetrigger = "^([^%s]+) ([^%s]+) von Seuche betroffen%.$",
82 plaguewarn = " hat die Seuche!",
83 plaguewarnyou = "Du hast die Seuche!",
84 plagueyou = "Ihr",
85 plagueare = "seid",
86 } end )
87  
88 L:RegisterTranslations("zhCN", function() return {
89 summon_name = "召唤警报",
90 summon_desc = "阿努比萨斯守卫者召唤增援时发出警报",
91  
92 plagueyou_name = "玩家瘟疫警报",
93 plagueyou_desc = "你中了瘟疫时发出警报",
94  
95 plagueother_name = "队友瘟疫警报",
96 plagueother_desc = "队友中了瘟疫时发出警报",
97  
98 explode_name = "爆炸警报",
99 explode_desc = "阿努比萨斯守卫者即将爆炸时发出警报",
100  
101 enrage_name = "狂怒警报",
102 enrage_desc = "阿努比萨斯守卫者进入狂怒状态时发出警报",
103  
104 explodetrigger = "阿努比萨斯守卫者获得了爆炸的效果。",
105 explodewarn = "即将爆炸!近战躲开!",
106 enragetrigger = "阿努比萨斯守卫者获得了狂怒的效果。",
107 enragewarn = "进入狂怒状态!",
108 summonguardtrigger = "阿努比萨斯守卫者施放了召唤阿努比萨斯虫群卫士。",
109 summonguardwarn = "虫群卫士已被召唤出来",
110 summonwarriortrigger = "阿努比萨斯守卫者施放了召唤阿努比萨斯战士。",
111 summonwarriorwarn = "阿努比萨斯战士已被召唤出来",
112 plaguetrigger = "^(.+)受(.+)了瘟疫效果的影响。$",
113 plaguewarn = "受到瘟疫的影响!快躲开!",
114 plaguewarnyou = "你受到瘟疫的影响!快跑开!",
115 plagueyou = "你",
116 plagueare = "到",
117 } end )
118  
119 L:RegisterTranslations("zhTW", function() return {
120 -- Anubisath Guardian 阿努比薩斯守衛者
121 summon_name = "召喚警報",
122 summon_desc = "阿努比薩斯守衛者召喚增援時發出警報",
123  
124 plagueyou_name = "玩家瘟疫警報",
125 plagueyou_desc = "你中了瘟疫時發出警報",
126  
127 plagueother_name = "隊友瘟疫警報",
128 plagueother_desc = "隊友中了瘟疫時發出警報",
129  
130 explode_name = "爆炸警報",
131 explode_desc = "阿努比薩斯守衛者即將爆炸時發出警報",
132  
133 enrage_name = "狂怒警報",
134 enrage_desc = "阿努比薩斯守衛者進入狂怒狀態時發出警報",
135  
136 explodetrigger = "阿努比薩斯守衛者獲得了爆炸的效果。",
137 explodewarn = "即將爆炸!近戰躲開!",
138 enragetrigger = "阿努比薩斯守衛者獲得了狂怒的效果。",
139 enragewarn = "進入狂怒狀態!",
140 summonguardtrigger = "阿努比薩斯守衛者施放了召喚阿努比薩斯蟲群衛士。",
141 summonguardwarn = "蟲群衛士已被召喚出來!",
142 summonwarriortrigger = "阿努比薩斯守衛者施放了召喚阿努比薩斯戰士。",
143 summonwarriorwarn = "阿努比薩斯戰士已被召喚出來!",
144 plaguetrigger = "^(.+)受到(.*)瘟疫",
145 plaguewarn = "受到瘟疫的影響!快躲開!",
146 plaguewarnyou = "你受到瘟疫的影響!快跑開!",
147 plagueyou = "你",
148 plagueare = "了",
149 } end )
150  
151 L:RegisterTranslations("koKR", function() return {
152 summon_name = "소환 경고",
153 summon_desc = "추가 소환에 대한 경고",
154  
155 plagueyou_name = "자신의 역병 경고",
156 plagueyou_desc = "자신의 역병에 대한 경고",
157  
158 plagueother_name = "타인의 역병 경고",
159 plagueother_desc = "타인의 역병에 대한 경고",
160  
161 icon_name = "아이콘 지정",
162 icon_desc = "마지막 역병에 걸린 사람에게 공격대 아이콘 지정 (승급자 이상 요구)",
163  
164 explode_name = "폭발 경고",
165 explode_desc = "폭발에 대한 경고",
166  
167 enrage_name = "분노 경고",
168 enrage_desc = "분노에 대한 경고",
169  
170 explodetrigger = "아누비사스 감시자|1이;가; 폭파 효과를 얻었습니다.",
171 explodewarn = "폭파! 피하세요!",
172 enragetrigger = "아누비사스 감시자|1이;가; 분노 효과를 얻었습니다.",
173 enragewarn = "분노!",
174 summonguardtrigger = "아누비사스 감시자|1이;가; 아누비사스 감시병 소환|1을;를; 시전합니다.",
175 summonguardwarn = "감시병 소환",
176 summonwarriortrigger = "아누비사스 감시자|1이;가; 아누비사스 전사 소환|1을;를; 시전합니다.",
177 summonwarriorwarn = "전사 소환",
178 plaguetrigger = "^([^|;%s]*)(.*)역병에 걸렸습니다%.$",
179 plaguewarn = "님이 역병에 걸렸습니다. 피하세요!",
180 plaguewarnyou = "당신은 역병에 걸렸습니다.",
181 plagueyou = "",
182 plagueare = "",
183 } end )
184  
185 L:RegisterTranslations("frFR", function() return {
186  
187 summon_name = "Alerte invocation",
188 summon_desc = "Pr\195\169viens quand le gardien invoque des adds.",
189  
190 plagueyou_name = "Alerte Peste sur vous",
191 plagueyou_desc = "Pr\195\169viens quand vous avez la peste.",
192  
193 plagueother_name = "Alerte Peste sur d'autres",
194 plagueother_desc = "Pr\195\169viens quand d'autres joueurs ont la peste.",
195  
196 icon_name = "Placer une ic\195\180ne",
197 icon_desc = "Place une ic\195\180ne de raid sur le dernier personnage qui a la peste (requiert d'\195\170tre promus ou plus).",
198  
199 explode_name = "Alerte Explosion",
200 explode_desc = "Pr\195\169viens en cas d'explosion imminente.",
201  
202 enrage_name = "Alerte Enrag\195\169",
203 enrage_desc = "Pr\195\169viens quand le gardien s'enrage.",
204  
205 explodetrigger = "Gardien Anubisath gagne Exploser.",
206 explodewarn = "Explosion imminente !",
207 enragetrigger = "Gardien Anubisath gagne Enrager.",
208 enragewarn = "Enrag\195\169 !",
209 summonguardtrigger = "Gardien Anubisath lance Invocation d'un Garde-essaim Anubisath.",
210 summonguardwarn = "Garde-Essaim invoqu\195\169 !",
211 summonwarriortrigger = "Gardien Anubisath lance Invocation d'un Guerrier Anubisath.",
212 summonwarriorwarn = "Guerrier invoqu\195\169 !",
213 plaguetrigger = "^([^%s]+) ([^%s]+) les effets de Peste%.$",
214 plaguewarn = " a la peste !",
215 plaguewarnyou = "Tu as la peste !",
216 plagueyou = "Vous",
217 plagueare = "subissez",
218 } end )
219  
220 ----------------------------------
221 -- Module Declaration --
222 ----------------------------------
223  
224 BigWigsGuardians = BigWigs:NewModule(boss)
225 BigWigsGuardians.zonename = AceLibrary("Babble-Zone-2.2")["Ruins of Ahn'Qiraj"]
226 BigWigsGuardians.enabletrigger = boss
227 BigWigsGuardians.toggleoptions = {"summon", "explode", "enrage", -1, "plagueyou", "plagueother", "icon", "bosskill"}
228 BigWigsGuardians.revision = tonumber(string.sub("$Revision: 16639 $", 12, -3))
229  
230 ------------------------------
231 -- Initialization --
232 ------------------------------
233  
234 function BigWigsGuardians:OnEnable()
235 self:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH")
236 self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_BUFFS")
237 self:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF")
238 self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE", "CheckPlague")
239 self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE", "CheckPlague")
240 self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE", "CheckPlague")
241 end
242  
243 ------------------------------
244 -- Event Handlers --
245 ------------------------------
246  
247 function BigWigsGuardians:CHAT_MSG_COMBAT_HOSTILE_DEATH(msg)
248 if msg == string.format(UNITDIESOTHER, boss) then
249 self.core:ToggleModuleActive(self, false)
250 end
251 end
252  
253 function BigWigsGuardians:CHAT_MSG_SPELL_PERIODIC_CREATURE_BUFFS( msg )
254 if self.db.profile.explode and msg == L["explodetrigger"] then
255 self:TriggerEvent("BigWigs_Message", L["explodewarn"], "Important")
256 elseif self.db.profile.enrage and msg == L["enragetrigger"] then
257 self:TriggerEvent("BigWigs_Message", L["enragewarn"], "Important")
258 end
259 end
260  
261 function BigWigsGuardians:CHAT_MSG_SPELL_CREATURE_VS_CREATURE_BUFF( msg )
262 if self.db.profile.summon and msg == L["summonguardtrigger"] then
263 self:TriggerEvent("BigWigs_Message", L["summonguardwarn"], "Attention")
264 elseif self.db.profile.summon and msg == L["summonwarriortrigger"] then
265 self:TriggerEvent("BigWigs_Message", L["summonwarriorwarn"], "Attention")
266 end
267 end
268  
269 function BigWigsGuardians:CheckPlague( msg )
270 local _,_, player, type = string.find(msg, L["plaguetrigger"])
271 if player and type then
272 if self.db.profile.plagueyou and player == L["plagueyou"] and type == L["plagueare"] then
273 self:TriggerEvent("BigWigs_Message", L["plaguewarnyou"], "Personal", true)
274 self:TriggerEvent("BigWigs_Message", UnitName("player") .. L["plaguewarn"], "Attention", nil, nil, true )
275 elseif self.db.profile.plagueother then
276 self:TriggerEvent("BigWigs_Message", player .. L["plaguewarn"], "Attention")
277 self:TriggerEvent("BigWigs_SendTell", player, L["plaguewarnyou"])
278 end
279  
280 if self.db.profile.icon then
281 self:TriggerEvent("BigWigs_SetRaidIcon", player)
282 end
283 end
284 end
285