vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 -- Locals unknown
2 VANASKOS = { ACEUTIL_VERSION = 1.01 };
3  
4 VANASKOS.NAME = "VanasKoS";
5 VANASKOS.COMMANDS = {"/kos", "/vkos", "/vanaskos"};
6 VANASKOS.VERSION = "1.53";
7 VANASKOS.LastNameEntered = "";
8  
9 if( not ace:LoadTranslation("VanasKoS") ) then
10  
11 VANASKOS.CMD_OPTIONS = {
12 {
13 option = "add",
14 desc = "Adds a player to the KoS list [optional: reason <reason> after <playername>]",
15 method = "AddKoSPlayer",
16 input = TRUE
17 },
18 {
19 option = "remove",
20 desc = "Removes a player from the KoS list",
21 method = "RemoveKoSPlayer",
22 input = TRUE
23 },
24 {
25 option = "addguild",
26 desc = "Adds a guild to the KoS list [optional: reason <reason> after <guildname>]",
27 method = "AddKoSGuild",
28 input = TRUE
29 },
30 {
31 option = "removeguild",
32 desc = "Removes a guild from the KoS list",
33 method = "RemoveKoSGuild",
34 input = TRUE
35 },
36 {
37 option = "resetkos",
38 desc = "Resets the KoS list on this Realm",
39 method = "ResetKoSList"
40 },
41 {
42 option = "list",
43 desc = "Lists all players/guild on the KoS list",
44 method = "ListKoS"
45 },
46 {
47 option = "menu",
48 desc = "Toggles the Menu",
49 method = "ToggleMenu"
50 },
51 {
52 option = "toggle",
53 desc = "Toggles Configuration Options",
54 args = {
55 {
56 option = "visual",
57 desc = "Toggles the Notification in the Upper Area",
58 method = "ToggleNotifyVisual"
59 },
60 {
61 option = "chatframe",
62 desc = "Toggles the Notification in the Chatframe",
63 method = "ToggleNotifyChatframe"
64 },
65 {
66 option = "warnframe",
67 desc = "Toggles the Warning Frame on/off",
68 method = "ToggleWarnFrame"
69 },
70 {
71 option = "sound",
72 desc = "Toggles the Audio Notification",
73 method = "ToggleNotifySound"
74 }
75 }
76 },
77 {
78 option = "set",
79 desc = "Sets Configuration Options",
80 args = {
81 {
82 option = "interval",
83 desc = "Sets the Notification Interval to the specified value",
84 method = "ConfigSetNotificationInterval",
85 input = TRUE
86 }
87 }
88 },
89 {
90 option = "report",
91 desc = "Reports the current Settings",
92 method = "Report"
93 },
94 {
95 option = "import",
96 desc = "Imports KoS Data from other KoS tools",
97 args = {
98 {
99 option = "ubotd",
100 desc = "Imports KoS Data from Ultimate Book of the Dead",
101 method = "ImportKoSListFromUBotD"
102 }
103 }
104 }
105 };
106  
107 ace:RegisterGlobals({
108 VANASKOS_TEXT_VANASKOS = "Vanas KoS",
109  
110 VANASKOS_TEXT_ADD_PLAYER = "Add Player",
111 VANASKOS_TEXT_ADD_GUILD = "Add Guild",
112 VANASKOS_TEXT_REMOVE_ENTRY = "Remove Entry",
113 VANASKOS_TEXT_CHANGE_ENTRY = "Change Entry",
114 VANASKOS_TEXT_REASON = "Reason",
115 VANASKOS_TEXT_PLAYERS = "Players",
116 VANASKOS_TEXT_PLAYER_ADDED = "Player %s (Reason: %s) added.",
117  
118 VANASKOS_TEXT_PLAYERS_COLON = "Players:",
119 VANASKOS_TEXT_GUILDS_COLON = "Guilds:",
120 VANASKOS_TEXT_GUILDS = "Guilds",
121 VANASKOS_TEXT_GUILD_ADDED = "Guild %s (Reason: %s) added.",
122 VANASKOS_TEXT_PLAYER_REMOVED = "Player \"%s\" removed from KoS list",
123 VANASKOS_TEXT_GUILD_REMOVED = "Guild \"%s\" removed from KoS list",
124 VANASKOS_TEXT_LIST_PURGED = "KoS List for Realm \"%s\" now purged.",
125 VANASKOS_TEXT_LISTS = "Lists",
126 VANASKOS_TEXT_CONFIG = "Configuration",
127 VANASKOS_TEXT_ABOUT = "About",
128 VANASKOS_TEXT_ABOUT_CREATED = "Created by Vane of EU-Aegwynn",
129 VANASKOS_TEXT_NOTIFY_UPPER = "Notification in the Upper Area",
130 VANASKOS_TEXT_NOTIFY_CHATFRAME = "Notification in the Chatframe",
131 VANASKOS_TEXT_WARN_FRAME = "KoS/Enemy/Friendly Warning Window",
132 VANASKOS_TEXT_PLAY_SOUND = "Sound on KoS detection",
133 VANASKOS_TEXT_NOTIFY_INTERVAL = "Notification Interval (seconds)",
134 VANASKOS_TEXT_LAST_SEEN = "last seen:",
135 VANASKOS_TEXT_PLAYER_LIST = "Player List",
136 VANASKOS_TEXT_GUILDS_LIST = "Guilds List",
137 VANASKOS_TEXT_CONFIGURATION = "Configuration",
138 VANASKOS_TEXT_KOS = "KoS:",
139 VANASKOS_TEXT_KOS_GUILD = "KoS (Guild):",
140 VANASKOS_TEXT_KOS_LIST_FOR_REALM = "KoS List for Realm: %s",
141  
142 VANASKOS_TEXT_UBOTD_IMPORT_FAILED = "UBotD data couldn't be loaded",
143 VANASKOS_TEXT_UBOTD_IMPORT_SUCCESS = "UBotD data was imported",
144 VANASKOS_TEXT_IMPORTED = "imported",
145 VANASKOS_TEXT_VERSION = VANASKOS.VERSION,
146 VANASKOS_COLOR_WHITE = "|cffffffff",
147 VANASKOS_COLOR_END = "|r",
148  
149 BINDING_HEADER_VANASKOS_HEADER = VANASKOS.NAME,
150 BINDING_NAME_VANASKOS_TEXT_TOGGLE_MENU = "Toggle Menu",
151 });
152  
153 StaticPopupDialogs["VANASKOS_ADD_REASON"] = {
154 text = "Reason",
155 button1 = "Accept",
156 button2 = "Cancel",
157 hasEditBox = 1,
158 maxLetters = 40,
159 OnAccept = function()
160 local editBox = getglobal(this:GetParent():GetName().."EditBox");
161 VanasKoS:AddKoSPlayerR(VANASKOS.LastNameEntered, editBox:GetText());
162 VanasKoS:GUIOnUpdate();
163 end,
164 OnShow = function()
165 getglobal(this:GetName().."EditBox"):SetFocus();
166 end,
167 OnHide = function()
168 if(ChatFrameEditBox:IsVisible() ) then
169 ChatFrameEditBox:SetFocus();
170 end
171 getglobal(this:GetName().."EditBox"):SetText("");
172 end,
173 EditBoxOnEscapePressed = function()
174 this:GetParent():Hide();
175 end,
176 timeout = 0,
177 exclusive = 1,
178 whileDead = 1,
179 hideOnEscape = 1
180 }
181 StaticPopupDialogs["VANASKOS_ADD_PLAYER"] = {
182 text = "Name of Player to add",
183 button1 = "Accept",
184 button2 = "Cancel",
185 hasEditBox = 1,
186 maxLetters = 12,
187 OnAccept = function()
188 local editBox = getglobal(this:GetParent():GetName().."EditBox");
189 VANASKOS.LastNameEntered = editBox:GetText();
190 if(VANASKOS.LastNameEntered ~= "") then
191 StaticPopup_Show("VANASKOS_ADD_REASON");
192 end
193 end,
194 OnShow = function()
195 getglobal(this:GetName().."EditBox"):SetFocus();
196 end,
197 OnHide = function()
198 if(ChatFrameEditBox:IsVisible() ) then
199 ChatFrameEditBox:SetFocus();
200 end
201 getglobal(this:GetName().."EditBox"):SetText("");
202 end,
203 EditBoxOnEscapePressed = function()
204 this:GetParent():Hide();
205 end,
206 timeout = 0,
207 exclusive = 1,
208 whileDead = 1,
209 hideOnEscape = 1
210 }
211  
212 StaticPopupDialogs["VANASKOS_ADD_REASON_GUILD"] = {
213 text = "Reason",
214 button1 = "Accept",
215 button2 = "Cancel",
216 hasEditBox = 1,
217 maxLetters = 40,
218 OnAccept = function()
219 local editBox = getglobal(this:GetParent():GetName().."EditBox");
220 VanasKoS:AddKoSGuildR(VANASKOS.LastNameEntered, editBox:GetText());
221 VanasKoS:GUIOnUpdate();
222 end,
223 OnShow = function()
224 getglobal(this:GetName().."EditBox"):SetFocus();
225 end,
226 OnHide = function()
227 if(ChatFrameEditBox:IsVisible() ) then
228 ChatFrameEditBox:SetFocus();
229 end
230 getglobal(this:GetName().."EditBox"):SetText("");
231 end,
232 EditBoxOnEscapePressed = function()
233 this:GetParent():Hide();
234 end,
235 timeout = 0,
236 exclusive = 1,
237 whileDead = 1,
238 hideOnEscape = 1
239 }
240 StaticPopupDialogs["VANASKOS_ADD_GUILD"] = {
241 text = "Name of Guild to add",
242 button1 = "Accept",
243 button2 = "Cancel",
244 hasEditBox = 1,
245 maxLetters = 40,
246 OnAccept = function()
247 local editBox = getglobal(this:GetParent():GetName().."EditBox");
248 VANASKOS.LastNameEntered = editBox:GetText();
249 if(VANASKOS.LastNameEntered ~= "") then
250 StaticPopup_Show("VANASKOS_ADD_REASON_GUILD");
251 end
252 end,
253 OnShow = function()
254 getglobal(this:GetName().."EditBox"):SetFocus();
255 end,
256 OnHide = function()
257 if(ChatFrameEditBox:IsVisible() ) then
258 ChatFrameEditBox:SetFocus();
259 end
260 getglobal(this:GetName().."EditBox"):SetText("");
261 end,
262 EditBoxOnEscapePressed = function()
263 this:GetParent():Hide();
264 end,
265 timeout = 0,
266 exclusive = 1,
267 whileDead = 1,
268 hideOnEscape = 1
269 }
270  
271 StaticPopupDialogs["VANASKOS_CHANGE_ENTRY"] = {
272 text = "Reason",
273 button1 = "Accept",
274 button2 = "Cancel",
275 hasEditBox = 1,
276 maxLetters = 40,
277 OnAccept = function()
278 local editBox = getglobal(this:GetParent():GetName().."EditBox");
279 VanasKoS:GUIChangeKoSReason(editBox:GetText());
280 end,
281 OnShow = function()
282 getglobal(this:GetName().."EditBox"):SetFocus();
283 end,
284 OnHide = function()
285 if(ChatFrameEditBox:IsVisible() ) then
286 ChatFrameEditBox:SetFocus();
287 end
288 getglobal(this:GetName().."EditBox"):SetText("");
289 end,
290 EditBoxOnEscapePressed = function()
291 this:GetParent():Hide();
292 end,
293 timeout = 0,
294 exclusive = 1,
295 whileDead = 1,
296 hideOnEscape = 1
297 }
298  
299 VANASKOS.TEXT_REASON = "Reason:";
300 VANASKOS.TEXT_REASON_UNKNOWN = "unknown";
301 VANASKOS.TEXT_UNKNOWN_ENTITY = "Unknown";
302  
303 VANASKOS.MAP_ONOFF_COLOR = {[0]="|cffff5050Off|r",[1]="|cff00ff00On|r"}
304  
305 VANASKOS.TargetMatch = {
306 { -- HEALEDOTHEROTHER
307 pattern = "(.+)'s (.+) heals (.+) for (%d+).",
308 patternname = 0
309 },
310 { -- HEALECRITDOTHEROTHER
311 pattern = "(.+)'s (.+) critically heals (.+) for (%d+).",
312 patternname = 0
313 },
314 { -- SPELLDEFLECTEDOTHEROTHER
315 pattern = "(.+)'s (.+) was deflected by (.+)",
316 patternname = 0
317 },
318 { -- SPELLPARRIEDOTHEROTHER
319 pattern = "(.+)'s (.+) was parried by (.+)",
320 patternname = 0
321 },
322 { -- SPELLDODGEDOTHEROTHER
323 pattern = "(.+)'s (.+) was dodged by (.+)",
324 patternname = 0
325 },
326 { -- SPELLPOWERDRAINOTHEROTHER
327 pattern = "(.+)'s (.+) drains (%d+) (.+) from (.+)",
328 patternname = 0
329 },
330 { -- SPELLLOGCRITOTHEROTHER
331 pattern = "(.+)'s (.+) crits (.+) for (%d+).",
332 patternname = 0
333 },
334 { -- COMBATHITOTHEROTHER
335 pattern = "(.+)'s (.+) hits (.+) for (%d+).",
336 patternname = 0
337 },
338 { -- SPELLCASTGOOTHER
339 pattern = "(.+) casts (.+)",
340 patternname = 0
341 },
342 { -- SPELLCASTGOOTHERTARGETTED
343 pattern = "(.+) casts (.+) on (.+)",
344 patternname = 0
345 },
346 { -- COMBATHITOTHEROTHER
347 pattern = "(.+) hits (.+) for (%d+).",
348 patternname = 0
349 },
350 { -- AURAADDEDOTHERHARMFUL
351 pattern = "(.+) is afflicted by (.+)",
352 patternname = 0
353 },
354 { -- AURAADDEDOTHERHELPFUL
355 pattern = "(.+) gains (.+)",
356 patternname = 0
357 },
358 { -- SPELLPERFORMGOOTHER
359 pattern = "(.+) performs (.+)",
360 patternname = 0
361 },
362 { -- MISSEDOTHEROTHER
363 pattern = "(.+) misses (.+)",
364 patternname = 0
365 },
366 --[[ PERIODICAURADAMAGEOTHEROTHER = "%s suffers %d %s damage from %s's %s.";
367 PERIODICAURADAMAGESELFOTHER = "%s suffers %d %s damage from your %s.";
368 PERIODICAURAHEALOTHEROTHER = "%s gains %d health from %s's %s.";
369 PERIODICAURAHEALSELFOTHER = "%s gains %d health from your %s.";
370 ]]
371 {
372 pattern = "(.+) suffers",
373 patternname = 0
374 },
375 { -- SPELLPERFORMOTHERSTART
376 pattern = "(.+) begins to perform (.+)",
377 patternname = 0
378 },
379 { -- SPELLCASTOTHERSTART
380 pattern = "(.+) begins to cast (.+)",
381 patternname = 0
382 },
383 { -- VSDODGEOTHEROTHER
384 pattern = "(.+) attacks. (.+) dodges",
385 patternname = 0
386 },
387 { -- VSABSORBOTHEROTHER
388 pattern = "(.+) attacks. (.+) absorbs",
389 patternname = 0
390 },
391 { -- VSBLOCKOTHEROTHER
392 pattern = "(.+) attacks. (.+) blocks",
393 patternname = 0
394 },
395 { -- VSDEFLECTOTHEROTHER
396 pattern = "(.+) attacks. (.+) deflects",
397 patternname = 0
398 },
399 { -- VSENVIRONMENTALDAMAGE_FALLING_OTHER
400 pattern = "(.+) falls and loses (%d+) health.",
401 patternname = 0
402 }
403 };
404  
405 end