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")["Razorgore the Untamed"] |
||
6 | local controller = AceLibrary("Babble-Boss-2.2")["Grethok the Controller"] |
||
7 | local L = AceLibrary("AceLocale-2.2"):new("BigWigs"..boss) |
||
8 | local eggs |
||
9 | |||
10 | ---------------------------- |
||
11 | -- Localization -- |
||
12 | ---------------------------- |
||
13 | |||
14 | L:RegisterTranslations("enUS", function() return { |
||
15 | cmd = "Razorgore", |
||
16 | |||
17 | start_trigger = "Intruders have breached", |
||
18 | start_message = "Razorgore engaged! Mobs in 45sec!", |
||
19 | start_soon = "Mob Spawn in 5sec!", |
||
20 | start_mob = "Mob Spawn", |
||
21 | |||
22 | mindcontrol_trigger = "Foolish ([^%s]+).", |
||
23 | mindcontrol_message = "%s has been mind controlled!", |
||
24 | |||
25 | egg_trigger = "casts Destroy Egg", |
||
26 | egg_message = "%d/30 eggs destroyed!", |
||
27 | |||
28 | phase2_trigger = "Razorgore the Untamed's Warming Flames heals Razorgore the Untamed for .*.", |
||
29 | phase2_message = "All eggs destroyed, Razorgore loose!", |
||
30 | |||
31 | mc_cmd = "mindcontrol", |
||
32 | mc_name = "Mind Control", |
||
33 | mc_desc = "Warn when players are mind controlled", |
||
34 | |||
35 | eggs_cmd = "eggs", |
||
36 | eggs_name = "Don't count eggs", |
||
37 | eggs_desc = "Don't count down the remaining eggs - this option does not work for everyone, we need better triggers.", |
||
38 | |||
39 | phase_cmd = "phase", |
||
40 | phase_name = "Phases", |
||
41 | phase_desc = "Alert on phase 1 and 2", |
||
42 | } end) |
||
43 | |||
44 | L:RegisterTranslations("koKR", function() return { |
||
45 | |||
46 | start_trigger = "침입자들이 들어왔다! 어떤 희생이 있더라도 알을 반드시 수호하라!", -- By turtl |
||
47 | start_message = "폭군 서슬송곳니 전투 시작", |
||
48 | start_soon = "Mob Spawn in 5sec!", |
||
49 | start_mob = "Mob Spawn", |
||
50 | |||
51 | mindcontrol_trigger = "자! ([^%s]+), 이제부터 나를 섬겨라!", -- By turtl |
||
52 | mindcontrol_message = "<<%s>> 정신 지배 되었습니다.", |
||
53 | |||
54 | egg_trigger = "폭군 서슬송곳니|1이;가; 알 파괴|1을;를; 시전합니다.", -- By turtl |
||
55 | egg_message = "%d/30 알을 파괴하였습니다.", |
||
56 | |||
57 | phase2_trigger = "Razorgore the Untamed's Warming Flames heals Razorgore the Untamed for .*.", -- CHECK |
||
58 | phase2_message = "모든 알이 파괴되었습니다, 서슬송곳니가 풀려납니다.", -- CHECK |
||
59 | |||
60 | mc_name = "정신 지배", |
||
61 | mc_desc = "플레이어가 정신 지배 되었을 때 경고", |
||
62 | |||
63 | eggs_name = "알 개수 알림 미사용", |
||
64 | eggs_desc = "남은 알 개수 알림 미사용", |
||
65 | |||
66 | phase_name = "단계", |
||
67 | phase_desc = "단계 1 과 2 알림", |
||
68 | } end) |
||
69 | |||
70 | L:RegisterTranslations("deDE", function() return { |
||
71 | start_trigger = "Eindringlinge sind in die", |
||
72 | start_message = "Razorgore angegriffen!", |
||
73 | start_soon = "Mob Spawn in 5sec!", |
||
74 | start_mob = "Mob Spawn", |
||
75 | |||
76 | mindcontrol_trigger = "^([^%s]+), Ihr Narr, Ihr dient jetzt mir!", |
||
77 | mindcontrol_message = "%s wurde \195\188bernommen!", |
||
78 | |||
79 | egg_trigger = "Razorgore der Ungez\195\164hmte wirkt Ei zerst\195\182ren.", |
||
80 | egg_message = "%d/30 Eier zerst\195\182rt!", |
||
81 | |||
82 | phase2_trigger = "Razorgore the Untamed's Warming Flames heals Razorgore the Untamed for .*.", -- ? |
||
83 | phase2_message = "Alle Eier zerst\195\182rt!", |
||
84 | |||
85 | mc_name = "Gedankenkontrolle", |
||
86 | mc_desc = "Warnung, wenn Spieler \195\188bernommen werden.", |
||
87 | |||
88 | eggs_name = "Eier nicht z\195\164hlen", |
||
89 | eggs_desc = "Die zerst\195\182rten Eier nicht z\195\164hlen.", |
||
90 | |||
91 | phase_name = "Phasen", |
||
92 | phase_desc = "Warnung beim Eintritt in Phase 1 und 2.", |
||
93 | } end) |
||
94 | |||
95 | L:RegisterTranslations("frFR", function() return { |
||
96 | start_trigger = "Sonnez l'alarme", |
||
97 | start_message = "Tranchetripe engag\195\169 ! 45 secondes avant l'arriv\195\169e des gardes !", |
||
98 | start_soon = "Arriv\195\169e des gardes dans 5 secondes !", |
||
99 | start_mob = "Arriv\195\169e des gardes", |
||
100 | |||
101 | mindcontrol_trigger = "Stupide ([^%s]+), tu es mon esclave maintenant !", |
||
102 | mindcontrol_message = "%s est sous Contr\195\180le mental !", |
||
103 | |||
104 | egg_trigger = "Tranchetripe l'Indompt\195\169 lance D\195\169truire (.*)%.", |
||
105 | egg_message = "%d oeufs sur 30 d\195\169truits !", |
||
106 | |||
107 | phase2_trigger = "Flammes \195\169chauffantes .+ Tranchetripe l'Indompt\195\169 gu\195\169rit Tranchetripe l'Indompt\195\169 de .*%.", |
||
108 | phase2_message = "Tous les oeufs ont \195\169t\195\169 d\195\169truits !", |
||
109 | |||
110 | mc_name = "Alerte Contr\195\180le mental", |
||
111 | mc_desc = "Pr\195\169viens quand un joueur subit subit un contr\195\180le mental.", |
||
112 | |||
113 | eggs_name = "Ne pas compter les oeufs", |
||
114 | eggs_desc = "Ne compte pas le nombre d'oeufs restants - cette option ne fonctionne pas chez tout le monde, un meilleur d\195\169clencheur doit \195\170tre trouv\195\169.", |
||
115 | |||
116 | phase_name = "Alerte Phases", |
||
117 | phase_desc = "Pr\195\169viens de l'arriv\195\169e des phases 1 & 2.", |
||
118 | } end) |
||
119 | |||
120 | L:RegisterTranslations("zhCN", function() return { |
||
121 | |||
122 | start_trigger = "入侵者", |
||
123 | start_message = "狂野的拉佐格尔 战斗开始!", |
||
124 | start_soon = "Mob Spawn in 5sec!", |
||
125 | start_mob = "Mob Spawn", |
||
126 | |||
127 | mindcontrol_trigger = "愚蠢的(.+)", |
||
128 | mindcontrol_message = "%s被精神控制!", |
||
129 | |||
130 | egg_trigger = "狂野的拉佐格尔施放了(.+)", |
||
131 | egg_message = "%d/30 龙蛋已经摧毁", |
||
132 | |||
133 | phase2_trigger = "狂野的拉佐格尔的温暖之焰为狂野的拉佐格尔恢复了.*点生命值。", |
||
134 | phase2_message = "所有龙蛋摧毁", |
||
135 | |||
136 | mc_name = "精神控制", |
||
137 | mc_desc = "当一个玩家使用精神控制时向团队发出警报。", |
||
138 | |||
139 | eggs_name = "取消龙蛋计数", |
||
140 | eggs_desc = "取消剩余龙蛋计数 - 该功能还在完善中。。。", |
||
141 | |||
142 | phase_name = "第二阶段警报", |
||
143 | phase_desc = "第二阶段警报", |
||
144 | } end) |
||
145 | |||
146 | L:RegisterTranslations("zhTW", function() return { |
||
147 | -- Razorgore 狂野的拉佐格爾 |
||
148 | start_trigger = "入侵者", |
||
149 | start_message = "狂野的拉佐格爾進入戰鬥!", |
||
150 | start_soon = "Mob Spawn in 5sec!", |
||
151 | start_mob = "Mob Spawn", |
||
152 | |||
153 | mindcontrol_trigger = "愚蠢的(.+),", |
||
154 | mindcontrol_message = "%s 被心靈控制", |
||
155 | |||
156 | egg_trigger = "狂野的拉佐格爾施放了摧毀蛋。", |
||
157 | egg_message = "已摧毀 %d/30 個龍蛋!", |
||
158 | |||
159 | phase2_trigger = "狂野的拉佐格爾的溫暖之焰為狂野的拉佐格爾恢復了.*點生命力。", |
||
160 | phase2_message = "已摧毀所有龍蛋", |
||
161 | |||
162 | mc_name = "精神控制", |
||
163 | mc_desc = "當一個玩家使用精神控制時向團隊發出警報。", |
||
164 | |||
165 | eggs_name = "取消龍蛋計數", |
||
166 | eggs_desc = "取消剩餘龍蛋計數 - 該功能還在改善中。。。", |
||
167 | |||
168 | phase_name = "第二階段警報", |
||
169 | phase_desc = "第二階段警報", |
||
170 | } end) |
||
171 | |||
172 | ---------------------------------- |
||
173 | -- Module Declaration -- |
||
174 | ---------------------------------- |
||
175 | |||
176 | BigWigsRazorgore = BigWigs:NewModule(boss) |
||
177 | BigWigsRazorgore.zonename = AceLibrary("Babble-Zone-2.2")["Blackwing Lair"] |
||
178 | BigWigsRazorgore.enabletrigger = { boss, controller } |
||
179 | BigWigsRazorgore.toggleoptions = { "mc", "eggs", "phase", "bosskill" } |
||
180 | BigWigsRazorgore.revision = tonumber(string.sub("$Revision: 17555 $", 12, -3)) |
||
181 | |||
182 | ------------------------------ |
||
183 | -- Initialization -- |
||
184 | ------------------------------ |
||
185 | |||
186 | function BigWigsRazorgore:OnEnable() |
||
187 | eggs = 0 |
||
188 | |||
189 | self:RegisterEvent("CHAT_MSG_MONSTER_YELL") |
||
190 | self:RegisterEvent("CHAT_MSG_SPELL_FRIENDLYPLAYER_BUFF") |
||
191 | self:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH", "GenericBossDeath") |
||
192 | |||
193 | self:RegisterEvent("BigWigs_RecvSync") |
||
194 | self:TriggerEvent("BigWigs_ThrottleSync", "RazorgoreEgg", 8) |
||
195 | end |
||
196 | |||
197 | ------------------------------ |
||
198 | -- Event Handlers -- |
||
199 | ------------------------------ |
||
200 | |||
201 | function BigWigsRazorgore:CHAT_MSG_MONSTER_YELL(msg) |
||
202 | if string.find(msg, L["start_trigger"]) then |
||
203 | if self.db.profile.phase then |
||
204 | self:TriggerEvent("BigWigs_Message", L["start_message"], "Urgent") |
||
205 | self:TriggerEvent("BigWigs_StartBar", self, L["start_mob"], 45, "Interface\\Icons\\Spell_Holy_PrayerOfHealing") |
||
206 | self:ScheduleEvent("BigWigs_Message", 40, L["start_soon"], "Important") |
||
207 | end |
||
208 | eggs = 0 |
||
209 | elseif self.db.profile.mc then |
||
210 | local _, _, player = string.find(msg, L["mindcontrol_trigger"]); |
||
211 | if player then |
||
212 | self:TriggerEvent("BigWigs_Message", string.format(L["mindcontrol_message"], player), "Important") |
||
213 | end |
||
214 | end |
||
215 | end |
||
216 | |||
217 | function BigWigsRazorgore:CHAT_MSG_SPELL_FRIENDLYPLAYER_BUFF(msg) |
||
218 | if string.find(msg, L["egg_trigger"]) then |
||
219 | self:TriggerEvent("BigWigs_SendSync", "RazorgoreEgg "..tostring(eggs + 1)) |
||
220 | end |
||
221 | end |
||
222 | |||
223 | function BigWigsRazorgore:BigWigs_RecvSync(sync, rest) |
||
224 | if sync ~= "RazorgoreEgg" or not rest then return end |
||
225 | rest = tonumber(rest) |
||
226 | |||
227 | if rest == (eggs + 1) then |
||
228 | eggs = eggs + 1 |
||
229 | if not self.db.profile.eggs then |
||
230 | self:TriggerEvent("BigWigs_Message", string.format(L["egg_message"], eggs), "Positive") |
||
231 | end |
||
232 | |||
233 | if eggs == 30 and self.db.profile.phase then |
||
234 | self:TriggerEvent("BigWigs_Message", L["phase2_message"], "Important") |
||
235 | end |
||
236 | end |
||
237 | end |
||
238 |