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")["Gluth"]
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 = "Gluth",
16  
17 fear_cmd = "fear",
18 fear_name = "Fear Alert",
19 fear_desc = "Warn for fear",
20  
21 frenzy_cmd = "frenzy",
22 frenzy_name = "Frenzy Alert",
23 frenzy_desc = "Warn for frenzy",
24  
25 decimate_cmd = "decimate",
26 decimate_name = "Decimate Alert",
27 decimate_desc = "Warn for Decimate",
28  
29 trigger1 = "%s goes into a frenzy!",
30 trigger2 = "by Terrifying Roar.",
31 starttrigger = "devours all nearby zombies!",
32  
33 warn1 = "Frenzy Alert!",
34 warn2 = "5 second until AoE Fear!",
35 warn3 = "AoE Fear alert - 20 seconds till next!",
36  
37 startwarn = "Gluth Engaged! ~105 seconds till Zombies!",
38 decimatesoonwarn = "Decimate Soon!",
39 decimatewarn = "Decimate!",
40 decimatetrigger = "Decimate",
41  
42 bar1text = "AoE Fear",
43 decimatebartext = "Decimate Zombies",
44 } end )
45  
46 L:RegisterTranslations("koKR", function() return {
47  
48 fear_name = "공포 경고",
49 fear_desc = "공포에 대한 경고",
50  
51 frenzy_name = "광폭화 경고",
52 frenzy_desc = "광폭화에 대한 경고",
53  
54 decimate_name = "척살 경보",
55 decimate_desc = "척살에 대한 경고",
56  
57 trigger1 = "%s|1이;가; 광란의 상태에 빠집니다!", -- CHECK
58 trigger2 = "공포의 포효에",
59 starttrigger = "주위의 모든 좀비|1을;를; 먹어치웁니다!", -- CHECK (not used)
60  
61 warn1 = "광폭화 경고!",
62 warn2 = "광역 공포 5초 전!",
63 warn3 = "광역 공포 경고 - 20초 후",
64  
65 startwarn = "글루스 전투 시작! 약 105초 후 좀비!",
66 decimatesoonwarn = "곧 척살!",
67 decimatewarn = "척살!",
68 decimatetrigger = "척살",
69  
70 bar1text = "광역 공포",
71 decimatebartext = "척살 좀비",
72 } end )
73  
74 L:RegisterTranslations("deDE", function() return {
75 fear_name = "Furcht",
76 fear_desc = "Warnung vor AoE Furcht.",
77  
78 frenzy_name = "Raserei",
79 frenzy_desc = "Warnung, wenn Gluth in Raserei ger\195\164t",
80  
81 decimate_name = "Dezimieren", -- ?
82 decimate_desc = "Warnung vor Dezimieren", -- ?
83  
84 trigger1 = "%s ger\195\164t in Raserei!",
85 trigger2 = "von Erschreckendes Gebr\195\188ll betroffen.",
86 starttrigger = "devours all nearby zombies!", -- ?
87  
88 warn1 = "Raserei!",
89 warn2 = "5 Sekunden bis AoE Furcht!",
90 warn3 = "AoE Furcht - N\195\164chste in 20 Sekunden!",
91  
92 startwarn = "Gluth angegriffen! ~105 Sekunden bis Zombies!",
93 decimatesoonwarn = "Dezimieren kurz bevor",
94 decimatewarn = "Dezimieren! - AoE Zombies!",
95 decimatetrigger = "Decimate", -- ?
96  
97 bar1text = "Furcht",
98 decimatebartext = "Dezimieren", -- ?
99 } end )
100  
101 L:RegisterTranslations("zhCN", function() return {
102 fear_name = "恐惧警报",
103 fear_desc = "恐惧警报",
104  
105 frenzy_name = "狂暴警报",
106 frenzy_desc = "狂暴警报",
107  
108 decimate_name = "残杀警报",
109 decimate_desc = "残杀警报",
110  
111 trigger1 = "%s变得狂怒无比!",
112 trigger2 = "恐惧怒吼",
113 starttrigger = "吞吃了周围所有的僵尸!",
114  
115 warn1 = "狂暴警报 - 猎人立刻使用宁神射击!",
116 warn2 = "5秒后发动群体恐惧!",
117 warn3 = "群体恐惧 - 20秒后再次发动",
118  
119 startwarn = "格拉斯已激活,~105秒后僵尸出现!",
120 decimatesoonwarn = "残杀来临!",
121 decimatewarn = "残杀 - AoE僵尸!",
122 decimatetrigger = "残杀",
123  
124 bar1text = "群体恐惧",
125 decimatebartext = "残杀",
126 } end )
127  
128 L:RegisterTranslations("zhTW", function() return {
129 -- Gluth 古魯斯
130 fear_name = "恐懼警報",
131 fear_desc = "當古魯斯施放群體恐懼時發出警報",
132  
133 frenzy_name = "狂暴警報",
134 frenzy_desc = "當古魯斯狂暴時發出警報",
135  
136 decimate_name = "屠殺警報",
137 decimate_desc = "當古魯斯屠殺時發出警報",
138  
139 trigger1 = "變得狂暴起來!",
140 trigger2 = "恐嚇咆哮",
141 starttrigger = "毀滅所有附近的蛇神!",
142  
143 warn1 = "狂暴警報 - 獵人立刻使用寧神射擊!",
144 warn2 = "5 秒後發動群體恐懼!",
145 warn3 = "群體恐懼 - 20 秒後再次發動",
146  
147 startwarn = "古魯斯已進入戰鬥 - 105 秒後僵屍出現!",
148 decimatesoonwarn = "屠殺來臨!",
149 decimatewarn = "屠殺 - AE僵屍!",
150 decimatetrigger = "屠殺",
151  
152 bar1text = "群體恐懼",
153 decimatebartext = "屠殺",
154 } end )
155  
156 L:RegisterTranslations("frFR", function() return {
157 trigger1 = "%s gagne Fr\195\169n\195\169sie.",
158 trigger2 = "de Rugissement terrifiant.",
159 starttrigger = "d\195\169vore tous les zombies aux alentours !",
160 decimatetrigger = "D\195\169cimer",
161 } end )
162  
163  
164 ----------------------------------
165 -- Module Declaration --
166 ----------------------------------
167  
168 BigWigsGluth = BigWigs:NewModule(boss)
169 BigWigsGluth.zonename = AceLibrary("Babble-Zone-2.2")["Naxxramas"]
170 BigWigsGluth.enabletrigger = boss
171 BigWigsGluth.toggleoptions = {"frenzy", "fear", "decimate", "bosskill"}
172 BigWigsGluth.revision = tonumber(string.sub("$Revision: 15380 $", 12, -3))
173  
174 ------------------------------
175 -- Initialization --
176 ------------------------------
177  
178 -- XXX Need to add a timer bar for berserker rage.
179 -- XXX It happens some time after the 3rd decimate, but it's probably on a
180 -- XXX fixed timer, so just make it a bar like the Twins@AQ40 enrage timer.
181  
182 function BigWigsGluth:OnEnable()
183 self.prior = nil
184 started = nil
185  
186 self:RegisterEvent("BigWigs_Message")
187  
188 self:RegisterEvent("PLAYER_REGEN_ENABLED", "CheckForWipe")
189 self:RegisterEvent("PLAYER_REGEN_DISABLED", "CheckForEngage")
190  
191 self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_CREATURE_BUFFS", "Frenzy")
192 self:RegisterEvent("CHAT_MSG_MONSTER_EMOTE", "Frenzy")
193  
194 self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_PARTY_DAMAGE", "Fear")
195 self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_SELF_DAMAGE", "Fear")
196 self:RegisterEvent("CHAT_MSG_SPELL_PERIODIC_FRIENDLYPLAYER_DAMAGE", "Fear")
197  
198 self:RegisterEvent("CHAT_MSG_COMBAT_HOSTILE_DEATH", "GenericBossDeath")
199  
200 self:RegisterEvent("CHAT_MSG_SPELL_CREATURE_VS_SELF_DAMAGE", "Decimate")
201  
202 self:RegisterEvent("BigWigs_RecvSync")
203 self:TriggerEvent("BigWigs_ThrottleSync", "GluthDecimate", 30)
204 end
205  
206 function BigWigsGluth:Frenzy( msg )
207 if self.db.profile.frenzy and msg == L["trigger1"] then
208 self:TriggerEvent("BigWigs_Message", L["warn1"], "Important")
209 end
210 end
211  
212 function BigWigsGluth:Fear( msg )
213 if self.db.profile.fear and not self.prior and string.find(msg, L["trigger2"]) then
214 self:TriggerEvent("BigWigs_Message", L["warn3"], "Important")
215 self:TriggerEvent("BigWigs_StartBar", self, L["bar1text"], 20, "Interface\\Icons\\Spell_Shadow_PsychicScream")
216 self:ScheduleEvent("BigWigs_Message", 15, L["warn2"], "Urgent")
217 self.prior = true
218 end
219 end
220  
221 function BigWigsGluth:Decimate( msg )
222 if string.find(msg, L["decimatetrigger"]) then
223 self:TriggerEvent("BigWigs_SendSync", "GluthDecimate")
224 end
225 end
226  
227 function BigWigsGluth:BigWigs_RecvSync( sync, rest, nick )
228 if sync == "GluthDecimate" and self.db.profile.decimate then
229 self:TriggerEvent("BigWigs_Message", L["decimatewarn"], "Important")
230 self:TriggerEvent("BigWigs_StartBar", self, L["decimatebartext"], 105, "Interface\\Icons\\INV_Shield_01")
231 self:ScheduleEvent("BigWigs_Message", 100, L["decimatesoonwarn"], "Urgent")
232 elseif sync == self:GetEngageSync() and rest and rest == boss and not started then
233 started = true
234 if self:IsEventRegistered("PLAYER_REGEN_DISABLED") then self:UnregisterEvent("PLAYER_REGEN_DISABLED") end
235 if self.db.profile.decimate then
236 self:TriggerEvent("BigWigs_Message", L["startwarn"], "Attention")
237 self:TriggerEvent("BigWigs_StartBar", self, L["decimatebartext"], 105, "Interface\\Icons\\INV_Shield_01")
238 self:ScheduleEvent("BigWigs_Message", 100, L["decimatesoonwarn"], "Urgent")
239 end
240 end
241 end
242  
243 function BigWigsGluth:BigWigs_Message(text)
244 if text == L["warn2"] then self.prior = nil end
245 end
246