vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 --[[
2 Do NOT Edit this file!
3 It is used for MORE then just text
4 see localization.DE.lua localization.FR.lua etc files
5 if you want to change englisch text add a localization.EN.lua
6 You could consider this the "neutral" language
7 Point is there are function mappings here that dont have to be touched.
8  
9 ]]--
10  
11 SW_RootSlashes = {"/swstats", "/sws"};
12  
13 SW_VERSION = "1.5.3";
14  
15 -- 1.4.2 Found a chineese localization through google that needs a different pre filter so i added this
16 -- and added a localization for it
17 SW_PRE_REGEX = "[%s%.%:%(]%d+[%s%.%)]";
18 -- 1.5 moved death regex here, makes more sense
19 SW_DeathRegEx = string.gsub(UNITDIESOTHER, "%%s","(.+)");
20  
21 -- 1.5.1 wow 1.11 adds this var will alliviate the "drunk problem" a little
22 if SLURRED_SPEECH ~= nil then
23 SW_DrunkRegEx = string.gsub(SLURRED_SPEECH, "%%s","(.-)");
24 end
25 -- 1.3.2 max amount of "quick option buttons"
26 SW_OPT_COUNT = 10;
27  
28 -- startuplog
29 -- this should'nt need translation, but can be
30 SW_SL ={
31 ["OK"] = "...OK",
32 ["START"] = "Starting Init...",
33 ["REGEX"] = "Creating Regex from globals",
34 ["EVENTS"] = "Registering Events",
35 ["MAP"] = "Creating Event->Regex map",
36 ["MAP_SORT"] = "Sorting EventMap",
37 ["MAP_REGEX"] = "InMap/RegexRegisterd",
38 }
39  
40 SW_CONSOLE_NOCMD = "No such command: ";
41 SW_CONSOLE_HELP ="Help: ";
42 SW_CONSOLE_NIL_TRAILER = " is not defined."; -- space at beginning
43 SW_CONSOLE_SORTED = "Sorted";
44 SW_CONSOLE_NOREGEX = "There is no regex for this event.";
45 SW_CONSOLE_FALLBACK = "Found a regex - added to map";
46 SW_FALLBACK_BLOCK_INFO = "This event is blocked from auto updating itself.";
47 SW_FALLBACK_IGRNORED = "This event has been ignored.";
48 SW_EMPTY_EVENT = "Listening to non needed event?: ";
49 SW_INFO_PLAYER_NF = "There is no info for: ";
50 SW_PRINT_INFO_FROMTO = "|cffffffffFrom:|r%s, |cffffffffTarget:|r%s,";
51 SW_PRINT_ITEM = "|cffffffff%s:|r%s,";
52 SW_PRINT_ITEM_DMG = "Dmg";
53 SW_PRINT_ITEM_HEAL = "Healed";
54 SW_PRINT_ITEM_THROUGH = "Through";
55 SW_PRINT_ITEM_TYPE = "Type";
56 SW_PRINT_ITEM_CRIT = "|cffff2020CRIT|r";
57 SW_PRINT_ITEM_WORLD = "WORLD";
58 SW_PRINT_ITEM_NORMAL = "Normal";
59 SW_PRINT_ITEM_RECIEVED = "Recieved";
60 SW_PRINT_INFO_RECIEVED = "|cffff2020Dmg:%s|r, |cff20ff20Heal:%s|r";
61 SW_PRINT_ITEM_TOTAL_DONE = "Total";
62 SW_PRINT_ITEM_NON_SCHOOL = "Other";
63 SW_PRINT_ITEM_IGNORED = "Ignored";
64 SW_PRINT_ITEM_DEATHS = "Deaths";
65  
66 SW_SYNC_CHAN_JOIN = "|cff20ff20SWSync: You have joined:|r";
67 SW_SYNC_CHAN_FAIL= "|cffff2020SWSync: Could not join:|r";
68 SW_SYNC_JOINCHECK_FROM = "Join SWSyncChannel %s from: %s ?"
69 SW_SYNC_JOINCHECK_INFO = "Old data will be lost!"
70 SW_SYNC_CURRENT = "Current SyncChannel: %s";
71 SW_BARS_WIDTHERROR = "The Bar is to wide!"
72 SW_B_CONSOLE = "C";
73 SW_B_SETTINGS = "S";
74 SW_B_SYNC = "Y";
75 SW_B_REPORT = "R";
76 SW_STR_MAX = "Max";
77 SW_STR_EVENTCOUNT = "#";
78 SW_STR_AVERAGE = "ΓΈ";
79 SW_STR_PET_PREFIX = "[Pet] "; -- pet prefix for pet info displayed in the bars
80 SW_STR_VPP_PREFIX = "[All pets] "; -- pet prefix for virtual pet per player info displayed in the bars
81 SW_STR_VPR = "[Raid Pet]"; -- pet string for virtual pet per raid info displayed in the bars
82 -- 1.5.beta.1 Reset vote
83 SW_STR_RV = "|cffff5d5dReset Vote!|r Issued by |cffff5d5d%s|r. Do you want the SyncChannel to reset?";
84 SW_STR_RV_PASSED = "|cffffff00[SW Sync]|r |cff00ff00Reset vote passed!|r";
85 SW_STR_RV_FAILED = "|cffffff00[SW Sync]|r |cffff5d5dReset vote failed!|r";
86 SW_STR_VOTE_WARN = "|cffffff00[SW Sync]|r |cffff5d5dDon't spam votes...|r";
87  
88 --1.5.3
89 --Raid DPS Strings
90 SW_RDPS_STRS = {
91 ["CURR"] = "RDPS Current Fight",
92 ["ALL"] = "RDPS",
93 ["LAST"] = "RDPS Last Fight",
94 ["MAX"] = "RDPS Max",
95 ["TOTAL"] = "RDPS The Ugly truth", -- a timer that keeps running, no matter if in or out of fight
96 }
97 --[[
98 -- devour magic ? (pet fellhunter)
99 -- add sheep ?
100 -- add totems ?
101 --]]
102 SW_Spellnames = {
103 [1] = "Remove Lesser Curse",
104 [2] = "Remove Curse",
105 [3] = "Dispel Magic",
106 [4] = "Cure Disease",
107 [5] = "Abolish Disease",
108 [6] = "Purify",
109 [7] = "Cleanse",
110 [8] = "Cure Poison",
111 [9] = "Abolish Poison",
112 [10] = "Purge",
113 }
114  
115 SW_GUI ={
116 ["SW_FrameConsole_Title"] = {["s"] = "SW v"..SW_VERSION, ["f"] = SW_TitleSetText },
117 ["SW_FrameConsole_Tab1"] = {["s"] = "General", ["f"] = SW_TabSetText },
118 ["SW_FrameConsole_Tab2"] = {["s"] = "Event Info", ["f"] = SW_TabSetText },
119 --["SW_FrameConsole_Tab3"] = {["s"] = "Setting", ["f"] = SW_TabSetText },
120 ["SW_BarSettingsFrameV2_Tab1"] = {["s"] = "Data", ["f"] = SW_TabSetText },
121 ["SW_BarSettingsFrameV2_Tab2"] = {["s"] = "Visuals", ["f"] = SW_TabSetText },
122 ["SW_BarSettingsFrameV2_Tab3"] = {["s"] = "Pets", ["f"] = SW_TabSetText },
123 ["SW_Chk_ShowEventText"] = "Show Event->Regex",
124 ["SW_Chk_ShowOrigStrText"] = "Show Log Message",
125 ["SW_Chk_ShowRegExText"] = "Show RegEx",
126 ["SW_Chk_ShowMatchText"] = "Show Match",
127 ["SW_Chk_ShowSyncInfoText"] = "Show SyncMsgs",
128 ["SW_Chk_ShowOnlyFriendsText"] = "Only show 'Friends'",
129 ["SW_Chk_ShowSyncBText"] = "Show Sync button",
130 ["SW_Chk_ShowConsoleBText"] = "Show Console button",
131 ["SW_Chk_ShowDPSText"] = "DPS";
132 ["SW_Chk_MergePetsText"] = "Merge Pet to Master",
133 ["SW_RepTo_SayText"] = "Say",
134 ["SW_RepTo_GroupText"] = "Group",
135 ["SW_RepTo_RaidText"] = "Raid",
136 ["SW_RepTo_GuildText"] = "Guild",
137 ["SW_RepTo_ChannelText"] = "Channel",
138 ["SW_RepTo_WhisperText"] = "Whisper",
139 ["SW_RepTo_ClipboardText"] = "Textbox",
140 ["SW_RepTo_OfficerText"] = "Officer",
141 ["SW_BarReportFrame_Title_Text"] = "Report to..",
142 ["SW_Chk_RepMultiText"] = "Multiline",
143 ["SW_Filter_PCText"] = "PC",
144 ["SW_Filter_NPCText"] = "NPC",
145 ["SW_Filter_GroupText"] = "Current Group/Raid",
146 ["SW_Filter_EverGroupText"] = "Ever Group/Raid",
147 ["SW_Filter_NoneText"] = "None",
148 ["SW_GeneralSettings_Title_Text"] = "General Settings",
149 ["SW_BarSyncFrame_Title_Text"] = "SyncChannel Settings",
150 ["SW_BarSettingsFrameV2_Title_Text"] = "Settings",
151 ["SW_BarSyncFrame_SyncLeave"] = {["s"] = "Leave", ["f"] = SetButtonText },
152 ["SW_BarSyncFrame_OptGroupText"] = "Group",
153 ["SW_BarSyncFrame_OptRaidText"] = "Raid",
154 ["SW_BarSyncFrame_OptGuildText"] = "Guild",
155 ["SW_BarSyncFrame_SyncSend"] = {["s"] = "Send to", ["f"] = SetButtonText },
156 ["SW_CS_Damage"] = {["s"] = "Damage Color", ["f"] = SW_SetColorSwatchText },
157 ["SW_CS_Heal"] = {["s"] = "Heal Color", ["f"] = SW_SetColorSwatchText },
158 ["SW_CS_BarC"] = {["s"] = "Bar Color", ["f"] = SW_SetColorSwatchText },
159 ["SW_CS_FontC"] = {["s"] = "Font Color", ["f"] = SW_SetColorSwatchText },
160 ["SW_CS_OptC"] = {["s"] = "Button Color", ["f"] = SW_SetColorSwatchText },
161 ["SW_TextureSlider"] = {["s"] = "Texture:", ["f"] = SW_SetSliderPreText },
162 ["SW_FontSizeSlider"] = {["s"] = "Font Size:", ["f"] = SW_SetSliderPreText },
163 ["SW_BarHeightSlider"] = {["s"] = "H:", ["f"] = SW_SetSliderPreText },
164 --["SW_BarWidthSlider"] = {["s"] = "Bar Width:", ["f"] = SW_SetSliderPreText },
165 ["SW_ColCountSlider"] = {["s"] = "Column Count:", ["f"] = SW_SetSliderPreText },
166 ["SW_OptChk_NumText"] = "Amount",
167 ["SW_OptChk_RankText"] = "Rank",
168 ["SW_OptChk_PercentText"] = "%",
169 ["SW_VarInfoLbl"] = "This info needs a target. Click Change to type in a name or click FromTarget to use your current target.",
170 ["SW_NoPetInfoLabel"] = "This info does not have any pet filter settings.",
171 ["SW_SetInfoVarFromTarget"] = {["s"] = "FromTarget", ["f"] = SetButtonText },
172 ["SW_ColorsOptUseClassText"] = "Class color",
173 ["SW_TextWindow_Title_Text"] = "Use Ctrl+c to copy.",
174 ["SW_BarSyncFrame_SyncARPY"] = {["s"] = "Allow", ["f"] = SetButtonText },
175 ["SW_BarSyncFrame_SyncARPN"] = {["s"] = "Prohibit", ["f"] = SetButtonText },
176 -- 1.5 new pet filter labels
177 ["SW_PF_InactiveText"] = "Inactive",
178 ["SW_PF_ActiveText"] = "Active",
179 ["SW_PF_MMText"] = "Merge made",
180 ["SW_PF_MRText"] = "Merge recieved",
181 ["SW_PF_MBText"] = "Merge both",
182 ["SW_PF_CurrentText"] = "Current",
183 ["SW_PF_VPPText"] = "Virtual player pet",
184 ["SW_PF_VPRText"] = "Virtual raid pet",
185 ["SW_PF_IgnoreText"] = "Ignore all pet info",
186  
187 -- 1.5.3 new colors
188 ["SW_CS_TitleBar"] = {["s"] = "Title Bar Color", ["f"] = SW_SetColorSwatchText },
189 ["SW_CS_TitleFont"] = {["s"] = "Title Bar Font Color", ["f"] = SW_SetColorSwatchText },
190 ["SW_CS_Backdrops"] = {["s"] = "Frame and Tab Color", ["f"] = SW_SetColorSwatchText },
191 ["SW_CS_MainWinBack"] = {["s"] = "Main Window Back", ["f"] = SW_SetColorSwatchText },
192 ["SW_CS_ClassCAlpha"] = {["s"] = "Class Transparency", ["f"] = SW_SetColorSwatchText },
193 };
194  
195 -- don't localize these 3
196 SW_OVERHEAL = "SW_OverhealDummy";
197 SW_PETOWNER = "SW_PO_"; -- prefix to integerate 1.5 pets with current syncing
198 SW_PET = "SW_Pet_"; -- prefix to integerate 1.5 pets with current syncing
199  
200  
201 --tooltips
202 SW_GS_Tooltips ={
203 ["SW_Chk_ShowOnlyFriends"] = "This option is only used to filter reports sent to the console via /sws slash commands.",
204 ["SW_Chk_ShowSyncB"] = "Option to show an extra button for Sync settings in the title bar of the main window.",
205 ["SW_Chk_ShowConsoleB"] = "Option to show an extra button for the console in the title bar of the main window.",
206 ["SW_CS_Damage"] = "The bar color for 'damage bars'. E.g. used when looking at details.",
207 ["SW_CS_Heal"] = "The bar color for 'heal bars'. E.g. used when looking at details.",
208 ["SW_CS_BarC"] = "The bar color used in this view. This might be overridden depending on the data displayed.",
209 ["SW_CS_FontC"] = "The font color used in this view.",
210 ["SW_CS_OptC"] = "Changes the color of the button under the main window.",
211 ["SW_TextureSlider"] = "Changes the texture of the bars for this view",
212 ["SW_FontSizeSlider"] = "Changes the font size used in the bars for this view",
213 ["SW_BarHeightSlider"] = "Changes the bar height for this view",
214 --["SW_BarWidthSlider"] = "Changes the bar width for this view",
215 ["SW_ColCountSlider"] = "Changes the amount of columns for this view.",
216 ["SW_SetOptTxtFrame"] = "Changes the text displayed in the button under the main window.",
217 ["SW_SetFrameTxtFrame"] = "Changes the text displayed in the titel of the main window.",
218 ["SW_OptChk_Num"] = "Show the 'raw' number counted in points. (E.g. damage, heal, etc.).",
219 ["SW_OptChk_Rank"] = "Show the rank.",
220 ["SW_OptChk_Percent"] = "Show the percentage. (Percentage of the total amount of 'raw' numbers in the raid.)",
221 ["SW_Filter_None"] = "No pc/npc/group filter is used. All gathered data is shown in the bars",
222 ["SW_Filter_PC"] = "A Player char filter is used. This only works if somebody was in your group or if you had him as target once.",
223 ["SW_Filter_NPC"] = "A Non player char filter is used, you must have targeted it once , and it may not be player controlled.",
224 ["SW_Filter_Group"] = "Only people and pets currently in your group or raid are shown.",
225 ["SW_Filter_EverGroup"] = "Only people that have been in your group or raid are shown.",
226 ["SW_ClassFilterSlider"] = "Here you can set a class filter. Only data of the specified class is shown. (You must have selected them once or they must have been in your group/raid)",
227 ["SW_InfoTypeSlider"] = "The 'main' data selector. Select what kind of data you want to display for this tab. A (S) denotes that this setting is synced.",
228 ["SW_ColorsOptUseClass"] = "Use class colors. If this option is checked then the bars will be colored by the class of the player. (Overrides above bar color if the class of the player or mob is known) ",
229 ["SW_Chk_ShowDPS"] = "Show your DPS in the main window title?",
230 ["SW_OptCountSlider"] = "Changes the amount of buttons to show under the main window.",
231 ["SW_AllowARP"] = "Allow posting of reports in a raid.",
232 ["SW_DisAllowARP"] = "Prohibit posting of reports in a raid.",
233 ["SW_OptChk_Running"] = "Uncheck to pause data collection. Check to continue collecting data. You can not pause data collection while being in a sync channel.",
234 -- 1.5 new pet filter Tooltips
235 ["SW_PF_Inactive"] = "The new pet filters are mostly inactive, pets will display like everything else.";
236 ["SW_PF_Active"] = "Pets are marked with "..SW_STR_PET_PREFIX.." and mindcontrolled / enslaved pets and players show up. Only the stats WHILE being possessd are counted. (Own players when mind controlled by a hostile mob will not show up, only controlled mobs of players in your group/raid)",
237 ["SW_PF_MM"] = "Pets are hidden and the damage/healing they made is added to the owner.",
238 ["SW_PF_MR"] = "Pets are hidden and the damage/healing they recieved is added to the owner.",
239 ["SW_PF_MB"] = "Pets are hidden and the damage/healing they made AND recieved is added to the owner.",
240 ["SW_PF_Current"] = "Similar to Active, but only currently owned pets are shown.",
241 ["SW_PF_VPP"] = "All pets a player had are merged to one pet.",
242 ["SW_PF_VPR"] = "All pets the entire raid / group had are merged to one pet.",
243 ["SW_PF_Ignore"] = "All pet info is ignored.",
244  
245 -- 1.5.3 new colors
246 ["SW_CS_TitleBar"] = "This changes the color of all title bars and the buttons in them. This MAY (depending on settings) change the color of buttons under the main window.",
247 ["SW_CS_TitleFont"] = "This changes the color of all title bar fonts and the button fonts in them.",
248 ["SW_CS_Backdrops"] = "This changes the color of the frame around most windows. Tab color will be changed aswell, but alpha channel wil be ignored for tabs.",
249 ["SW_CS_MainWinBack"] = "This changes the backround of the main window.",
250 ["SW_CS_ClassCAlpha"] = "Only the alpha channel set here will be used for class coloring.",
251 };
252  
253 -- edit boxes
254 SW_GS_EditBoxes = {
255 ["SW_SetOptTxtFrame"] = {"Change","Button Text: ", "New button text:" },
256 ["SW_SetFrameTxtFrame"] = {"Change","Frame Text: ", "New frame text:" },
257 ["SW_SetInfoVarTxtFrame"] = {"Change","Info for: ", "New name of player or mob:" },
258 ["SW_SetSyncChanTxtFrame"] = {"Change","SyncChannel: ", "New SyncChannel:" },
259 }
260  
261 --Popups
262 StaticPopupDialogs["SW_Reset"] = {
263 text = "Are you sure you want to reset the data?",
264 button1 = YES,
265 button2 = NO,
266 OnAccept = function()
267 SW_ResetInfo();
268 end,
269 timeout = 0,
270 whileDead = 1,
271 hideOnEscape = 1,
272 };
273 StaticPopupDialogs["SW_ResetSync"] = {
274 text = "You are in a SyncChannel and will issue a reset command to all people in the channel! Are you sure you want to reset the data?",
275 button1 = YES,
276 button2 = NO,
277 OnAccept = function()
278 SW_SyncReset();
279 end,
280 timeout = 0,
281 whileDead = 1,
282 hideOnEscape = 1,
283 };
284 StaticPopupDialogs["SW_ResetSyncVote"] = {
285 text = "TMP No need to translate (SW_STR_RV)",
286 button1 = YES,
287 button2 = NO,
288 OnAccept = function()
289 SW_SyncQueue:PushSWInfo("VA", {StaticPopupDialogs["SW_ResetSyncVote"].vID,1,math.random(100)});
290 end,
291 OnCancel = function (_,reason)
292 if reason == "clicked" then
293 SW_SyncQueue:PushSWInfo("VA", {StaticPopupDialogs["SW_ResetSyncVote"].vID,2,math.random(100)});
294 end
295 end,
296  
297 timeout = 0,
298 whileDead = 1,
299 hideOnEscape = false,
300 };
301  
302 StaticPopupDialogs["SW_JoinCheck"] = {
303 text = "JoinChk",
304 button1 = YES,
305 button2 = NO,
306 OnAccept = function()
307 SW_SyncJoin(StaticPopupDialogs["SW_JoinCheck"].SW_toChan);
308 end,
309 timeout = 0,
310 whileDead = 1,
311 hideOnEscape = 1,
312 };
313 StaticPopupDialogs["SW_ResetFailInfo"] = {
314 text = "You are in a SyncChannel and can not reset the data. Only the raid/group leaders can issue a reset for the SyncChannel. With '"..SW_RootSlashes[1].." rv' you can start a reset vote.",
315 button1 = OKAY,
316  
317 timeout = 0,
318 whileDead = 1,
319 hideOnEscape = 1,
320 };
321 StaticPopupDialogs["SW_PostFail"] = {
322 text = "Sorry, you can't report here. The Raid leaders must allow to post stats for you to do this",
323 button1 = OKAY,
324  
325 timeout = 0,
326 whileDead = 1,
327 hideOnEscape = 1,
328 };
329 StaticPopupDialogs["SW_ChangeTxt"] = {
330 text = "Tmp",
331 button1 = ACCEPT,
332 button2 = CANCEL,
333 hasEditBox = 1,
334 maxLetters = 30,
335 OnAccept = function()
336  
337 local text = getglobal(this:GetParent():GetName().."EditBox"):GetText();
338 StaticPopupDialogs["SW_ChangeTxt"]["SWCallingFrame"].CurrentVal=text;
339 StaticPopupDialogs["SW_ChangeTxt"]["SWCallingFrame"]:ChangeText();
340 StaticPopupDialogs["SW_ChangeTxt"]["SWUpdateFunc"](text, StaticPopupDialogs["SW_ChangeTxt"]["SWUpdateInfo"]);
341  
342 end,
343 EditBoxOnEnterPressed = function()
344 local text = getglobal(this:GetParent():GetName().."EditBox"):GetText();
345 StaticPopupDialogs["SW_ChangeTxt"]["SWCallingFrame"].CurrentVal=text;
346 StaticPopupDialogs["SW_ChangeTxt"]["SWCallingFrame"]:ChangeText();
347 StaticPopupDialogs["SW_ChangeTxt"]["SWUpdateFunc"](text, StaticPopupDialogs["SW_ChangeTxt"]["SWUpdateInfo"]);
348 end,
349 OnShow = function()
350 local eb = getglobal(this:GetName().."EditBox");
351 eb:SetText(StaticPopupDialogs["SW_ChangeTxt"]["SWCallingFrame"].CurrentVal);
352 eb:HighlightText();
353 eb:SetFocus();
354 end,
355 OnHide = function()
356 if ( ChatFrameEditBox:IsVisible() ) then
357 ChatFrameEditBox:SetFocus();
358 end
359 getglobal(this:GetName().."EditBox"):SetText("");
360  
361 StaticPopupDialogs["SW_ChangeTxt"]["SWUpdateFunc"] = nil;
362 StaticPopupDialogs["SW_ChangeTxt"]["SWUpdateInfo"] = nil;
363 StaticPopupDialogs["SW_ChangeTxt"]["SWCallingFrame"] = nil;
364 end,
365 timeout = 0,
366 exclusive = 1,
367 hideOnEscape = 1
368 };
369 StaticPopupDialogs["SW_InvalidChan"] = {
370 text = "Sorry, this is an invalid channel name.",
371 button1 = OKAY,
372  
373 timeout = 0,
374 whileDead = 1,
375 hideOnEscape = 1,
376 };
377  
378 --icon menu
379 SW_MiniIconMenu = {
380 {
381 ["text"] = "SW Stats",
382 ["isTitle"] = 1,
383 ["justifyH"] = "CENTER",
384 ["notCheckable"] = 1,
385 },
386 {
387 ["textShow"] = "Show Main Window",
388 ["textHide"] = "Hide Main Window",
389 ["checkFrame"] = "SW_BarFrame1",
390 ["func"] = SW_ToggleBarFrame,
391 ["notCheckable"] = 1,
392 },
393 {
394 ["textShow"] = "Show Console",
395 ["textHide"] = "Hide Console",
396 ["checkFrame"] = "SW_FrameConsole",
397 ["func"] = SW_ToggleConsole,
398 ["notCheckable"] = 1,
399 },
400 {
401 ["textShow"] = "Show General Settings",
402 ["textHide"] = "Hide General Settings",
403 ["checkFrame"] = "SW_GeneralSettings",
404 ["func"] = SW_ToggleGeneralSettings,
405 ["notCheckable"] = 1,
406 },
407 {
408 ["textShow"] = "Show Sync Settings",
409 ["textHide"] = "Hide Sync Settings",
410 ["checkFrame"] = "SW_BarSyncFrame",
411 ["func"] = SW_ToggleSync,
412 ["notCheckable"] = 1,
413 },
414 {
415 ["text"] = "",
416 ["notCheckable"] = 1,
417 ["notClickable"] = 1,
418 },
419 {
420 ["text"] = "Reset Data",
421 ["func"] = SW_ResetCheck,
422 ["notCheckable"] = 1,
423 },
424 {
425 ["text"] = "",
426 ["notCheckable"] = 1,
427 ["notClickable"] = 1,
428 },
429 {
430 ["text"] = "Update Groupinfo",
431 ["func"] = SW_RebuildFriendList,
432 ["notCheckable"] = 1,
433 },
434  
435 }
436 -- key bindig strings
437 BINDING_HEADER_SW_BINDINGS = "SW Stats";
438 BINDING_NAME_SW_BIND_TOGGLEBARS = "Show/Hide the main window.";
439 BINDING_NAME_SW_BIND_CONSOLE = "Show/Hide the console.";
440 BINDING_NAME_SW_BIND_PAGE1 = "Show info tab 1";
441 BINDING_NAME_SW_BIND_PAGE2 = "Show info tab 2";
442 BINDING_NAME_SW_BIND_PAGE3 = "Show info tab 3";
443 BINDING_NAME_SW_BIND_PAGE4 = "Show info tab 4";
444 BINDING_NAME_SW_BIND_PAGE5 = "Show info tab 5";
445 BINDING_NAME_SW_BIND_PAGE6 = "Show info tab 6";
446 BINDING_NAME_SW_BIND_PAGE7 = "Show info tab 7";
447 BINDING_NAME_SW_BIND_PAGE8 = "Show info tab 8";
448 BINDING_NAME_SW_BIND_PAGE9 = "Show info tab 9";
449 BINDING_NAME_SW_BIND_PAGE10 = "Show info tab 10";
450  
451  
452 local SW_SLASH_ERROR = "WTF!! I TOLD YOU NOT TO TOUCH neutral.lua"; -- not used just another reminder :P
453  
454 --dont localize this, must be the same through all languages
455 SW_SYNC_CHAN_ANNOUNCE = "SW Stats SyncChannel (v1.5+):%s"
456 SW_SYNC_CHAN_REGEX = "^SW Stats SyncChannel %(v1%.5%+%):(.+)"
457  
458 -- barframe class filter
459 -- dont localize
460 SW_ClassFilters = {
461 [1] = "NONE",
462 [2] = "DRUID",
463 [3] = "HUNTER",
464 [4] = "MAGE",
465 [5] = "PALADIN",
466 [6] = "PRIEST",
467 [7] = "ROGUE",
468 [8] = "SHAMAN",
469 [9] = "WARLOCK",
470 [10] = "WARRIOR",
471 };
472  
473 --default Vals for "BarFrames"
474 SW_DefaultBar = {
475 ["IN"] = 1, -- Info type
476 --["BW"] = 128, --bar width 1.4.2 removed
477 ["COLC"] = 1; -- columnCount
478 ["BH"] = 10, -- bar height
479 ["BC"] = {0,0.8,0,1}, -- bar vertex color
480 ["BT"] = 3, -- bar texture num
481 ["BFC"] = {1,1,1,1}; -- bar font color
482 ["BFS"] = 10, -- bar font height
483 ["OC"] = {1,0,0,1}; -- option button color
484 };
485 -- default color vars
486 SW_Default_Colors = {
487 ["Damage"] = {1,0,0,1},
488 ["Heal"] = {0,1,0,1},
489 ["DRUID"] = {1, 0.49, 0.04, 1},
490 ["HUNTER"] = {0.66, 0.83, 0.45, 1},
491 ["MAGE"] = {0.41, 0.8, 0.94, 1},
492 ["PALADIN"] = {0.96, 0.55, 0.73, 1},
493 ["PRIEST"] = {0.8, 0.8, 0.8, 1},
494 ["ROGUE"] = {1, 0.96, 0.41, 1},
495 ["SHAMAN"] = {0.96, 0.55, 0.73, 1},
496 ["WARLOCK"] = {0.58, 0.51, 0.79, 1},
497 ["WARRIOR"] = {0.78, 0.61, 0.43, 1},
498 };
499  
500 function SW_GetSpellList()
501 local sOut = "";
502 for i,v in SW_Spellnames do
503 sOut = sOut..v.."; "
504 end
505 return sOut;
506 end
507 -- Names and functions for available analysis
508 SW_InfoTypes = {
509 [1] = {
510 ["f"] = SW_GetDmgInfo,
511 ["t"] = "Damage Done (S)",
512 ["synced"] = 1,
513 ["d"] = "Shows a simple damage list.",
514 ["cc"] = 1,
515 ["showPF"] = true,
516 },
517 [2] = {
518 ["f"] = SW_GetHealInfo,
519 ["t"] = "Raw Healing (S)",
520 ["synced"] = 1,
521 ["d"] = "Shows a simple heal list. (Overheals are counted towards the numbers displayed here).",
522 ["cc"] = 1,
523 ["showPF"] = true,
524 },
525 [3] = {
526 ["f"] = SW_GetDmgGotInfo,
527 ["t"] = "Damage Taken (S)",
528 ["synced"] = 1,
529 ["d"] = "Shows a list of the damage recieved. (Who got the most damage?)",
530 ["showPF"] = true,
531 },
532 [4] = {
533 ["f"] = SW_GetHealGotInfo,
534 ["t"] = "Healing Taken (S)",
535 ["synced"] = 1,
536 ["d"] = "Shows a list of healed targets. (Who got the most healing?)",
537 ["showPF"] = true,
538 },
539 [5] = {
540 ["f"] = SW_GetHealInfoHealer,
541 ["t"] = "Healing Breakdown (S)",
542 ["varType"] = "TEXT",
543 ["synced"] = 1,
544 ["d"] = "Shows detail healing info. (Who did this person heal?)",
545 },
546 [6] = {
547 ["f"] = SW_GetHealInfoTarget,
548 ["t"] = "Healing Info (S)",
549 ["varType"] = "TEXT",
550 ["synced"] = 1,
551 ["d"] = "Shows detail healing info for target. (Who was this person healed by?)",
552 },
553 [7] = {
554 ["f"] = SW_GetDetails,
555 ["t"] = "Skill Details (NotS)",
556 ["varType"] = "TEXT",
557 ["d"] = "Shows detail skill info. (What skills is this person using?) The number in () next to the name indicates the maximum hit/heal with this skill",
558 },
559 [8] = {
560 ["f"] = SW_GetDetailsPerTick,
561 ["t"] = "Average Effects (NotS)",
562 ["varType"] = "TEXT",
563 ["d"] = "Shows averaged skill info. (What's that persons average damage with frostbolt?) The number next to the name indicates usage count. Note: Can have odd numbers for spells with one large damage part with a following low damage DOT.",
564 },
565 [9] = {
566 ["f"] = SW_GetSchoolMade,
567 ["t"] = "Damage Type (NotS)",
568 ["varType"] = "TEXT",
569 ["d"] = "Shows school info. (What's the main part of this players damage? E.g. fire, ice, etc.)",
570 },
571 [10] = {
572 ["f"] = SW_GetSchoolGot,
573 ["t"] = "Damage Taken Type (NotS)",
574 ["varType"] = "TEXT",
575 ["d"] = "Shows school info recieved. (Whats the main source of damage to this player? E.g. fire, ice, etc.)",
576 },
577 [11] = {
578 ["f"] = SW_GetSchoolMadeSummary,
579 ["t"] = "Damage Done Summary (NotS)",
580 ["d"] = "Shows school info. (What's the main part of the raid damage? E.g. fire, ice, etc.) Note: Make sure to use filters.",
581 },
582 [12] = {
583 ["f"] = SW_GetSchoolGotSummary,
584 ["t"] = "Damage Taken Summary (NotS)",
585 ["d"] = "Shows school info recieved. (What's the main part the raid was damaged by? E.g. fire, ice, etc.) Note: Make sure to use filters.",
586 },
587 [13] = {
588 ["f"] = SW_GetOverHealInfo,
589 ["t"] = "Over-Healing (S)",
590 ["synced"] = 1,
591 ["d"] = "Shows overheal info. The percentage next to the name is his OH%, If you use the % option above that percentage is his portion of the total raid overheal.",
592 },
593 [14] = {
594 ["f"] = SW_GetEffectiveHealInfo,
595 ["t"] = "Effective Healing (S)",
596 ["synced"] = 1,
597 ["d"] = "Shows the heal list. Overheals are SUBTRACTED giving you a 'real' heal list.",
598 },
599 [15] = {
600 ["f"] = SW_GetManaRatio,
601 ["t"] = "Mana Efficiency",
602 ["varType"] = "SELF",
603 ["d"] = "Shows the amount of damage/healing per manapoint. A higher number indicates a higher mana efficiency (This ONLY works for yourself)",
604 },
605 [16] = {
606 ["f"] = SW_GetEffectiveHealManaInfo,
607 ["t"] = "Healing Mana Efficiency (S)",
608 ["synced"] = 1,
609 ["d"] = "To compare people that aren't in the SyncChannel use other infos to compare healing. A ratio of 2 means: 1 mana used to heal 2 points. (Higher values are better)",
610 },
611 [17] = {
612 ["f"] = SW_GetDeathInfo,
613 ["t"] = "Death Counter (S)",
614 ["synced"] = 1,
615 ["d"] = "How often did somebody or something die? This counts all deaths not just the ones you killed!",
616 },
617 [18] = {
618 ["f"] = SW_GetDamageManaInfo,
619 ["t"] = "Damage Mana Efficiency (S)",
620 ["synced"] = 1,
621 ["d"] = "To compare people that aren't in the SyncChannel use other infos to compare damage. A ratio of 2 means: 1 mana used to make 2 points of damage. (Higher values are better)",
622 },
623 [19] = {
624 ["f"] = SW_DecurseCountInfo,
625 ["t"] = "Decurse Count (S v1.5.1+)",
626 ["d"] = "How often did somebody 'decurse'?:"..SW_GetSpellList(),
627 },
628 [20] = {
629 ["f"] = SW_PowerGainInfo,
630 ["t"] = "Power gain (NotS)",
631 ["varType"] = "TEXT",
632 ["d"] = "This is EXPERIMENTAL, it just counts the # of powergains and non damage/heal events (not sure if this will show procs that don't heal or do dmg)",
633 },
634 [21] = {
635 ["f"] = SW_GetRaidPS,
636 ["t"] = "Raid Info per Second (S)",
637 ["varType"] = "SELF",
638 ["d"] = "Show various DPS values for the entire raid/group. If you are alone these values are slightly different to the DPS value you can display in the title bar. (In combat time is calculated differently)",
639 },
640 [22] = {
641 ["f"] = SW_GetMaxHitList,
642 ["t"] = "Max Hit List (NotS)",
643 ["d"] = "Shows the maximum damage made per hit / per person. (Max crit list)",
644 },
645 [23] = {
646 ["f"] = SW_GetMaxHealList,
647 ["t"] = "Max Heal List (NotS)",
648 ["d"] = "Shows the maximum heal done per spell / per person. (This does not include OH - It's a max crit list)",
649 },
650 [24] = {
651 ["f"] = SW_GetTopDmgDelta,
652 ["t"] = "Top Damage Interval(S)",
653 ["varType"] = "SELF",
654 ["d"] = "This only works with people in a SyncChannel. It shows the maximum increase in damage the player reported (for himself) in a 5 second interval.",
655 },
656 [25] = {
657 ["f"] = SW_GetTopHealDelta,
658 ["t"] = "Top Heal Interval (S)",
659 ["varType"] = "SELF",
660 ["d"] = "This only works with people in a SyncChannel. It shows the maximum increase in healing the player reported (for himself) in a 5 second interval.",
661 },
662 --[[ added and removed in 1.5.3.beta 1 the behavior is not "natural"
663 people joining late will still be measured mit total raid time
664 [26] = {
665 ["f"] = SW_GetDmgInfoDPS,
666 ["t"] = "DPS Per Player (S)",
667 ["varType"] = "PETONLY",
668 ["d"] = "This may differ from personal DPS info. The timer used for 'in fight' is the time the RAID has been in fight. (You should be doing something while the raid is, and if people kill rats, blame them not me)",
669 ["showPF"] = true,
670 },
671 --]]
672 }
673  
674 --[[ SW_checkSIOI
675 SW_checkSINeeded
676 1.5.3.beta.1
677 Added the above two Delta vals as standard info already because they are interesting if you aren't looking for cheaters aswell.
678  
679 For those reading code - im not ready with this, but I want to add a "sanity check" for numbers
680 that come through the sync channel
681 Essentially it's a cheat protection measure
682 Under normal circumstance:
683 -on average only a certain percent (on average) will be needed for SI msgs
684 if the percentage is to high this person is most likely using a personal dmg/heal modifier
685 - once things "setteled" in the sync channel very few SIOI msgs are needed
686 if somebody is spamming these he most likely is using a "global" dmg/heal modifier
687 (add dmg to my guildies)
688  
689 It's not bad to have high numbers here the question is how they compare to others in sync
690  
691 If you want to use this already - i discuourage it, I havent been able to check myself whats "normal"
692 Eg in certain encounters where you HAVE to split up, needed will be higher
693 In encounters where all should be cuddeled up in one spot needed should be very low
694 on average though, it should level out again
695  
696 But, if one person shows up very high on both lists this is VERY suspicious
697  
698 All in all the basic idea is that every client in sync will try to identify unnormal data
699 for full msg track info do
700 /script SW_DumpTable(SW_Sync_MsgTrack) - that works even with the following funcs disabeled
701  
702 And BTW it sucks mokey balls i even have to do this, cause people go through lengths to enlarge their epeen
703  
704 function SW_SYNCCHECK()
705 return SW_checkSIOI();
706 end
707 function SW_SYNCCHECKNEEDED()
708 return SW_checkSINeeded();
709 end
710 table.insert(SW_InfoTypes, {["f"] = SW_SYNCCHECK,
711 ["t"] = "SIOICheck",
712 ["varType"] = "SELF",
713 ["d"] = "For now this is just for DEV - Checks how often somebody triggered an SIOI",
714 });
715 table.insert(SW_InfoTypes, {["f"] = SW_SYNCCHECKNEEDED,
716 ["t"] = "SI Needed Check",
717 ["varType"] = "SELF",
718 ["d"] = "For now this is just for DEV - Checks how many SI where really needed",
719 });
720 --]]
721 SW_SlashCommands = {
722 ["help"] = { ["c"] = "?",
723 ["si"] = "Show console help.",
724 ["aC"] = 0,
725 ["f"] = SW_PrintHelp,
726 },
727 ["console"] = { ["c"] = "con",
728 ["si"] = "Brings up the SW Stats console",
729 ["aC"] = 0,
730 ["f"] = SW_ToggleConsole,
731 },
732 ["dumpVar"] = { ["c"] = "dump",
733 ["si"] = "dumps a var",
734 ["u"] = "Usage:"..SW_RootSlashes[1].." dump nameOfVar",
735 ["aC"] = 1,
736 ["f"] = SW_DumpVar,
737 },
738 ["reset"] = { ["c"] = "reset",
739 ["si"] = "Empty the Stat tables",
740 ["aC"] = 0,
741 ["f"] = SW_ResetCheck,
742 },
743 ["toggleBars"]={["c"] = "bars",
744 ["si"] = "Shows or hides the main window.",
745 ["aC"] = 0,
746 ["f"] = SW_ToggleBarFrame,
747 },
748 ["toggleGS"] = {["c"] = "gs",
749 ["si"] = "Shows or hides the General Settings.",
750 ["aC"] = 0,
751 ["f"] = SW_ToggleGeneralSettings,
752 },
753 ["skillUsage"] = {["c"] = "su",
754 ["si"] = "Shows Skill usage of people in the SyncChannel in the console. The name of the skill has to be EXACTLY the way it is in game.",
755 ["u"] = "Usage:"..SW_RootSlashes[1].." su Name of Skill",
756 ["aC"] = 1,
757 ["f"] = SW_GetSkillUsage,
758 },
759 ["versionCheck"] = {["c"] = "vc",
760 ["si"] = "Does a SW_Stats version check for people in the SyncChannel.",
761 ["aC"] = 0,
762 ["f"] = SW_VersionCheck,
763 },
764 ["syncKick"] = {["c"] = "kick",
765 ["si"] = "Kicks a player from the SyncChannel.",
766 ["u"] = "Usage:"..SW_RootSlashes[1].." kick NameOfPlayer",
767 ["aC"] = 1,
768 ["f"] = SW_KickPlayer,
769 },
770 ["resetVote"]={ ["c"] = "rv",
771 ["si"] = "Starts a vote to reset the SyncChannel.",
772 ["aC"] = 0,
773 ["f"]= SW_InitResetVote,
774 },
775 ["syncJoin"] = {["c"] = "join",
776 ["si"] = "Manually join a SyncChannel",
777 ["u"] = "Usage:"..SW_RootSlashes[1].." join NameOfChannel",
778 ["aC"] = 1,
779 ["f"] = SW_ManualSyncJoin,
780 },
781 ["resetWindows"] = {["c"] = "resetwin",
782 ["si"] = "Resets the position of all windows.",
783 ["aC"] = 0,
784 ["f"] = SW_ResetAllWindows,
785 },
786 ["lockFrame"] = {["c"] = "tlock",
787 ["si"] = "Locks or unlocks the windows.",
788 ["aC"] = 0,
789 ["f"] = SW_ToggleLocks,
790 },
791 }
792  
793 -- GFT = Good For Target
794 -- Y = yes N = no B= both (depends on target)
795 -- as of 1.5.1 im not using this info yet
796 SW_SpellTypes = {
797 [1] = {
798 ["GFT"] = "Y",
799 },
800 [2] = {
801 ["GFT"] = "Y",
802 },
803 [3] = {
804 ["GFT"] = "B",
805 },
806 [4] = {
807 ["GFT"] = "Y",
808 },
809 [5] = {
810 ["GFT"] = "Y",
811 },
812 [6] = {
813 ["GFT"] = "Y",
814 },
815 [7] = {
816 ["GFT"] = "Y",
817 },
818 [8] = {
819 ["GFT"] = "Y",
820 },
821 [9] = {
822 ["GFT"] = "Y",
823 },
824 [10] = {
825 ["GFT"] = "N",
826 },
827  
828 };
829  
830  
831 -- does nothing for english, but a stub for other languages
832 function SW_FixLogStrings(str)
833 return str;
834 end
835  
836 function SW_mergeLocalization()
837  
838 local locInfo = SW_LocalizedCommands;
839  
840 if locInfo ~= nil then
841 for k,v in pairs(SW_SlashCommands) do
842 if locInfo[k] ~= nil then
843 if locInfo[k]["c"] ~= nil then
844 SW_SlashCommands[k]["c"] = locInfo[k]["c"];
845 end
846 if locInfo[k]["si"] ~= nil then
847 SW_SlashCommands[k]["si"] = locInfo[k]["si"];
848 end
849 if locInfo[k]["u"] ~= nil then
850 SW_SlashCommands[k]["u"] = locInfo[k]["u"];
851 end
852 end
853 end
854 end
855 if SW_LocalizedGUI ~= nil then
856 for k,v in pairs(SW_GUI) do
857 if SW_LocalizedGUI[k] ~=nil then
858 if type(SW_GUI[k]) == "table" then
859 SW_GUI[k]["s"] = SW_LocalizedGUI[k];
860 else
861 SW_GUI[k] = SW_LocalizedGUI[k];
862 end
863 end
864 end
865 end
866  
867 -- k we are done merging dump the tables
868 SW_LocalizedCommands = nil;
869 SW_LocalizedGUI = nil;
870 end