vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 assert( oRA, "oRA not found!")
2  
3 ------------------------------
4 -- Are you local? --
5 ------------------------------
6  
7 local L = AceLibrary("AceLocale-2.2"):new("oRAPBuff")
8  
9 local buffs = {
10 ["PowerWordFortitude"] = { 1, 1},
11 ["PrayerOfFortitude"] = {1, 2},
12 ["MarkOfTheWild"] = {2, 1},
13 ["GiftOfTheWild"] = {2, 2},
14 ["ArcaneIntellect"] = {3, 1},
15 ["ArcaneBrilliance"] = {3, 2},
16 -- 4 missing from CTRA as well.
17 ["ShadowProtection"] = {5, 1},
18 ["PrayerofShadowProtection"] = {5, 2},
19 ["PowerWordShield"] = {6, 0},
20 ["SoulstoneResurrection"] = {7, 0},
21 ["DivineSpirit"] = {8, 1},
22 ["PrayerOfSpirit"] = {8, 2},
23 ["Thorns"] = {9, 0},
24 ["FearWard"] = {10, 0},
25 ["BlessingOfMight"] = {11, 1},
26 ["GreaterBlessingOfMight"] = {11, 2},
27 ["BlessingOfWisdom"] = {12, 1},
28 ["GreaterBlessingOfWisdom"] = {12, 2},
29 ["BlessingOfKings"] = {13, 1},
30 ["GreaterBlessingOfKings"] = {13, 2},
31 ["BlessingOfSalvation"] = {14, 1},
32 ["GreaterBlessingOfSalvation"] = {14, 2},
33 ["BlessingOfLight"] = {15, 1},
34 ["GreaterBlessingOfLight"] = {15, 2},
35 ["BlessingOfSanctuary"] = {16, 1},
36 ["GreaterBlessingOfSanctuary"] = {16, 2},
37 ["Renew"] = {17, 0},
38 ["Rejuvenation"] = {18, 0},
39 ["Regrowth"] = {19, 0},
40 ["AmplifyMagic"] = {20, 0},
41 ["DampenMagic"] = {21, 0},
42 }
43  
44 ----------------------------
45 -- Localization --
46 ----------------------------
47  
48 L:RegisterTranslations("enUS", function() return {
49 ["buffparticipant"] = true,
50 ["Participant/Buff"] = true,
51 ["buff"] = true,
52 ["Buff"] = true,
53 ["Options for buffs."] = true,
54  
55 ["PowerWordFortitude"] = "Power Word: Fortitude",
56 ["PrayerOfFortitude"] = "Prayer of Fortitude",
57 ["GiftOfTheWild"] = "Gift of the Wild",
58 ["MarkOfTheWild"] = "Mark of the Wild",
59 ["ArcaneIntellect"] = "Arcane Intellect",
60 ["ArcaneBrilliance"] = "Arcane Brilliance",
61 ["ShadowProtection"] = "Shadow Protection",
62 ["PrayerofShadowProtection"] = "Prayer of Shadow Protection",
63 ["PowerWordShield"] = "Power Word: Shield",
64 ["SoulstoneResurrection"] = "Soulstone Resurrection",
65 ["DivineSpirit"] = "Divine Spirit",
66 ["PrayerOfSpirit"] = "Prayer of Spirit",
67 ["Thorns"] = "Thorns",
68 ["FearWard"] = "Fear Ward",
69 ["BlessingOfMight"] = "Blessing of Might",
70 ["GreaterBlessingOfMight"] = "Greater Blessing of Might",
71 ["BlessingOfWisdom"] = "Blessing of Wisdom",
72 ["GreaterBlessingOfWisdom"] = "Greater Blessing of Wisdom",
73 ["BlessingOfKings"] = "Blessing of Kings",
74 ["GreaterBlessingOfKings"] = "Greater Blessing of Kings",
75 ["BlessingOfSalvation"] = "Blessing of Salvation",
76 ["GreaterBlessingOfSalvation"] = "Greater Blessing of Salvation",
77 ["BlessingOfLight"] = "Blessing of Light",
78 ["GreaterBlessingOfLight"] = "Greater Blessing of Light",
79 ["BlessingOfSanctuary"] = "Blessing of Sanctuary",
80 ["GreaterBlessingOfSanctuary"] = "Greater Blessing of Sanctuary",
81 ["Renew"] = "Renew",
82 ["Rejuvenation"] = "Rejuvenation",
83 ["Regrowth"] = "Regrowth",
84 ["AmplifyMagic"] = "Amplify Magic",
85 ["DampenMagic"] = "Dampen Magic",
86 } end )
87  
88 L:RegisterTranslations("koKR", function() return {
89  
90 ["Participant/Buff"] = "부분/버프",
91 ["Buff"] = "버프",
92 ["Options for buffs."] = "버프 설정",
93  
94 ["PowerWordFortitude"] = "신의 권능: 인내",
95 ["PrayerOfFortitude"] = "인내의 기원",
96 ["GiftOfTheWild"] = "야생의 선물",
97 ["MarkOfTheWild"] = "야생의 징표",
98 ["ArcaneIntellect"] = "신비한 지능",
99 ["ArcaneBrilliance"] = "신비한 총명함",
100 ["ShadowProtection"] = "어둠의 보호",
101 ["PrayerofShadowProtection"] = "암흑 보호의 기원",
102 ["PowerWordShield"] = "신의 권능: 보호막",
103 ["SoulstoneResurrection"] = "영혼석 보관",
104 ["DivineSpirit"] = "천상의 정신",
105 ["PrayerOfSpirit"] = "정신력의 기원",
106 ["Thorns"] = "가시",
107 ["FearWard"] = "공포의 수호물",
108 ["BlessingOfMight"] = "힘의 축복",
109 ["GreaterBlessingOfMight"] = "상급 힘의 축복",
110 ["BlessingOfWisdom"] = "지혜의 축복",
111 ["GreaterBlessingOfWisdom"] = "상급 지혜의 축복",
112 ["BlessingOfKings"] = "왕의 축복",
113 ["GreaterBlessingOfKings"] = "상급 왕의 축복",
114 ["BlessingOfSalvation"] = "구원의 축복",
115 ["GreaterBlessingOfSalvation"] = "상급 구원의 축복",
116 ["BlessingOfLight"] = "빛의 축복",
117 ["GreaterBlessingOfLight"] = "상급 빛의 축복",
118 ["BlessingOfSanctuary"] = "성역의 축복",
119 ["GreaterBlessingOfSanctuary"] = "상급 성역의 축복",
120 ["Renew"] = "소생",
121 ["Rejuvenation"] = "회복",
122 ["Regrowth"] = "재생",
123 ["AmplifyMagic"] = "마법 증폭",
124 ["DampenMagic"] = "마법 감쇠",
125 } end )
126  
127 L:RegisterTranslations("zhCN", function() return {
128 ["buffparticipant"] = "buffparticipant",
129 ["Participant/Buff"] = "Participant/Buff",
130 ["buff"] = "buff",
131 ["Buff"] = "buff",
132 ["Options for buffs."] = "buff助手选项",
133  
134 ["PowerWordFortitude"] = "真言术:韧",
135 ["PrayerOfFortitude"] = "坚韧祷言",
136 ["GiftOfTheWild"] = "野性赐福",
137 ["MarkOfTheWild"] = "野性印记",
138 ["ArcaneIntellect"] = "奥术智慧",
139 ["ArcaneBrilliance"] = "奥术光辉",
140 ["ShadowProtection"] = "防护暗影",
141 ["PrayerofShadowProtection"] = "暗影防护祷言",
142 ["PowerWordShield"] = "真言术:盾",
143 ["SoulstoneResurrection"] = "灵魂石复活",
144 ["DivineSpirit"] = "神圣之灵",
145 ["PrayerOfSpirit"] = "精神祷言",
146 ["Thorns"] = "荆棘",
147 ["FearWard"] = "防护恐惧结界",
148 ["BlessingOfMight"] = "力量祝福",
149 ["GreaterBlessingOfMight"] = "强效力量祝福",
150 ["BlessingOfWisdom"] = "智慧祝福",
151 ["GreaterBlessingOfWisdom"] = "强效智慧祝福",
152 ["BlessingOfKings"] = "王者祝福",
153 ["GreaterBlessingOfKings"] = "强效王者祝福",
154 ["BlessingOfSalvation"] = "拯救祝福",
155 ["GreaterBlessingOfSalvation"] = "强效拯救祝福",
156 ["BlessingOfLight"] = "光明祝福",
157 ["GreaterBlessingOfLight"] = "强效光明祝福",
158 ["BlessingOfSanctuary"] = "庇护祝福",
159 ["GreaterBlessingOfSanctuary"] = "强效庇护祝福",
160 ["Renew"] = "恢复",
161 ["Rejuvenation"] = "回春术",
162 ["Regrowth"] = "愈合",
163 ["AmplifyMagic"] = "魔法增效",
164 ["DampenMagic"] = "魔法抑制",
165 } end )
166  
167 L:RegisterTranslations("zhTW", function() return {
168 ["buffparticipant"] = "buffparticipant",
169 ["Participant/Buff"] = "隊員/增益",
170 ["buff"] = "增益",
171 ["Buff"] = "增益",
172 ["Options for buffs."] = "增益狀態選項",
173  
174 ["PowerWordFortitude"] = "真言術:韌",
175 ["PrayerOfFortitude"] = "堅韌禱言",
176 ["GiftOfTheWild"] = "野性賜福",
177 ["MarkOfTheWild"] = "野性印記",
178 ["ArcaneIntellect"] = "祕法智慧",
179 ["ArcaneBrilliance"] = "祕法光輝",
180 ["ShadowProtection"] = "暗影防護",
181 ["PrayerofShadowProtection"] = "防護暗影禱言",
182 ["PowerWordShield"] = "真言術:盾",
183 ["SoulstoneResurrection"] = "靈魂石冷卻",
184 ["DivineSpirit"] = "神聖之靈",
185 ["PrayerOfSpirit"] = "精神禱言",
186 ["Thorns"] = "荊棘術",
187 ["FearWard"] = "防護恐懼結界",
188 ["BlessingOfMight"] = "力量祝福",
189 ["GreaterBlessingOfMight"] = "強效力量祝福",
190 ["BlessingOfWisdom"] = "智慧祝福",
191 ["GreaterBlessingOfWisdom"] = "強效智慧祝福",
192 ["BlessingOfKings"] = "王者祝福",
193 ["GreaterBlessingOfKings"] = "強效王者祝福",
194 ["BlessingOfSalvation"] = "拯救祝福",
195 ["GreaterBlessingOfSalvation"] = "強效拯救祝福",
196 ["BlessingOfLight"] = "光明祝福",
197 ["GreaterBlessingOfLight"] = "強效光明祝福",
198 ["BlessingOfSanctuary"] = "庇護祝福",
199 ["GreaterBlessingOfSanctuary"] = "強效庇護祝福",
200 ["Renew"] = "恢復",
201 ["Rejuvenation"] = "回春術",
202 ["Regrowth"] = "愈合",
203 ["AmplifyMagic"] = "魔法增效",
204 ["DampenMagic"] = "魔法抑制",
205 } end )
206  
207 L:RegisterTranslations("frFR", function() return {
208 --["buffparticipant"] = true,
209 --["Participant/Buff"] = true,
210 --["buff"] = true,
211 --["Buff"] = true,
212 ["Options for buffs."] = "Options concernant les buffs.",
213  
214 ["PowerWordFortitude"] = "Mot de pouvoir : Robustesse",
215 ["PrayerOfFortitude"] = "Pri\195\168re de robustesse",
216 ["GiftOfTheWild"] = "Don du fauve",
217 ["MarkOfTheWild"] = "Marque du fauve",
218 ["ArcaneIntellect"] = "Intelligence des arcanes",
219 ["ArcaneBrilliance"] = "Illumination des arcanes",
220 ["ShadowProtection"] = "Protection contre l'ombre",
221 ["PrayerofShadowProtection"] = "Pri\195\168re de protection contre l'Ombre",
222 ["PowerWordShield"] = "Mot de pouvoir : Bouclier",
223 ["SoulstoneResurrection"] = "R\195\169surrection de pierre d'\195\162me",
224 ["DivineSpirit"] = "Esprit divin",
225 ["PrayerOfSpirit"] = "Pri\195\168re d'esprit",
226 ["Thorns"] = "Epines",
227 ["FearWard"] = "Gardien de la peur",
228 ["BlessingOfMight"] = "B\195\169n\195\169diction de puissance",
229 ["GreaterBlessingOfMight"] = "B\195\169n\195\169diction de puissance sup\195\169rieure",
230 ["BlessingOfWisdom"] = "B\195\169n\195\169diction de sagesse",
231 ["GreaterBlessingOfWisdom"] = "B\195\169n\195\169diction de sagesse sup\195\169rieure",
232 ["BlessingOfKings"] = "B\195\169n\195\169diction des rois",
233 ["GreaterBlessingOfKings"] = "B\195\169n\195\169diction des rois sup\195\169rieure",
234 ["BlessingOfSalvation"] = "B\195\169n\195\169diction de salut",
235 ["GreaterBlessingOfSalvation"] = "B\195\169n\195\169diction de salut sup\195\169rieure",
236 ["BlessingOfLight"] = "B\195\169n\195\169diction de lumi\195\168re",
237 ["GreaterBlessingOfLight"] = "B\195\169n\195\169diction de lumi\195\168re sup\195\169rieure",
238 ["BlessingOfSanctuary"] = "B\195\169n\195\169diction de sanctuaire",
239 ["GreaterBlessingOfSanctuary"] = "B\195\169n\195\169diction de sanctuaire sup\195\169rieure",
240 ["Renew"] = "R\195\169novation",
241 ["Rejuvenation"] = "R\195\169cup\195\169ration",
242 ["Regrowth"] = "R\195\169tablissement",
243 ["AmplifyMagic"] = "Amplification de la magie",
244 ["DampenMagic"] = "Att\195\169nuation de la magie",
245 } end )
246  
247 ----------------------------------
248 -- Module Declaration --
249 ----------------------------------
250  
251 oRAPBuff = oRA:NewModule(L["buffparticipant"])
252  
253 oRAPBuff.defaults = {
254 }
255 oRAPBuff.participant = true
256 oRAPBuff.name = L["Participant/Buff"]
257 -- oRAPBuff.consoleCmd = L["buff"]
258 -- oRAPBuff.consoleOptions = {
259 -- type = "group",
260 -- desc = L["Options for buffs."],
261 -- args = {
262 -- }
263 -- }
264  
265  
266 ------------------------------
267 -- Initialization --
268 ------------------------------
269  
270 function oRAPBuff:OnEnable()
271 self:RegisterEvent("SpecialEvents_PlayerBuffGained")
272 self:RegisterEvent("SpecialEvents_PlayerBuffLost")
273 end
274  
275 function oRAPBuff:OnDisable()
276 self:UnregisterAllEvents()
277 end
278  
279 ------------------------------
280 -- Event Handlers --
281 ------------------------------
282  
283 function oRAPBuff:SpecialEvents_PlayerBuffGained(buff, index)
284 if L:HasReverseTranslation( buff ) then
285 local ourbuff = L:GetReverseTranslation( buff )
286 local timeleft = floor( GetPlayerBuffTimeLeft( index ) + .5 )
287 self:SendMessage( "RN " .. timeleft .. " " .. buffs[ourbuff][1] .. " " .. buffs[ourbuff][2] )
288 end
289 end
290  
291 function oRAPBuff:SpecialEvents_PlayerBuffLost(buff)
292 if L:HasReverseTranslation( buff ) then
293 local ourbuff = L:GetReverseTranslation( buff )
294 -- we send 1 second left on this buff.
295 self:SendMessage( "RN 1 ".. buffs[ourbuff][1] .. " " .. buffs[ourbuff][2] )
296 end
297 end