├── .gitattributes
├── CensusButton.lua
├── CensusButton.xml
├── CensusPlayerList.lua
├── CensusPlayerList.xml
├── CensusPlus.lua
├── CensusPlus.xml
├── CensusPlusPVP.lua
├── CensusPlusProfiler.lua
├── CensusPlusTurtle.toc
├── GPL.txt
├── Preview.png
├── README.md
├── Skin
├── CensusButton-Down.tga
├── CensusButton-Paused.tga
├── CensusButton-Running.tga
├── CensusButton-Up.tga
├── CensusPlus_10.tga
├── CensusPlus_11.tga
├── CensusPlus_12.tga
├── CensusPlus_13.tga
├── CensusPlus_14.tga
├── CensusPlus_15.tga
├── CensusPlus_16.tga
├── CensusPlus_17.tga
├── CensusPlus_18.tga
├── CensusPlus_20.tga
├── CensusPlus_21.tga
├── CensusPlus_22.tga
├── CensusPlus_23.tga
├── CensusPlus_24.tga
├── CensusPlus_25.tga
├── CensusPlus_26.tga
├── CensusPlus_27.tga
├── CensusPlus_28.tga
├── CensusPlus_29.tga
├── CensusPlus_Bar.tga
├── CensusPlus_Icon.tga
├── CensusPlus_LevelBar.tga
├── CensusPlus_Mini.tga
├── CensusPlus_Unknown.tga
├── CensusPlus_Window_BottomRight.tga
├── CensusPlus_Window_Left.tga
├── CensusPlus_Window_Mid.tga
└── CensusPlus_Window_TopRight.tga
├── Sounds
└── CensusComplete.ogg
├── UpdateUI.xml
├── libs
├── AceLibrary
│ └── AceLibrary.lua
├── AceLocale-2.2
│ └── AceLocale-2.2.lua
└── Babble-Class-2.2
│ └── Babble-Class-2.2.lua
├── localization.de.lua
├── localization.fr.lua
├── localization.lua
└── readme.txt
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/CensusButton.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | CensusPlus for World of Warcraft(tm).
3 |
4 | Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com
5 |
6 | License:
7 | This program is free software; you can redistribute it and/or
8 | modify it under the terms of the GNU General Public License
9 | as published by the Free Software Foundation; either version 2
10 | of the License, or (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with this program(see GLP.txt); if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 | ]]
21 |
22 |
23 | local init = false;
24 |
25 | function CensusButton_OnClick()
26 | CensusPlus_Toggle();
27 | end
28 |
29 | function CensusButton_Init()
30 | if(CensusPlus_Database["Info"]["CensusButtonShown"] == 1 ) then
31 | CensusButtonFrame:Show();
32 | else
33 | CensusButtonFrame:Hide();
34 | end
35 |
36 | init = true;
37 | end
38 |
39 | function CensusButton_Toggle()
40 | if(CensusButtonFrame:IsVisible()) then
41 | CensusButtonFrame:Hide();
42 | CensusPlus_Database["Info"]["CensusButtonShown"] = false;
43 | else
44 | CensusButtonFrame:Show();
45 | CensusPlus_Database["Info"]["CensusButtonShown"] = true;
46 | end
47 | end
48 |
49 | function CensusButton_UpdatePosition()
50 | CensusButtonFrame:SetPoint(
51 | "TOPLEFT",
52 | "Minimap",
53 | "TOPLEFT",
54 | 54 - (78 * cos(CensusPlus_Database["Info"]["CensusButtonPosition"])),
55 | (78 * sin(CensusPlus_Database["Info"]["CensusButtonPosition"])) - 55
56 | );
57 | end
58 |
59 | local CensusUpdateFrame = CreateFrame("FRAME", "CensusUpdateFrame");
60 | CensusUpdateFrame:SetScript('OnUpdate', function()
61 | if( init ) then
62 | CensusPlus_OnUpdate();
63 | end
64 | end)
65 |
66 | function CensusButton_OnUpdate()
67 | end
68 |
69 | function CensusPlusButton_OnClick( arg1 )
70 | if ( arg1 == "LeftButton" ) then
71 | CensusButton_OnClick();
72 | else
73 | ToggleDropDownMenu( 1, nil, CP_ButtonDropDown, "CensusButtonFrame", 20, 20 );
74 | end
75 |
76 | end
77 |
78 | function CensusPlus_ButtonDropDown_Initialize()
79 |
80 | local info;
81 |
82 | if (g_IsCensusPlusInProgress == true) then
83 | if( g_CensusPlusManuallyPaused == true ) then
84 | info = {
85 | text = CENSUSPlus_UNPAUSE;
86 | func = CensusPlus_Take_OnClick;
87 | };
88 | else
89 | info = {
90 | text = CENSUSPlus_PAUSE;
91 | func = CensusPlus_Take_OnClick;
92 | };
93 | end
94 | else
95 | info = {
96 | text = CENSUSPlus_TAKE;
97 | func = CensusPlus_Take_OnClick;
98 | };
99 | end
100 | UIDropDownMenu_AddButton(info);
101 |
102 | info = {
103 | text = CENSUSPlus_STOP;
104 | func = CensusPlus_StopCensus;
105 | };
106 | UIDropDownMenu_AddButton(info);
107 |
108 | info = {
109 | text = CENSUSPlus_CANCEL;
110 | func = CloseDropDownMenus;
111 | };
112 | UIDropDownMenu_AddButton(info);
113 |
114 | end
115 |
--------------------------------------------------------------------------------
/CensusButton.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
65 |
66 |
67 |
68 | this:RegisterEvent("VARIABLES_LOADED");
69 |
70 |
71 | CensusButton_Init();
72 | CensusButton_UpdatePosition();
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/CensusPlayerList.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | CensusPlus for World of Warcraft(tm).
3 |
4 | Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com
5 |
6 | License:
7 | This program is free software; you can redistribute it and/or
8 | modify it under the terms of the GNU General Public License
9 | as published by the Free Software Foundation; either version 2
10 | of the License, or (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with this program(see GLP.txt); if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 | ]]
21 |
22 | local blclass = AceLibrary("Babble-Class-2.2")
23 | ------------------------------------------------------------------------------------
24 | --
25 | -- CensusPlus
26 | -- A WoW UI customization by Cooper Sellers
27 | --
28 | --
29 | ------------------------------------------------------------------------------------
30 |
31 | local g_PlayerList = {};
32 | local g_PlayerLookupTable = {};
33 | local CensusPlus_NumPlayerButtons = 20;
34 | local g_MaxNumListed = 1000;
35 | local g_sort = "name"
36 |
37 | function CensusPlus_ShowPlayerList()
38 | CP_PlayerListWindow:Show();
39 | end
40 |
41 | function CensusPlus_PlayerListOnShow()
42 |
43 | debugprofilestart();
44 |
45 | local guildKey = nil;
46 | local raceKey = nil;
47 | local classKey = nil;
48 | local levelKey = nil;
49 |
50 |
51 | --
52 | -- Clear our character list
53 | --
54 | CensusPlus_ClearPlayerList();
55 |
56 | --
57 | -- Get realm and faction
58 | --
59 | local realmName = g_CensusPlusLocale .. GetCVar("realmName");
60 | if( realmName == nil ) then
61 | return;
62 | end
63 |
64 | local factionGroup = UnitFactionGroup("player");
65 | if( factionGroup == nil ) then
66 | return;
67 | end
68 |
69 |
70 | --
71 | -- Has the user made any selections?
72 | --
73 | if (g_GuildSelected > 0) then
74 | guildKey = CensusPlus_Guilds[g_GuildSelected].m_Name;
75 | end
76 | if (g_RaceSelected > 0) then
77 | local thisFactionRaces = CensusPlus_GetFactionRaces(factionGroup);
78 | raceKey = thisFactionRaces[g_RaceSelected];
79 | end
80 | if (g_ClassSelected > 0) then
81 | local thisFactionClasses = CensusPlus_GetFactionClasses(factionGroup);
82 | classKey = thisFactionClasses[g_ClassSelected];
83 | end
84 | if (g_LevelSelected > 0 or g_LevelSelected < 0) then
85 | levelKey = g_LevelSelected;
86 | end
87 |
88 | debugprofilestart();
89 |
90 | CensusPlus_ForAllCharacters( realmName, factionGroup, raceKey, classKey, guildKey, levelKey, CensusPlus_AddPlayerToList);
91 |
92 | if( CensusPlus_EnableProfiling ) then
93 | CensusPlus_Msg( "PROFILE: Time to do calcs 1 " .. debugprofilestop() / 1000000000 );
94 | debugprofilestart();
95 | end
96 |
97 |
98 | --
99 | -- Build our list
100 | --
101 | CensusPlus_UpdatePlayerListButtons();
102 |
103 | local totalCharactersText = format(CENSUSPlus_TOTALCHAR, table.getn( g_PlayerList ) );
104 | if( table.getn( g_PlayerList ) == g_MaxNumListed ) then
105 | totalCharactersText = totalCharactersText .. " -- " .. CENSUSPlus_MAXXED;
106 | end
107 |
108 | CensusPlayerListCount:SetText(totalCharactersText);
109 |
110 | end
111 |
112 | ----------------------------------------------------------------------------------
113 | --
114 | -- Predicate function which can be used to compare two characters for sorting
115 | --
116 | ---------------------------------------------------------------------------------
117 |
118 | function CensusPlus_ChangeSort(sort)
119 | g_sort = g_sort == sort and ("-"..sort) or sort
120 | CensusPlus_UpdatePlayerListButtons()
121 | end
122 |
123 |
124 | local function CharacterPredicate(lhs, rhs)
125 | --
126 | -- nil references are always less than
127 | --
128 |
129 | if (lhs == nil) then
130 | return (rhs ~= nil);
131 | elseif (rhs == nil) then
132 | return false;
133 | end
134 |
135 | if g_sort == "lvl" or g_sort == "-lvl" then
136 | if (lhs.m_level < rhs.m_level) then
137 | return g_sort == "lvl"
138 | elseif (rhs.m_level < lhs.m_level) then
139 | return g_sort == "-lvl"
140 | end
141 | end
142 |
143 | if g_sort == "guild" or g_sort == "-guild"then
144 | if (lhs.m_guild < rhs.m_guild) then
145 | return g_sort == "guild"
146 | elseif (rhs.m_guild < lhs.m_guild) then
147 | return g_sort == "-guild"
148 | end
149 | end
150 |
151 | if g_sort == "class" or g_sort == "-class" then
152 | if (lhs.m_class < rhs.m_class) then
153 | return g_sort == "class"
154 | elseif (rhs.m_class < lhs.m_class) then
155 | return g_sort == "-class"
156 | end
157 | end
158 |
159 | --
160 | -- Sort by name
161 | --
162 | if g_sort == "name" or g_sort == "-name" then
163 | if (lhs.m_name < rhs.m_name) then
164 | return g_sort == "name"
165 | elseif (rhs.m_name < lhs.m_name) then
166 | return g_sort == "-name"
167 | end
168 | end
169 | --
170 | -- Sort by level
171 | --
172 | if g_sort ~= "lvl" and g_sort ~= "-lvl" then
173 | if (lhs.m_level < rhs.m_level) then
174 | return false
175 | elseif (rhs.m_level < lhs.m_level) then
176 | return true
177 | end
178 | end
179 |
180 | --
181 | -- identical
182 | --
183 | return false;
184 | end
185 |
186 | local function CensusPlus_UpdatePlayerLookup( index, entry )
187 | --
188 | -- Have to update our table
189 | --
190 | g_PlayerLookupTable[entry.m_name] = index;
191 | end
192 |
193 |
194 |
195 | ----------------------------------------------------------------------------------
196 | --
197 | -- Update the Player button contents
198 | --
199 | ---------------------------------------------------------------------------------
200 | function CensusPlus_UpdatePlayerListButtons()
201 | --
202 | -- Sort the list
203 | --
204 | local size = table.getn(g_PlayerList);
205 | if (size) then
206 | table.sort(g_PlayerList, CharacterPredicate);
207 |
208 | table.foreach(g_PlayerList, CensusPlus_UpdatePlayerLookup );
209 |
210 | end
211 | --Sea.io.printTable(g_PlayerList)
212 | --
213 | -- Determine where the scroll bar is
214 | --
215 | local offset = FauxScrollFrame_GetOffset( CensusPlusPlayerListScrollFrame );
216 | --
217 | -- Walk through all the rows in the frame
218 | --
219 | local i = 1;
220 | while( i <= CensusPlus_NumPlayerButtons ) do
221 | --
222 | -- Get the index to the ad displayed in this row
223 | --
224 | local iPlayer = i + offset;
225 | --
226 | -- Get the button on this row
227 | --
228 | local button = getglobal("CensusPlusPlayerButton"..i);
229 | --
230 | -- Is there a valid Player on this row?
231 | --
232 | if (iPlayer <= size) then
233 | local player = g_PlayerList[iPlayer];
234 | --
235 | -- Update the button text
236 | --
237 | button:Show();
238 | local textField = "CensusPlusPlayerButton"..i.."Name";
239 | if ( player.m_name == nil or player.m_name == "") then
240 | getglobal(textField):SetText( "None" );
241 | else
242 | getglobal(textField):SetText( string.format("|cff%s%s|r", (blclass:GetHexColor(player.m_class) or "000000"), player.m_name) );
243 | end
244 |
245 | textField = "CensusPlusPlayerButton"..i.."Level";
246 | if ( player.m_level == nil or player.m_level == "") then
247 | getglobal(textField):SetText( "n/a" );
248 | else
249 | getglobal(textField):SetText( player.m_level );
250 | end
251 |
252 | textField = "CensusPlusPlayerButton"..i.."Class";
253 | if ( player.m_class == nil or player.m_class == "") then
254 | getglobal(textField):SetText( "-" );
255 | else
256 | getglobal(textField):SetText(string.format("|cff%s%s|r", (blclass:GetHexColor(player.m_class) or "000000"), player.m_class) );
257 | end
258 |
259 | textField = "CensusPlusPlayerButton"..i.."Guild";
260 | if ( player.m_guild == nil or player.m_guild == "") then
261 | getglobal(textField):SetText( "Unguilded" );
262 | else
263 | getglobal(textField):SetText( player.m_guild );
264 | end
265 |
266 | textField = "CensusPlusPlayerButton"..i.."LastSeen";
267 | if ( player.m_foo == nil or player.m_foo == "") then
268 | getglobal(textField):SetText( "-" );
269 | else
270 | getglobal(textField):SetText( player.m_foo );
271 | end
272 | else
273 | --
274 | -- Hide the button
275 | --
276 | button:Hide();
277 | end
278 | --
279 | -- Next row
280 | --
281 | i = i + 1;
282 | end
283 | --
284 | -- Update the scroll bar
285 | --
286 | FauxScrollFrame_Update(CensusPlusPlayerListScrollFrame, size, CensusPlus_NumPlayerButtons, CensusPlus_GUILDBUTTONSIZEY);
287 | end
288 |
289 | ----------------------------------------------------------------------------------
290 | --
291 | -- Find a characters in the g_PlayerList array by name
292 | --
293 | ---------------------------------------------------------------------------------
294 | function CensusPlus_PlayerButton_OnClick()
295 | local id = this:GetID();
296 | local offset = FauxScrollFrame_GetOffset( CensusPlusPlayerListScrollFrame );
297 | local newSelection = id + offset;
298 |
299 | local player = g_PlayerList[newSelection];
300 | FriendsFrame_ShowDropdown(player.m_name, 1);
301 | end
302 |
303 | ----------------------------------------------------------------------------------
304 | --
305 | -- Clear all the characters
306 | --
307 | ---------------------------------------------------------------------------------
308 | function CensusPlus_ClearPlayerList()
309 | g_PlayerList = nil;
310 | g_PlayerList = {};
311 |
312 | g_PlayerLookupTable = nil;
313 | g_PlayerLookupTable = {};
314 | end
315 |
316 | ----------------------------------------------------------------------------------
317 | --
318 | -- Add a character to the list
319 | --
320 | ---------------------------------------------------------------------------------
321 | function CensusPlus_AddPlayerToList( name, level, guild, race, class, foo )
322 | local size = table.getn( g_PlayerList );
323 |
324 | if( size >= g_MaxNumListed ) then
325 | return;
326 | end
327 |
328 | local index = g_PlayerLookupTable[name];
329 | if (index == nil) then
330 | local size = table.getn( g_PlayerList );
331 | index = size + 1;
332 | g_PlayerList[index] = { m_name = name, m_level = level, m_guild = guild, m_race=race, m_class = class, m_foo = foo };
333 | g_PlayerLookupTable[name] = index;
334 | end
335 | end
336 |
337 |
--------------------------------------------------------------------------------
/CensusPlayerList.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
165 |
186 |
207 |
228 |
249 |
270 |
271 |
280 |
289 |
298 |
307 |
316 |
325 |
334 |
343 |
352 |
361 |
370 |
379 |
388 |
397 |
406 |
415 |
424 |
433 |
442 |
451 |
452 |
453 |
454 |
455 |
456 |
457 |
458 |
459 |
460 |
461 |
462 |
463 |
464 | FauxScrollFrame_OnVerticalScroll(CensusPlus_GUILDBUTTONSIZEY, CensusPlus_UpdatePlayerListButtons);
465 |
466 |
467 |
468 |
469 |
470 |
471 | CensusPlus_PlayerListOnShow();
472 |
473 |
474 | if ( this.isMoving ) then
475 | this:StopMovingOrSizing();
476 | this.isMoving = false;
477 | end
478 |
479 |
480 | if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
481 | this:StartMoving();
482 | this.isMoving = true;
483 | end
484 |
485 |
486 | if ( this.isMoving ) then
487 | this:StopMovingOrSizing();
488 | this.isMoving = false;
489 | end
490 |
491 |
492 |
493 |
494 |
--------------------------------------------------------------------------------
/CensusPlusPVP.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | CensusPlus for World of Warcraft(tm).
3 |
4 | Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com
5 |
6 | License:
7 | This program is free software; you can redistribute it and/or
8 | modify it under the terms of the GNU General Public License
9 | as published by the Free Software Foundation; either version 2
10 | of the License, or (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with this program(see GLP.txt); if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 | ]]
21 |
22 |
23 | ------------------------------------------------------------------------------------
24 | --
25 | -- CensusPlus - PVP section
26 | -- A WoW UI customization by Cooper Sellers
27 | --
28 | --
29 | ------------------------------------------------------------------------------------
30 |
31 | local damagedTable = { };
32 |
33 | -----------------------------------------------------------------------------------
34 | --
35 | -- CensusPlus_PVPDeath -- Someone dies
36 | --
37 | -----------------------------------------------------------------------------------
38 | function CensusPlus_PVPDeath( msg )
39 |
40 |
41 | -- CensusPlus_Msg( "Msg = " .. msg );
42 | -- local value = string.sub( msg, 0, index-1 );
43 | end
44 |
45 | -----------------------------------------------------------------------------------
46 | --
47 | -- CensusPlus_PVPDamage -- Damage is done
48 | --
49 | -----------------------------------------------------------------------------------
50 | function CensusPlus_PVPDamage( victim, dmg )
51 | local dealer = "player";
52 | local vict = "target";
53 | if( victim == "player" ) then
54 | -- Hit us instead
55 | end
56 | end
57 |
58 |
59 | -----------------------------------------------------------------------------------
60 | --
61 | -- CensusPlus_ProcefssHonorInpsect -- Process honor inspect
62 | --
63 | -----------------------------------------------------------------------------------
64 | function CensusPlus_ProcessHonorInpsect()
65 | local todayHK, todayDK,
66 | yesterdayHK, yesterdayDK,
67 | thisweekHK, thisweekHonor,
68 | lastweekHK, lastweekHonor, lastweekStanding,
69 | lifetimeHK, lifetimeDK, lifetimeHighestRank = GetInspectHonorData()
70 |
71 | if( g_CensusPlusLastTarget ~= nil ) then
72 | g_CensusPlusLastTarget[4] = lifetimeHK;
73 | g_CensusPlusLastTarget[5] = CensusPlus_DetermineServerDate() .. "&" .. lastweekHonor .. "&" .. lastweekStanding;
74 | g_CensusPlusLastTarget[6] = lifetimeHighestRank;
75 |
76 | g_CensusPlusLastTarget[7] = CensusPlus_DetermineServerDate() .. "";
77 | end
78 |
79 | local unit = InspectFrame.unit;
80 |
81 | -- ClearInspectPlayer();
82 | g_CensusPlusLastTargetName = nil;
83 | g_CensusPlusLastTarget = nil;
84 | -- InspectFrame.unit = nil;
85 | end
86 |
87 | -----------------------------------------------------------------------------------
88 | --
89 | -- CensusPlus_ProcessMyHonor -- Process player honor
90 | --
91 | -----------------------------------------------------------------------------------
92 | function CensusPlus_ProcessMyHonor()
93 | --
94 | -- Get the portion of the database for this server
95 | --
96 | local realmName = g_CensusPlusLocale .. GetCVar("realmName");
97 | local realmDatabase = CensusPlus_Database["Servers"][realmName];
98 | if (realmDatabase == nil) then
99 | CensusPlus_Database["Servers"][realmName] = {};
100 | realmDatabase = CensusPlus_Database["Servers"][realmName];
101 | end
102 |
103 | --
104 | -- Get the portion of the database for this faction
105 | --
106 | local factionGroup = "TURTLE";
107 | local factionDatabase = realmDatabase[factionGroup];
108 | if (factionDatabase == nil) then
109 | realmDatabase[factionGroup] = {};
110 | factionDatabase = realmDatabase[factionGroup];
111 | end
112 |
113 | --
114 | -- Get racial database
115 | --
116 | local raceGroup = UnitRace("player");
117 | local raceDatabase = factionDatabase[raceGroup];
118 | if (raceDatabase == nil) then
119 | factionDatabase[raceGroup] = {};
120 | raceDatabase = factionDatabase[raceGroup];
121 | end
122 |
123 | --
124 | -- Get class database
125 | --
126 | local classGroup = UnitClass( "player" );
127 | local classDatabase = raceDatabase[classGroup];
128 | if (classDatabase == nil) then
129 | raceDatabase[classGroup] = {};
130 | classDatabase = raceDatabase[classGroup];
131 | end
132 |
133 | --
134 | -- Get this player's entry
135 | --
136 | local playerName = UnitName( "player" );
137 | local entry = classDatabase[playerName];
138 | if (entry == nil) then
139 | classDatabase[playerName] = {};
140 | entry = classDatabase[playerName];
141 | end
142 |
143 | local honorableKills, dishonorableKills, highestRank = GetPVPLifetimeStats();
144 | local lwhk, lwdk, lwcontribution, lwrank = GetPVPLastWeekStats()
145 |
146 | --
147 | -- Update the information
148 | --
149 |
150 | entry[1] = UnitLevel("player");
151 | entry[2], rank, index = GetGuildInfo("player");
152 | entry[3] = CensusPlus_DetermineServerDate() .. "";
153 | entry[4] = honorableKills;
154 |
155 |
156 | entry[5] = CensusPlus_DetermineServerDate() .. "&" .. lwcontribution .. "&" .. lwrank;
157 | -- entry[5] = dishonorableKills;
158 | entry[6] = highestRank;
159 |
160 | entry[7] = CensusPlus_DetermineServerDate() .. "";
161 |
162 | if( entry ~= nil ) then
163 | rankNumber = UnitPVPRank("player");
164 | if( rankNumber ~= 0 ) then
165 | -- rankName= GetPVPRankInfo( rankNumber )
166 | entry[8] = rankNumber; -- slot 8 will be current rank
167 | else
168 | entry[8] = 0; -- slot 8 will be current rank
169 | end
170 | end
171 | end
172 |
--------------------------------------------------------------------------------
/CensusPlusProfiler.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | CensusPlus for World of Warcraft(tm).
3 |
4 | Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com
5 |
6 | License:
7 | This program is free software; you can redistribute it and/or
8 | modify it under the terms of the GNU General Public License
9 | as published by the Free Software Foundation; either version 2
10 | of the License, or (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with this program(see GLP.txt); if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 | ]]
21 |
22 |
23 | CensusPlus_DoThisCharacter = false;
24 | CensusPlus_Profile = {};
25 | CensusPlus_Profile[GetCVar("realmName")] = {} ;
26 | local myCPProfile_LOADED = nil; -- Successful load of the script
27 |
28 | -- //////////////////////////////////////////////
29 | -- Configuration Variables
30 | -- //////////////////////////////////////////////
31 | -- set to nil to disable any of the following
32 |
33 | myCPProfile_ENABLED = 1; -- Enable the profiler?
34 |
35 | local myCPProfile_DoScanInventory = 0; -- get inventory?
36 | local myCPProfile_DoScanBank = 0; -- get bank?
37 | local myCPProfile_DoScanEquipment = 1; -- get equipment?
38 | local myCPProfile_DoScanSkills = 0; -- get skills?
39 | local myCPProfile_DoScanTalents = 0; -- get talents?
40 | local myCPProfile_DoScanProfessions = 0; -- output known tradeskill recipies
41 | local myCPProfile_DoScanReputation = 0; -- get reputation?
42 | local myCPProfile_DoScanQuestLog = 0; -- get quests?
43 | local myCPProfile_DoScanHonor = 0; -- get honor?
44 |
45 | local myCPProfile_HTML_Tooltips = 1; -- make html tooltips (non-array format) - separate lines with
46 | local myCPProfile_TALENTS_Full = 1; -- output all talents and tooltips
47 |
48 |
49 | local myCPProfile_DEBUG = 1; -- enable debugging? unused at this time
50 | local myCPProfile_ALLEVENTS = nil; -- enable all event catching? for debugging only
51 |
52 | -- //////////////////////////////////////////////
53 |
54 | local TradeSkillDifficultyCode = {};
55 | TradeSkillDifficultyCode['optimal'] = 4;
56 | TradeSkillDifficultyCode['medium'] = 3;
57 | TradeSkillDifficultyCode['easy'] = 2;
58 | TradeSkillDifficultyCode['trivial'] = 1;
59 | TradeSkillDifficultyCode['header'] = 0;
60 |
61 | local myCPProfile_VERSION = "1.0.0"; -- this only changes when a new variable is added to the output
62 |
63 | local timePlayed = -1;
64 | local timeLevelPlayed = -1;
65 |
66 | -- array of inventory slot names
67 | local Profile_slots = {
68 | "Head", -- 1
69 | "Neck", -- 2
70 | "Shoulder", -- 3
71 | "Shirt", -- 4
72 | "Chest", -- 5
73 | "Waist", -- 6
74 | "Legs", -- 7
75 | "Feet", -- 8
76 | "Wrist", -- 9
77 | "Hands", -- 10
78 | "Finger0", -- 11
79 | "Finger1", -- 12
80 | "Trinket0", -- 13
81 | "Trinket1", -- 14
82 | "Back", -- 15
83 | "MainHand", -- 16
84 | "SecondaryHand", -- 17
85 | "Ranged", -- 18
86 | "Tabard", -- 19
87 | };
88 |
89 | function CP_ProfileFrame_OnLoad()
90 | this:RegisterEvent("VARIABLES_LOADED");
91 | if ( myCPProfile_ALLEVENTS ) then -- unused, but keep for testing
92 | this:RegisterEvent("PLAYER_GUILD_UPDATE");
93 | this:RegisterEvent("UNIT_INVENTORY_CHANGED");
94 | this:RegisterEvent("VARIABLES_LOADED");
95 | this:RegisterEvent("TRAINER_CLOSED");
96 | this:RegisterEvent("PLAYER_LEVEL_UP");
97 | end
98 | this:RegisterEvent("TIME_PLAYED_MSG");
99 | this:RegisterEvent("BANKFRAME_CLOSED"); -- 12/17, was OPENED, will it work with closed only?
100 |
101 | this:RegisterEvent("TRADE_SKILL_SHOW");
102 | this:RegisterEvent("CRAFT_SHOW");
103 | end
104 |
105 | -- since PLAYER_QUITTING and PLAYER_CAMPING events don't work, hook the functions
106 | -- NOTE: Due to server lag, this could be a cause of the client not actually logging the character out until the server catches up
107 | --[[
108 | oldLogout = Logout;
109 | oldQuit = Quit;
110 | function Quit()
111 | RequestTimePlayed();
112 | oldQuit();
113 | end
114 | function Logout()
115 | RequestTimePlayed();
116 | oldLogout();
117 | end
118 | ]]--
119 |
120 | function CP_ProfileFrame_OnEvent(event, arg1, arg2)
121 | -- crapout if we're not ready to process, or if not enabled
122 | if ( ( event == "UNIT_INVENTORY_CHANGED" and arg1 ~= "player" ) or not myCPProfile_ENABLED or not UnitName("player") or UnitName("player") == UNKNOWNOBJECT or not GetCVar("realmName") or not CensusPlus_DoThisCharacter ) then
123 | return;
124 | end
125 |
126 | -- CensusPlus_Msg( "PROF TEST : " .. event );
127 |
128 | -- Got a unit name, now we're loaded
129 | if (event == "VARIABLES_LOADED" and not myCPProfile_LOADED) then
130 | myCPProfile_LOADED = 1;
131 | PaperDollFrame_SetDamage();
132 | PaperDollFrame_SetRangedDamage();
133 | elseif (event == "VARIABLES_LOADED" and myCPProfile_LOADED) then
134 | return;
135 | end
136 |
137 | if (event == "TIME_PLAYED_MSG") then
138 | timePlayed = arg1;
139 | timeLevelPlayed = arg2;
140 | end
141 |
142 | -- Event hit, process profile
143 | if (myCPProfile_LOADED) then
144 | Profile_InitProfile(); -- Always do this first, creates a profile is it doesn't exist
145 |
146 | if( ( event == "BANKFRAME_CLOSED" or event == "BANKFRAME_OPENED" or event == "PLAYERBANKSLOTS_CHANGED" ) and myCPProfile_DoScanBank ) then
147 | Profile_ScanBank();
148 | CP_ProfHidden:ClearLines();
149 | CP_ProfHidden:Hide();
150 | return;
151 | end
152 | if ( not myCPProfile_DoScanBank and CensusPlus_Profile[GetCVar("realmName")][UnitName("player")] ) then
153 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"] = nil;
154 | end
155 | if ( myCPProfile_DoScanProfessions ) then
156 | if ( event == "TRADE_SKILL_SHOW" ) then
157 | Profile_ScanTradeSkill();
158 | CP_ProfHidden:ClearLines();
159 | CP_ProfHidden:Hide();
160 | return;
161 | end
162 |
163 | if ( event == "CRAFT_SHOW" ) then
164 | Profile_ScanCraft();
165 | CP_ProfHidden:ClearLines();
166 | CP_ProfHidden:Hide();
167 | return;
168 | end
169 | elseif ( CensusPlus_Profile[GetCVar("realmName")][UnitName("player")] ) then
170 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] = nil;
171 | end
172 |
173 | CP_ProfHidden:ClearLines();
174 | CP_ProfHidden:Hide();
175 | end
176 | end
177 |
178 | function Profile_InitProfile()
179 | if ( not CensusPlus_Profile ) then
180 | CensusPlus_Profile = {};
181 | end
182 |
183 | if ( not CensusPlus_Profile[GetCVar("realmName")] ) then
184 | CensusPlus_Profile[GetCVar("realmName")] = {};
185 | end
186 |
187 | if ( not CensusPlus_Profile[GetCVar("realmName")][UnitName("player")] ) then
188 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")] = {};
189 | else
190 | local tmpBank = CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"];
191 | local tmpProfessions = CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"];
192 |
193 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")] = { };
194 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"] = tmpBank;
195 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] = tmpProfessions;
196 | end
197 |
198 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["ProfilerVersion"] = myCPProfile_VERSION; -- keep track of version and don't work with old data
199 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Name"] = playerName;
200 |
201 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["DateUpdated"] = date();
202 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["TimePlayed"] = timePlayed;
203 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["TimeLevelPlayed"] = timeLevelPlayed;
204 |
205 | local sex = "";
206 | if (UnitSex("player") == 0) then
207 | sex = "Male";
208 | else
209 | sex = "Female";
210 | end
211 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Sex"] = sex;
212 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Race"] = UnitRace("player");
213 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Class"] = UnitClass("player");
214 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Level"] = UnitLevel("player");
215 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Guild"] = {} ;
216 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Guild"]["GuildName"], CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Guild"]["Title"], CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Guild"]["Rank"] = GetGuildInfo("player");
217 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Server"] = GetCVar("realmName");
218 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["TalentPoints"] = UnitCharacterPoints("player");
219 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Zone"] = GetZoneText();
220 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["SubZone"] = GetSubZoneText();
221 |
222 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Experience"] = UnitXP("player") .. ":" .. UnitXPMax("player");
223 |
224 | local money = GetMoney();
225 | local gold = floor(money / (COPPER_PER_SILVER * SILVER_PER_GOLD));
226 | local silver = floor((money - (gold * COPPER_PER_SILVER * SILVER_PER_GOLD)) / COPPER_PER_SILVER);
227 | local copper = mod(money, COPPER_PER_SILVER);
228 |
229 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Money"] = {};
230 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Money"]["Gold"] = gold;
231 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Money"]["Silver"] = silver;
232 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Money"]["Copper"] = copper;
233 |
234 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"] = {};
235 |
236 | -- "stat" is the same as effectiveStat...
237 | -- problem here is if they have a debuff spell on, the values saved will be wrong
238 | local stat, effectiveStat, posBuff, negBuff = UnitStat("player", 1);
239 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"]["Strength"] = (stat - posBuff - negBuff) .. ":" .. effectiveStat .. ":" .. posBuff .. ":" .. negBuff;
240 | stat, effectiveStat, posBuff, negBuff = UnitStat("player", 2);
241 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"]["Agility"] = (stat - posBuff - negBuff) .. ":" .. effectiveStat .. ":" .. posBuff .. ":" .. negBuff;
242 | stat, effectiveStat, posBuff, negBuff = UnitStat("player", 3);
243 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"]["Stamina"] = (stat - posBuff - negBuff) .. ":" .. effectiveStat .. ":" .. posBuff .. ":" .. negBuff;
244 | stat, effectiveStat, posBuff, negBuff = UnitStat("player", 4);
245 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"]["Intellect"] = (stat - posBuff - negBuff) .. ":" .. effectiveStat .. ":" .. posBuff .. ":" .. negBuff;
246 | stat, effectiveStat, posBuff, negBuff = UnitStat("player", 5);
247 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"]["Spirit"] = (stat - posBuff - negBuff) .. ":" .. effectiveStat .. ":" .. posBuff .. ":" .. negBuff;
248 |
249 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"] = {};
250 | local base, resistance, positive, negative = UnitResistance("player", 6);
251 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"]["Arcane"] = base .. ":" .. resistance .. ":" .. positive .. ":" .. negative;
252 | base, resistance, positive, negative = UnitResistance("player", 2);
253 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"]["Fire"] = base .. ":" .. resistance .. ":" .. positive .. ":" .. negative;
254 | base, resistance, positive, negative = UnitResistance("player", 3);
255 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"]["Nature"] = base .. ":" .. resistance .. ":" .. positive .. ":" .. negative;
256 | base, resistance, positive, negative = UnitResistance("player", 4);
257 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"]["Frost"] = base .. ":" .. resistance .. ":" .. positive .. ":" .. negative;
258 | base, resistance, positive, negative = UnitResistance("player", 5);
259 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"]["Shadow"] = base .. ":" .. resistance .. ":" .. positive .. ":" .. negative;
260 |
261 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Mana"] = UnitManaMax("player");
262 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Health"] = UnitHealthMax("player");
263 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Defense"] = UnitDefense("player");
264 |
265 | local baseArm, effectiveArmor, armor, positiveArm, negativeArm = UnitArmor("player");
266 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Armor"] = baseArm .. ":" .. (baseArm + positiveArm) .. ":" .. positiveArm .. ":" .. negativeArm; -- if they have a debuf on, don't save it
267 |
268 | local minDamage, maxDamage, physicalBonusPos, physicalBonusNeg, percent = UnitDamage("player");
269 | -- local baseDamage = (minDamage + maxDamage) * 0.5;
270 | -- local fullDamage = (baseDamage + physicalBonusPos + physicalBonusNeg) * percent;
271 | -- local totalBonus = (fullDamage - baseDamage);
272 | -- local displayMin = floor(minDamage + totalBonus);
273 | -- local displayMax = ceil(maxDamage + totalBonus);
274 |
275 | CP_ProfHidden:SetOwner(CensusPlus_ProfileFrame, "ANCHOR_CURSOR");
276 |
277 | CP_ProfHidden:SetText(INVTYPE_WEAPONMAINHAND, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
278 | CP_ProfHidden:AddDoubleLine(ATTACK_SPEED_COLON, string.format("%.2f", CharacterDamageFrame.attackSpeed), NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
279 | CP_ProfHidden:AddDoubleLine(DAMAGE_COLON, CharacterDamageFrame.damage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
280 | CP_ProfHidden:AddDoubleLine(DAMAGE_PER_SECOND, string.format("%.1f", CharacterDamageFrame.dps), NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
281 | -- Check for offhand weapon
282 | if ( CharacterDamageFrame.offhandAttackSpeed ) then
283 | CP_ProfHidden:AddLine(" ");
284 | CP_ProfHidden:AddLine(INVTYPE_WEAPONOFFHAND, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
285 | CP_ProfHidden:AddDoubleLine(ATTACK_SPEED_COLON, string.format("%.2f", CharacterDamageFrame.offhandAttackSpeed), NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
286 | CP_ProfHidden:AddDoubleLine(DAMAGE_COLON, CharacterDamageFrame.offhandDamage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
287 | CP_ProfHidden:AddDoubleLine(DAMAGE_PER_SECOND, string.format("%.1f", CharacterDamageFrame.offhandDps), NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
288 | end
289 |
290 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"] = {};
291 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["AttackRating"] = UnitAttackBothHands("player");
292 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["DamageRange"] = floor(minDamage) .. ":" .. ceil(maxDamage);
293 | local base, posBuff, negBuff = UnitAttackPower("player");
294 | local effective = base + posBuff + negBuff;
295 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["AttackPower"] = base .. ":" .. effective .. ":" .. posBuff .. ":" .. negBuff;
296 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["DamageRangeTooltip"] = CP_Tooltipscan();
297 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["AttackPowerTooltip"] = CharacterAttackPowerFrame.tooltipSubtext;
298 |
299 | -- Ranged not saved if there is no ranged weapon equipped
300 | if ( PaperDollFrame.noRanged ) then
301 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"] = nil;
302 | else
303 | CP_ProfHidden:SetText(INVTYPE_RANGED, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
304 | CP_ProfHidden:AddDoubleLine(ATTACK_SPEED_COLON, string.format("%.2f", CharacterRangedDamageFrame.attackSpeed), NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
305 | CP_ProfHidden:AddDoubleLine(DAMAGE_COLON, CharacterRangedDamageFrame.damage, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
306 | CP_ProfHidden:AddDoubleLine(DAMAGE_PER_SECOND, string.format("%.1f", CharacterRangedDamageFrame.dps), NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
307 |
308 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"] = {};
309 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["AttackPowerTooltip"] = CharacterRangedAttackPowerFrame.tooltipSubtext;
310 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["DamageRangeTooltip"] = CP_Tooltipscan();
311 |
312 | local RangeSpeeed, RangeMinDMG,RangeMaxDMG = UnitRangedDamage("player");
313 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["DamageRange"] = max(floor(RangeMinDMG),1) .. ":" .. max(ceil(RangeMaxDMG),1);
314 | local base, pos, neg = UnitRangedAttackPower("player");
315 | local effective = base + pos + neg;
316 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["AttackPower"] = base .. ":" .. effective .. ":" .. pos .. ":" .. neg;
317 | local base, pos, neg = UnitRangedAttack("player");
318 | if (not neg) then neg = 0; end;
319 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["AttackRating"] = base;
320 | end
321 |
322 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["DodgePercent"] = strsub(GetDodgeChance(), 0, 5);
323 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["ParryPercent"] = strsub(GetParryChance(), 0, 5);
324 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["BlockPercent"] = strsub(GetBlockChance(), 0, 5);
325 |
326 | local MainAC, EffAC, AC, PosAC, NegAC = UnitArmor("player");
327 | local Level = UnitLevel("player");
328 | local Mitigation = (EffAC)/((85 * Level)+400);
329 | Mitigation = 100 * (Mitigation/(Mitigation + 1));
330 | Mitigation = strsub(Mitigation, 0, 5);
331 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["MitigationPercent"] = Mitigation;
332 |
333 | local spellIndex = 1;
334 | local spellName, subSpellName = GetSpellName(spellIndex,BOOKTYPE_SPELL);
335 | local tmpStr = nil;
336 | while spellName do
337 | if (spellName == "Attack") then
338 | CP_ProfHidden:SetSpell(spellIndex, BOOKTYPE_SPELL);
339 | if( CP_Tooltipscan() ~= nil ) then
340 | tmpStr = string.gsub(CP_Tooltipscan(), ".* (%d?%d?%d%.%d%d?)%%.*", "%1");
341 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["CritPercent"] = tmpStr;
342 | end
343 | end
344 | spellIndex = spellIndex + 1;
345 | spellName,subSpellName = nil;
346 | spellName,subSpellName = GetSpellName(spellIndex,BOOKTYPE_SPELL);
347 | end
348 | --[[
349 | local speed, offhandSpeed = UnitAttackSpeed("player");
350 | local minDamage, maxDamage, minOffHandDamage, maxOffHandDamage, physicalBonusPos, physicalBonusNeg, percent = UnitDamage("player");
351 | local baseDamage = (minDamage + maxDamage) * 0.5;
352 | local fullDamage = (baseDamage + physicalBonusPos + physicalBonusNeg) * percent;
353 | local damagePerSecond = max( fullDamage, 1 ) / speed;
354 | minDamage = max( floor( minDamage ), 1 );
355 | maxDamage = max( ceil( maxDamage ),1 );
356 | speed = string.format( "%.2f", speed );
357 | damagePerSecond = string.format( "%.1f", damagePerSecond );
358 | local damagerange = minDamage.." - "..maxDamage;
359 | local output = INVTYPE_WEAPONMAINHAND .. " "
360 | .. ATTACK_SPEED_COLON .. speed .. " "
361 | .. DAMAGE_COLON .. damagerange .. " "
362 | .. DAMAGE_PER_SECOND .. damagePerSecond
363 | if ( offhandSpeed ) then
364 | local offhandBaseDamage = (minOffHandDamage + maxOffHandDamage) * 0.5;
365 | local offhandFullDamage = (offhandBaseDamage + physicalBonusPos + physicalBonusNeg) * percent;
366 | local offhandDamagePerSecond = (max(offhandFullDamage,1) / offhandSpeed);
367 | minOffHandDamage=max(floor(minOffHandDamage),1);
368 | maxOffHandDamage=max(ceil(maxOffHandDamage),1);
369 | local damagerange = minOffHandDamage.." - "..maxOffHandDamage;
370 | offhandDamagePerSecond = string.format( "%.1f", offhandDamagePerSecond );
371 | offhandSpeed=string.format("%.2f", offhandSpeed);
372 | output = output .. INVTYPE_WEAPONOFFHAND .. " "
373 | .. ATTACK_SPEED_COLON .. offhandSpeed .. " "
374 | .. DAMAGE_COLON .. damagerange .. " "
375 | .. DAMAGE_PER_SECOND .. offhandDamagePerSecond;
376 | end
377 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["DamageRangeTooltip"] = output;
378 |
379 | local speed, minDamage, maxDamage = UnitRangedDamage("player");
380 | minDamage = (minDamage / percent) - physicalBonusPos - physicalBonusNeg;
381 | maxDamage = (maxDamage / percent) - physicalBonusPos - physicalBonusNeg;
382 | local baseDamage = (minDamage + maxDamage) * 0.5;
383 | local fullDamage = (baseDamage + physicalBonusPos + physicalBonusNeg) * percent;
384 | local damagePerSecond = (max(fullDamage,1) / speed);
385 | minDamage = max(floor(minDamage),1);
386 | maxDamage = max(ceil(maxDamage),1);
387 | speed=string.format("%.2f", speed);
388 | damagePerSecond=string.format("%.1f", damagePerSecond);
389 | local damagerange = max(floor(minDamage),1).." - "..max(ceil(maxDamage),1);
390 | output = INVTYPE_RANGED .. " "
391 | .. ATTACK_SPEED_COLON .. speed .. " "
392 | .. DAMAGE_COLON .. damagerange .. " "
393 | .. DAMAGE_PER_SECOND .. damagePerSecond;
394 | local base,pos,neg=UnitRangedAttack( "player" );
395 | if(base==0) then
396 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["DamageRangeTooltip"] = "";
397 | else
398 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["DamageRangeTooltip"] = output;
399 | end
400 | ]]--
401 | -- put in dps?
402 |
403 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Locale"] = GetLocale();
404 | Profile_DoBuffs();
405 |
406 | if ( myCPProfile_DoScanSkills ) then
407 | Profile_GetSkills();
408 | end
409 | if ( myCPProfile_DoScanEquipment) then
410 | Profile_UpdateInventory();
411 | end
412 | if ( myCPProfile_DoScanInventory ) then
413 | Profile_ScanInventory();
414 | end
415 | if ( myCPProfile_DoScanTalents and UnitLevel("player") > 9 ) then
416 | Profile_GetTalents();
417 | end
418 | if ( myCPProfile_DoScanReputation ) then
419 | Profile_ScanReputation();
420 | end
421 | if ( myCPProfile_DoScanQuestLog ) then
422 | Profile_ScanQuests();
423 | end
424 | if ( myCPProfile_DoScanHonor ) then
425 | Profile_ScanHonor();
426 | end
427 | end
428 |
429 | function Profile_ScanQuests()
430 | local header = "Unknown";
431 |
432 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"] = {};
433 | local slot = 1;
434 | for i=1, GetNumQuestLogEntries(), 1 do
435 | local text, level, questtag, isHeader, isCollapsed = GetQuestLogTitle(i);
436 | if ( isHeader ) then
437 | header = text;
438 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"][header] = {}
439 | else
440 | if ( text ) then
441 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"][header][slot] = {}
442 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"][header][slot]["Title"] = text;
443 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"][header][slot]["Level"] = level;
444 | if ( questtag ) then
445 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"][header][slot]["Tag"] = questtag;
446 | end
447 | end
448 | slot = slot + 1;
449 | end
450 | end
451 | end
452 |
453 | function Profile_ScanHonor()
454 | -- save the honor data
455 | local lastweekHK, lastweekDK, lastweekContribution, lastweekRank = GetPVPLastWeekStats();
456 | local lifetimeHK, lifetimeDK, lifetimeHighestRank = GetPVPLifetimeStats();
457 | local sessionHK, sessionDK = GetPVPSessionStats();
458 | local yesterdayHK, yesterdayDK, yesterdayContribution = GetPVPYesterdayStats();
459 | local lifetimeRankName, lifetimeRankNumber = GetPVPRankInfo(lifetimeHighestRank);
460 | if ( not lifetimeRankName ) then
461 | lifetimeRankName = NONE;
462 | end
463 |
464 | local rankName, rankNumber = GetPVPRankInfo(UnitPVPRank("player"));
465 | if ( not rankName ) then
466 | rankName = NONE;
467 | end
468 | local rankInfo = "("..RANK.." "..rankNumber..")";
469 |
470 | -- set icon
471 | local rankIcon = "";
472 | if ( rankNumber > 0 ) then
473 | rankIcon = string.format("%s%02d","Interface\\PvPRankBadges\\PvPRank", rankNumber);
474 | end
475 |
476 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"] = {} ;
477 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LifetimeHighestRank"] = lifetimeHighestRank;
478 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LifetimeRankName"] = lifetimeRankName;
479 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LifetimeHK"] = lifetimeHK;
480 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LifetimeDK"] = lifetimeDK;
481 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["SessionHK"] = sessionHK;
482 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["SessionDK"] = sessionDK;
483 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["YesterdayHK"] = yesterdayHK;
484 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["YesterdayDK"] = yesterdayDK;
485 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["YesterdayContribution"] = yesterdayContribution;
486 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LastWeekHK"] = lastweekHK;
487 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LastWeekDK"] = lastweekDK;
488 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LastWeekContribution"] = lastweekContribution;
489 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LastWeekRank"] = lastweekRank;
490 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["RankName"] = rankName;
491 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["RankInfo"] = rankInfo;
492 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["RankIcon"] = rankIcon;
493 | end
494 |
495 |
496 | function Profile_ScanReputation() -- Originally by Leronflon, modified to fit my style =)
497 | local count;
498 | local name, standing, rep, atWar, canToggle, foo2, foo3, thisHeader, isHeader;
499 |
500 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"] = {};
501 |
502 | count = GetNumFactions();
503 |
504 | if( count == nil ) then
505 | return;
506 | end
507 |
508 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"]["Count"] = count;
509 |
510 | local Units = { };
511 | Units[1] = 36000; -- Hated
512 | Units[2] = 3000; -- Hostile
513 | Units[3] = 3000; -- Unfriendly
514 | Units[4] = 3000; -- Neutral
515 | Units[5] = 6000; -- Friendly
516 | Units[6] = 12000; -- Honored
517 | Units[7] = 21000; -- Revered
518 | Units[8] = 1000; -- Exaulted
519 |
520 | local ReputationKey = { [0] = "Unknown", [1] = "Hated", [2] = "Hostile", [3] = "Unfriendly", [4] = "Neutral", [5] = "Friendly", [6] = "Honored", [7] = "Revered", [8] = "Exaulted" };
521 |
522 |
523 | thisHeader = "none";
524 | for i = 1, count do
525 | name, description, standing, barValue, atWar, canToggle, isHeader, isCollapsed = GetFactionInfo(i);
526 |
527 | if( name ~= nil ) then
528 | if (atWar == nil) then
529 | atWar = 0;
530 | end
531 | if (rep == nil) then
532 | rep = 0;
533 | end
534 | if (standing == nil) then
535 | standing = 0;
536 | end
537 | if (isHeader == nil ) then
538 | thisHeader = name;
539 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader] = {};
540 | else
541 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name] = {};
542 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name]["Standing"] = ReputationKey[standing];
543 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name]["AtWar"] = atWar;
544 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name]["Value"] = round(barValue*Units[standing]).."/"..Units[standing];
545 | -- CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name]["canToggle"] = canToggle;
546 | -- CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name]["Order"] = i;
547 | end
548 | end
549 | end
550 | end
551 |
552 | function Profile_GetTalents()
553 | local numTabs = GetNumTalentTabs();
554 | local name, iconTexture, tier, column, rank, maxRank;
555 | local numTalents;
556 | local tabname, texture, points, fileName;
557 |
558 | -- Make sure the right frame is loaded
559 | if( not CensusPlus_IsTalentLoaded() ) then
560 | return;
561 | end
562 |
563 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"] = {};
564 |
565 | for x=1, numTabs do
566 | PanelTemplates_SetTab(TalentFrame, x);
567 | numTalents = GetNumTalents(PanelTemplates_GetSelectedTab(TalentFrame));
568 | tabname, texture, points, fileName = GetTalentTabInfo(PanelTemplates_GetSelectedTab(TalentFrame));
569 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname] = {};
570 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname]["PointsSpent"] = points;
571 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname]["Background"] = "Interface\\TalentFrame\\" .. fileName;
572 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname]["Order"] = x;
573 | for i=1, numTalents do
574 | name, iconTexture, tier, column, rank, maxRank = GetTalentInfo(PanelTemplates_GetSelectedTab(TalentFrame), i);
575 | if (rank > 0 or myCPProfile_TALENTS_Full) then
576 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name] = { };
577 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name]["Rank"] = rank .. ":" .. maxRank;
578 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name]["Location"] = tier .. ":" .. column;
579 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name]["Texture"] = iconTexture;
580 | end
581 |
582 | if ( myCPProfile_TALENTS_Full ) then
583 | -- double check
584 | if ( not CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name] ) then
585 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name] = {};
586 | end
587 | CP_ProfHidden:SetTalent(PanelTemplates_GetSelectedTab(TalentFrame), i)
588 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name]["Tooltip"] = CP_Tooltipscan();
589 | end
590 | end
591 | end
592 | end
593 |
594 | function Profile_DoBuffs()
595 | local iIterator = 0;
596 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Buffs"] = {};
597 | while( GetPlayerBuffTexture( iIterator ) ) do
598 | buffText = GetPlayerBuffTexture( iIterator);
599 | iIterator = iIterator + 1
600 | CP_ProfHidden:SetUnitBuff( "player", iIterator );
601 |
602 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Buffs"][iIterator] = {};
603 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Buffs"][iIterator]["Tooltip"] = CP_Tooltipscan();
604 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Buffs"][iIterator]["Texture"] = buffText;
605 | end
606 | --[[
607 | iIterator = 1;
608 | while( UnitDebuff( "player", iIterator ) ) do
609 | debuffTexture, debuffApplications = UnitDebuff(unitName, debuffIndex);
610 | CP_ProfHidden:SetUnitDebuff( "player", iIterator-1 );
611 |
612 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Debuffs"][iIterator] = {};
613 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Debuffs"][iIterator]["Tooltip"] = CP_Tooltipscan();
614 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Debuffs"][iIterator]["Texture"] = debuffTexture;
615 | iIterator = iIterator + 1
616 | end
617 | ]]--
618 | end
619 |
620 | function Profile_GetSkills()
621 | -- Reset/Initialize
622 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Skills"] = {};
623 | local skillheader = '';
624 | local skillinfo = nil;
625 | local rank, maxRank = 0;
626 | local order = 1; -- order in which the headers appear
627 | for i=1, GetNumSkillLines(), 1 do
628 | skillinfo = fixnilempty(GetSkillLineInfo(i));
629 | rank = skillinfo[4];
630 | maxRank = skillinfo[7];
631 | if(skillinfo[2] == 1) then -- if it is a header
632 | skillheader = skillinfo[1];
633 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Skills"][skillheader] = { };
634 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Skills"][skillheader]["Order"] = order;
635 | order = order + 1;
636 | else
637 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Skills"][skillheader][skillinfo[1]] = rank .. ":" .. maxRank;
638 | end
639 | end
640 | end
641 |
642 |
643 | ---------------------------------------------
644 | -- Process Inventory
645 | ---------------------------------------------
646 |
647 | function Profile_UpdateInventory()
648 | local link;
649 | local texture;
650 |
651 | -- Reset/Initialize
652 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"] = {};
653 |
654 | for index,slot in Profile_slots do
655 | link = GetInventoryItemLink("player", index);
656 | texture = GetInventoryItemTexture("player", index);
657 | if( link ) then
658 | for color, item, name in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do
659 | if( color ~= nil and item ~= nil and name ~= nil ) then
660 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot] = { };
661 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot]["Texture"] = texture;
662 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot]["Color"] = color;
663 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot]["Item"] = item;
664 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot]["Name"] = name;
665 | -- Build Tooltip
666 | --CP_ProfHidden:SetHyperlink("item:" .. item);
667 | CP_ProfHidden:SetInventoryItem("player", index);
668 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot]["Tooltip"] = CP_Tooltipscan();
669 |
670 | end
671 | end
672 | end
673 | end
674 | end
675 |
676 | function Profile_ScanInventory()
677 | local bag, bagname, link, texture, color, item, strings, str;
678 |
679 | -- Reset/Initialize
680 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"] = {}
681 |
682 | for bag = 0,4 do
683 | if (bag == 0) then
684 | bagname = "Backpack";
685 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag] = { };
686 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Name"] = "Backpack";
687 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Item"] = "Backpack";
688 | if ( myCPProfile_HTML_Tooltips ) then
689 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Tooltip"] = "Backpack";
690 | else
691 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Tooltip"] = {};
692 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Tooltip"][1] = "Backpack";
693 | end
694 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Color"] = "ffffffff";
695 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Slots"] = 16;
696 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Texture"] = "Interface\\Buttons\\Button-Backpack-Up";
697 | ProcessBagItems(bag, bagname);
698 | else
699 | link = GetInventoryItemLink("player", (bag+19));
700 | texture = GetInventoryItemTexture("player", (bag+19));
701 | if( link ) then
702 | for color, item, bagname in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do
703 | if( color ~= nil and item ~= nil and bagname ~= nil ) then
704 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag] = { };
705 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Item"] = item;
706 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Color"] = color;
707 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Texture"] = texture;
708 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Name"] = bagname;
709 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Slots"] = GetContainerNumSlots(bag);
710 | CP_ProfHidden:SetInventoryItem("player", (bag+19))
711 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Tooltip"] = CP_Tooltipscan();
712 | ProcessBagItems(bag);
713 | end
714 | end
715 | end
716 | end
717 | end
718 | end
719 |
720 | function ProcessBagItems(bag)
721 | local slot, strings, str, texture, itemCount, locked, quality, link, color, item, name;
722 |
723 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"] = {};
724 |
725 | for slot = 1,GetContainerNumSlots(bag) do -- loop through all slots in this bag and get items
726 |
727 | CP_ProfHidden:SetBagItem(bag, slot);
728 |
729 | texture, itemCount, locked, quality = GetContainerItemInfo(bag,slot);
730 | link = GetContainerItemLink(bag, slot);
731 | if( link ) then
732 | for color, item, name in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do
733 | if( color ~= nil and item ~= nil and name ~= nil ) then
734 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot] = {};
735 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Tooltip"] = CP_Tooltipscan();
736 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Texture"] = texture;
737 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Quantity"] = itemCount;
738 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Name"] = name;
739 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Color"] = color;
740 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Item"] = item;
741 | end
742 | end
743 | end
744 | end
745 | end
746 |
747 |
748 | -- From CosmosCommonFunctions.lua
749 | -- Clears a tooltip for usage.
750 | function ClearTooltip(TooltipNameBase)
751 | for i=1, 15, 1 do
752 | getglobal(TooltipNameBase.."TextLeft"..i):SetText("");
753 | getglobal(TooltipNameBase.."TextRight"..i):SetText("");
754 | end
755 | end
756 |
757 |
758 | function Profile_ScanBank()
759 | -- Borrowed from Telo's LootLink and restructured to fit my data
760 | local oldBank = nil;
761 | if (CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]) then
762 | oldBank = CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"];
763 | end
764 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"] = {}
765 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"] = {}
766 |
767 | local bag, size, slot, link;
768 |
769 | -- First the bank container itself
770 | size = GetContainerNumSlots(BANK_CONTAINER);
771 | for slot = size, 1, -1 do
772 | link = GetContainerItemLink(BANK_CONTAINER, slot);
773 | local texture, itemCount, locked = GetContainerItemInfo(BANK_CONTAINER, slot);
774 | if( link ) then
775 | for color, item, name in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do
776 | if( color ~= nil and item ~= nil and name ~= nil ) then
777 | oldBank = nil; -- When we find items, remove the oldBank variable
778 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot] = {};
779 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Texture"] = texture;
780 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Quantity"] = itemCount;
781 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Name"] = name;
782 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Color"] = color;
783 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Item"] = item;
784 | CP_ProfHidden:SetHyperlink("item:" .. item);
785 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Tooltip"] = CP_Tooltipscan();
786 | end
787 | end
788 | end
789 | end
790 |
791 | -- Now the bank bags
792 | for bag = 5, 10 do
793 | link = GetContainerItemLink(BANK_CONTAINER, (bag+20));
794 | texture, itemCount, locked, quality = GetContainerItemInfo(BANK_CONTAINER, (bag+20));
795 | if( link ) then
796 | for color, item, bagname in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do
797 | if( color ~= nil and item ~= nil and bagname ~= nil ) then
798 | oldBank = nil; -- When we find items, remove the oldBank variable
799 | bagnum = bag-4;
800 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum] = {};
801 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Name"] = bagname;
802 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Slots"] = GetContainerNumSlots(bag);
803 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Texture"] = texture;
804 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Color"] = color;
805 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Item"] = item;
806 | CP_ProfHidden:SetHyperlink("item:" .. item);
807 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Tooltip"] = CP_Tooltipscan();
808 |
809 | ProcessBankBagItems(bag, bagnum);
810 | end
811 | end
812 | end
813 | end
814 |
815 | if ( oldBank ) then
816 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"] = oldBank;
817 | end
818 | end
819 |
820 | function ProcessBankBagItems(bag, bagnum)
821 |
822 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"] = {};
823 |
824 | for slot = 1,GetContainerNumSlots(bag) do -- loop through all slots in this bag and get items
825 | -- CP_ProfHidden:SetBagItem(bag, slot);
826 | texture, itemCount, locked, quality = GetContainerItemInfo(bag,slot);
827 | link = GetContainerItemLink(bag, slot);
828 | if( link ) then
829 | for color, item, name in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do
830 | if( color ~= nil and item ~= nil and name ~= nil ) then
831 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot] = {};
832 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Texture"] = texture;
833 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Quantity"] = itemCount;
834 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Name"] = name;
835 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Color"] = color;
836 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Item"] = item;
837 | CP_ProfHidden:SetBagItem(bag, slot);
838 | -- CP_ProfHidden:SetHyperlink("item:" .. item);
839 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Tooltip"] = CP_Tooltipscan();
840 | end
841 | end
842 | end
843 | end
844 | end
845 |
846 |
847 | function Profile_ScanTradeSkill()
848 | local skillLineName, skillLineRank, skillLineMaxRank = GetTradeSkillLine();
849 |
850 | if( (not skillLineName) or (skillLineName == "") or (skillLineName == "UNKNOWN")) then
851 | return;
852 | end
853 | -- we don't bother saving the following tradeskills
854 | if( (skillLineName == "Fishing") or (skillLineName == "Mining") or (skillLineName == "Herbalism") or (skillLineName == "Skinning") ) then
855 | return;
856 | end
857 |
858 | if ( not CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] ) then
859 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] = {};
860 | end
861 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName] = {};
862 |
863 | -- expand the tree so we can see all the recipes
864 | ExpandTradeSkillSubClass(0);
865 |
866 | -- get the number of recipes and loop through each one
867 | local numTradeSkills = GetNumTradeSkills();
868 | local skillHeader = skillLineName;
869 | for itemIndex=1, numTradeSkills, 1 do
870 | if( itemIndex == nil or skillLineName==nil or skillHeader==nil ) then
871 | return;
872 | end
873 | local skillText = "";
874 | local skillName, skillDifficulty, numAvailable, isExpanded = GetTradeSkillInfo(itemIndex);
875 | if( skillDifficulty ~= "header" and skillLineName ~= nil and skillLineName ~= "" and skillHeader ~= nil and skillHeader ~= "" and skillName ~= nil and skillName ~= "" ) then
876 | if( not CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader] ) then
877 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader] = {};
878 | end
879 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName] = {};
880 | local skillIcon = GetTradeSkillIcon(itemIndex);
881 | if( not skillIcon ) then
882 | skillIcon = "";
883 | end
884 |
885 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Texture"] = skillIcon;
886 |
887 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Difficulty"] = TradeSkillDifficultyCode[skillDifficulty];
888 |
889 | CP_ProfHidden:SetTradeSkillItem(itemIndex);
890 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Tooltip"] = CP_Tooltipscan();
891 |
892 |
893 |
894 | local numReagents = GetTradeSkillNumReagents(itemIndex);
895 | local reagents = '';
896 | for reagentIndex=1, numReagents, 1 do
897 | local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(itemIndex, reagentIndex);
898 | if( not reagentTexture ) then
899 | reagentTexture = "";
900 | end
901 | if( not reagentName ) then
902 | reagentName = "Unknown";
903 | end
904 |
905 | if (reagentIndex == numReagents) then
906 | reagents = reagents .. reagentName .. " x" .. reagentCount;
907 | else
908 | reagents = reagents .. reagentName .. " x" .. reagentCount .. " ";
909 | end
910 | end
911 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Reagents"] = reagents;
912 | else
913 | skillHeader = skillName;
914 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader] = {};
915 | end
916 | end
917 | end
918 |
919 | -- is this ever called?!
920 | function Profile_ScanCraft()
921 | local skillLineName, skillLineRank, skillLineMaxRank = GetCraftDisplaySkillLine();
922 |
923 | if( (not skillLineName) or (skillLineName == "") or (skillLineName == "UNKNOWN")) then
924 | return;
925 | end
926 |
927 | if ( not CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] ) then
928 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] = {};
929 | end
930 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName] = {};
931 |
932 | -- expand the tree so we can see all the recipes
933 | -- ExpandCraftSubClass(0);
934 |
935 | -- get the number of recipes and loop through each one
936 | local numCrafts = GetNumCrafts();
937 | local skillHeader = skillLineName; -- default it, enchanting doesn't have categories?
938 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader] = {};
939 | for itemIndex=1, numCrafts, 1 do
940 | local skillText = "";
941 | local skillName, craftSubSpellName, skillDifficulty, numAvailable, isExpanded = GetCraftInfo(itemIndex);
942 | --Debug(skillName .. ":" .. craftSubSpellName);
943 | if( skillDifficulty ~= "header" and skillLineName and skillLineName ~= "" and skillHeader and skillHeader ~= "" and skillName and skillName ~= "" ) then
944 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName] = {};
945 | local skillIcon = GetCraftIcon(itemIndex);
946 | if( not skillIcon ) then
947 | skillIcon = "";
948 | end
949 | local description = GetCraftDescription(itemIndex);
950 | if (description == nil) then
951 | description = "";
952 | end
953 |
954 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Texture"] = skillIcon;
955 |
956 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Difficulty"] = TradeSkillDifficultyCode[skillDifficulty];
957 |
958 | -- CP_ProfHidden:SetCraftItem(itemIndex);
959 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Tooltip"] = description;
960 | --Debug(description);
961 |
962 | local numReagents = GetCraftNumReagents(itemIndex);
963 | local reagents = '';
964 | for reagentIndex=1, numReagents, 1 do
965 | local reagentName, reagentTexture, reagentCount, playerReagentCount = GetCraftReagentInfo(itemIndex, reagentIndex);
966 | if( not reagentTexture ) then
967 | reagentTexture = "";
968 | end
969 | if( not reagentName ) then
970 | reagentName = "Unknown";
971 | end
972 |
973 | if (reagentIndex == numReagents) then
974 | reagents = reagents .. reagentName .. " x" .. reagentCount;
975 | else
976 | reagents = reagents .. reagentName .. " x" .. reagentCount .. " ";
977 | end
978 | end
979 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Reagents"] = reagents;
980 | else
981 | local skillHeader = skillName;
982 | CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader] = {};
983 | end
984 | end
985 | end
986 |
987 |
988 | -- Utilities go below
989 | -- From CosmosCommonFunctions.lua
990 | -- Gets all lines out of a tooltip.
991 |
992 | function CP_Tooltipscan()
993 | --CP_ProfHidden:Show();
994 |
995 | local TooltipNameBase = "CP_ProfHidden";
996 | local tooltipFrame = getglobal(TooltipNameBase);
997 | local strings = {};
998 | local htmlstr = nil;
999 |
1000 | -- CensusPlus_Msg( "NUM LINES: " .. CP_ProfHidden:NumLines() );
1001 |
1002 | for idx = 1, CP_ProfHidden:NumLines() do
1003 | local textLeft = nil;
1004 | local textRight = nil;
1005 | ttext = getglobal(TooltipNameBase.."TextLeft"..idx);
1006 |
1007 | if(ttext and ttext:IsVisible() and ttext:GetText() ~= nil) then
1008 | textLeft = ttext:GetText();
1009 | end
1010 |
1011 | --if( textLeft ~= nil ) then
1012 | -- CensusPlus_Msg( "LEFT TEXT: " .. textLeft );
1013 | --end
1014 |
1015 | ttext = getglobal(TooltipNameBase.."TextRight"..idx);
1016 | if(ttext and ttext:IsVisible() and ttext:GetText() ~= nil) then
1017 | textRight = ttext:GetText();
1018 | end
1019 | --if( textRight ~= nil ) then
1020 | -- CensusPlus_Msg( "RIGHT TEXT: " .. textRight );
1021 | --end
1022 |
1023 | if (textLeft or textRight) then
1024 | if ( textRight) then
1025 | textRight = "\t"..textRight;
1026 | else
1027 | textRight = "";
1028 | end
1029 |
1030 | if ( htmlstr ~= nil ) then
1031 | htmlstr = htmlstr .. " " .. textLeft .. textRight;
1032 | else
1033 | htmlstr = textLeft .. textRight;
1034 | end
1035 | end
1036 | end
1037 |
1038 | -- CP_ProfHidden:ClearLines();
1039 | -- ClearTooltip( "CP_ProfHidden" );
1040 |
1041 | return htmlstr;
1042 | end
1043 |
1044 | function round(x)
1045 | if(x - math.floor(x) > 0.5) then
1046 | x = x + 0.5;
1047 | end
1048 | return math.floor(x);
1049 | end
1050 |
1051 | if (not fixnilempty) then
1052 | fixnilempty = function(...)
1053 | for i=1, arg.n, 1 do
1054 | if(not arg[i]) then
1055 | arg[i] = "";
1056 | end
1057 | end
1058 | return arg;
1059 | end
1060 | end
1061 |
1062 |
1063 |
--------------------------------------------------------------------------------
/CensusPlusTurtle.toc:
--------------------------------------------------------------------------------
1 | ## Interface: 11200
2 | ## Title: CensusPlusTurtle
3 | ## Notes: Collects and displays census information. This AddOn is licenced under the GNU GPL, see GPL.txt for details.
4 | ## Original Author: Ian Pieragostini
5 | ## Modified By: Cooper Sellers - www.warcraftrealms.com
6 | ## Turtle Support By: |cffbe5effLexie|r
7 | ## SavedVariables: CensusPlus_Database,CensusPlus_Profile,CensusPlus_BGInfo
8 | ## SavedVariablesPerCharacter: CensusPlus_DoThisCharacter,CensusPlus_PerCharInfo
9 | ## Version: 1.0.4
10 |
11 | libs\AceLibrary\AceLibrary.lua
12 | libs\AceLocale-2.2\AceLocale-2.2.lua
13 | libs\Babble-Class-2.2\Babble-Class-2.2.lua
14 |
15 | CensusPlus.xml
16 | CensusButton.xml
17 | CensusPlayerList.xml
18 |
--------------------------------------------------------------------------------
/GPL.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5 | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Library General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 |
294 | Copyright (C)
295 |
296 | This program is free software; you can redistribute it and/or modify
297 | it under the terms of the GNU General Public License as published by
298 | the Free Software Foundation; either version 2 of the License, or
299 | (at your option) any later version.
300 |
301 | This program is distributed in the hope that it will be useful,
302 | but WITHOUT ANY WARRANTY; without even the implied warranty of
303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304 | GNU General Public License for more details.
305 |
306 | You should have received a copy of the GNU General Public License
307 | along with this program; if not, write to the Free Software
308 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
309 |
310 |
311 | Also add information on how to contact you by electronic and paper mail.
312 |
313 | If the program is interactive, make it output a short notice like this
314 | when it starts in an interactive mode:
315 |
316 | Gnomovision version 69, Copyright (C) year name of author
317 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
318 | This is free software, and you are welcome to redistribute it
319 | under certain conditions; type `show c' for details.
320 |
321 | The hypothetical commands `show w' and `show c' should show the appropriate
322 | parts of the General Public License. Of course, the commands you use may
323 | be called something other than `show w' and `show c'; they could even be
324 | mouse-clicks or menu items--whatever suits your program.
325 |
326 | You should also get your employer (if you work as a programmer) or your
327 | school, if any, to sign a "copyright disclaimer" for the program, if
328 | necessary. Here is a sample; alter the names:
329 |
330 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
331 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
332 |
333 | , 1 April 1989
334 | Ty Coon, President of Vice
335 |
336 | This General Public License does not permit incorporating your program into
337 | proprietary programs. If your program is a subroutine library, you may
338 | consider it more useful to permit linking proprietary applications with the
339 | library. If this is what you want to do, use the GNU Library General
340 | Public License instead of this License.
341 |
--------------------------------------------------------------------------------
/Preview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Preview.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CensusPlusTurtle
2 | CensusPlus for Turtle WoW
3 |
4 | * Adds support for High Elves and Goblins.
5 | * Shows both Horde and Alliance characters.
6 |
7 | Install location should be: ..\Interface\AddOns\CensusPlus
8 |
9 | 
10 |
--------------------------------------------------------------------------------
/Skin/CensusButton-Down.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusButton-Down.tga
--------------------------------------------------------------------------------
/Skin/CensusButton-Paused.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusButton-Paused.tga
--------------------------------------------------------------------------------
/Skin/CensusButton-Running.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusButton-Running.tga
--------------------------------------------------------------------------------
/Skin/CensusButton-Up.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusButton-Up.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_10.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_10.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_11.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_11.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_12.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_12.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_13.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_13.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_14.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_14.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_15.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_15.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_16.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_16.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_17.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_17.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_18.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_18.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_20.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_20.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_21.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_21.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_22.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_22.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_23.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_23.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_24.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_24.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_25.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_25.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_26.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_26.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_27.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_27.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_28.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_28.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_29.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_29.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_Bar.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_Bar.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_Icon.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_Icon.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_LevelBar.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_LevelBar.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_Mini.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_Mini.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_Unknown.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_Unknown.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_Window_BottomRight.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_Window_BottomRight.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_Window_Left.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_Window_Left.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_Window_Mid.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_Window_Mid.tga
--------------------------------------------------------------------------------
/Skin/CensusPlus_Window_TopRight.tga:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Skin/CensusPlus_Window_TopRight.tga
--------------------------------------------------------------------------------
/Sounds/CensusComplete.ogg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/Sounds/CensusComplete.ogg
--------------------------------------------------------------------------------
/UpdateUI.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Lexiebean/CensusPlusTurtle/8832f37afa4cc4f954ec6e1440cc18b9a2028764/UpdateUI.xml
--------------------------------------------------------------------------------
/libs/AceLibrary/AceLibrary.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | Name: AceLibrary
3 | Revision: $Rev: 17722 $
4 | Developed by: The Ace Development Team (http://www.wowace.com/index.php/The_Ace_Development_Team)
5 | Inspired By: Iriel (iriel@vigilance-committee.org)
6 | Tekkub (tekkub@gmail.com)
7 | Revision: $Rev: 17722 $
8 | Website: http://www.wowace.com/
9 | Documentation: http://www.wowace.com/index.php/AceLibrary
10 | SVN: http://svn.wowace.com/root/trunk/Ace2/AceLibrary
11 | Description: Versioning library to handle other library instances, upgrading,
12 | and proper access.
13 | It also provides a base for libraries to work off of, providing
14 | proper error tools. It is handy because all the errors occur in the
15 | file that called it, not in the library file itself.
16 | Dependencies: None
17 | ]]
18 |
19 | local ACELIBRARY_MAJOR = "AceLibrary"
20 | local ACELIBRARY_MINOR = "$Revision: 17722 $"
21 |
22 | if loadstring("return function(...) return ... end") and AceLibrary and AceLibrary:HasInstance(ACELIBRARY_MAJOR) then return end -- lua51 check
23 | local table_setn
24 | do
25 | local version = GetBuildInfo()
26 | if string.find(version, "^2%.") then
27 | -- 2.0.0
28 | table_setn = function() end
29 | else
30 | table_setn = table.setn
31 | end
32 | end
33 |
34 | local string_gfind = string.gmatch or string.gfind
35 |
36 | local _G = getfenv(0)
37 | local previous = _G[ACELIBRARY_MAJOR]
38 | if previous and not previous:IsNewVersion(ACELIBRARY_MAJOR, ACELIBRARY_MINOR) then return end
39 |
40 | local function safecall(func,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
41 | local success, err = pcall(func,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10)
42 | if not success then geterrorhandler()(err) end
43 | end
44 |
45 | -- @table AceLibrary
46 | -- @brief System to handle all versioning of libraries.
47 | local AceLibrary = {}
48 | local AceLibrary_mt = {}
49 | setmetatable(AceLibrary, AceLibrary_mt)
50 |
51 | local tmp
52 | local function error(self, message, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
53 | if type(self) ~= "table" then
54 | _G.error(string.format("Bad argument #1 to `error' (table expected, got %s)", type(self)), 2)
55 | end
56 | if not tmp then
57 | tmp = {}
58 | else
59 | for k in pairs(tmp) do tmp[k] = nil end
60 | table_setn(tmp, 0)
61 | end
62 |
63 | table.insert(tmp, a1)
64 | table.insert(tmp, a2)
65 | table.insert(tmp, a3)
66 | table.insert(tmp, a4)
67 | table.insert(tmp, a5)
68 | table.insert(tmp, a6)
69 | table.insert(tmp, a7)
70 | table.insert(tmp, a8)
71 | table.insert(tmp, a9)
72 | table.insert(tmp, a10)
73 | table.insert(tmp, a11)
74 | table.insert(tmp, a12)
75 | table.insert(tmp, a13)
76 | table.insert(tmp, a14)
77 | table.insert(tmp, a15)
78 | table.insert(tmp, a16)
79 | table.insert(tmp, a17)
80 | table.insert(tmp, a18)
81 | table.insert(tmp, a19)
82 | table.insert(tmp, a20)
83 |
84 | local stack = debugstack()
85 | if not message then
86 | local _,_,second = string.find(stack, "\n(.-)\n")
87 | message = "error raised! " .. second
88 | else
89 | for i = 1,table.getn(tmp) do
90 | tmp[i] = tostring(tmp[i])
91 | end
92 | for i = 1,10 do
93 | table.insert(tmp, "nil")
94 | end
95 | message = string.format(message, unpack(tmp))
96 | end
97 |
98 | if getmetatable(self) and getmetatable(self).__tostring then
99 | message = string.format("%s: %s", tostring(self), message)
100 | elseif type(rawget(self, 'GetLibraryVersion')) == "function" and AceLibrary:HasInstance(self:GetLibraryVersion()) then
101 | message = string.format("%s: %s", self:GetLibraryVersion(), message)
102 | elseif type(rawget(self, 'class')) == "table" and type(rawget(self.class, 'GetLibraryVersion')) == "function" and AceLibrary:HasInstance(self.class:GetLibraryVersion()) then
103 | message = string.format("%s: %s", self.class:GetLibraryVersion(), message)
104 | end
105 |
106 | local first = string.gsub(stack, "\n.*", "")
107 | local file = string.gsub(first, ".*\\(.*).lua:%d+: .*", "%1")
108 | file = string.gsub(file, "([%(%)%.%*%+%-%[%]%?%^%$%%])", "%%%1")
109 |
110 | local i = 0
111 | for s in string_gfind(stack, "\n([^\n]*)") do
112 | i = i + 1
113 | if not string.find(s, file .. "%.lua:%d+:") then
114 | file = string.gsub(s, "^.*\\(.*).lua:%d+: .*", "%1")
115 | file = string.gsub(file, "([%(%)%.%*%+%-%[%]%?%^%$%%])", "%%%1")
116 | break
117 | end
118 | end
119 | local j = 0
120 | for s in string_gfind(stack, "\n([^\n]*)") do
121 | j = j + 1
122 | if j > i and not string.find(s, file .. "%.lua:%d+:") then
123 | _G.error(message, j + 1)
124 | return
125 | end
126 | end
127 | _G.error(message, 2)
128 | return
129 | end
130 |
131 | local function assert(self, condition, message, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
132 | if not condition then
133 | if not message then
134 | local stack = debugstack()
135 | local _,_,second = string.find(stack, "\n(.-)\n")
136 | message = "assertion failed! " .. second
137 | end
138 | error(self, message, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
139 | return
140 | end
141 | return condition
142 | end
143 |
144 | local function argCheck(self, arg, num, kind, kind2, kind3, kind4, kind5)
145 | if type(num) ~= "number" then
146 | error(self, "Bad argument #3 to `argCheck' (number expected, got %s)", type(num))
147 | elseif type(kind) ~= "string" then
148 | error(self, "Bad argument #4 to `argCheck' (string expected, got %s)", type(kind))
149 | end
150 | local errored = false
151 | arg = type(arg)
152 | if arg ~= kind and arg ~= kind2 and arg ~= kind3 and arg ~= kind4 and arg ~= kind5 then
153 | local _,_,func = string.find(debugstack(), "`argCheck'.-([`<].-['>])")
154 | if not func then
155 | _,_,func = string.find(debugstack(), "([`<].-['>])")
156 | end
157 | if kind5 then
158 | error(self, "Bad argument #%s to %s (%s, %s, %s, %s, or %s expected, got %s)", tonumber(num) or 0/0, func, kind, kind2, kind3, kind4, kind5, arg)
159 | elseif kind4 then
160 | error(self, "Bad argument #%s to %s (%s, %s, %s, or %s expected, got %s)", tonumber(num) or 0/0, func, kind, kind2, kind3, kind4, arg)
161 | elseif kind3 then
162 | error(self, "Bad argument #%s to %s (%s, %s, or %s expected, got %s)", tonumber(num) or 0/0, func, kind, kind2, kind3, arg)
163 | elseif kind2 then
164 | error(self, "Bad argument #%s to %s (%s or %s expected, got %s)", tonumber(num) or 0/0, func, kind, kind2, arg)
165 | else
166 | error(self, "Bad argument #%s to %s (%s expected, got %s)", tonumber(num) or 0/0, func, kind, arg)
167 | end
168 | end
169 | end
170 |
171 | local function pcall(self, func, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
172 | a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20 = _G.pcall(func, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
173 | if not a1 then
174 | error(self, string.gsub(a2, ".-%.lua:%d-: ", ""))
175 | else
176 | return a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20
177 | end
178 | end
179 |
180 | local recurse = {}
181 | local function addToPositions(t, major)
182 | if not AceLibrary.positions[t] or AceLibrary.positions[t] == major then
183 | rawset(t, recurse, true)
184 | AceLibrary.positions[t] = major
185 | for k,v in pairs(t) do
186 | if type(v) == "table" and not rawget(v, recurse) then
187 | addToPositions(v, major)
188 | end
189 | if type(k) == "table" and not rawget(k, recurse) then
190 | addToPositions(k, major)
191 | end
192 | end
193 | local mt = getmetatable(t)
194 | if mt and not rawget(mt, recurse) then
195 | addToPositions(mt, major)
196 | end
197 | rawset(t, recurse, nil)
198 | end
199 | end
200 |
201 | local function svnRevisionToNumber(text)
202 | if type(text) == "string" then
203 | if string.find(text, "^%$Revision: (%d+) %$$") then
204 | return tonumber((string.gsub(text, "^%$Revision: (%d+) %$$", "%1")))
205 | elseif string.find(text, "^%$Rev: (%d+) %$$") then
206 | return tonumber((string.gsub(text, "^%$Rev: (%d+) %$$", "%1")))
207 | elseif string.find(text, "^%$LastChangedRevision: (%d+) %$$") then
208 | return tonumber((string.gsub(text, "^%$LastChangedRevision: (%d+) %$$", "%1")))
209 | end
210 | elseif type(text) == "number" then
211 | return text
212 | end
213 | return nil
214 | end
215 |
216 | local crawlReplace
217 | do
218 | local recurse = {}
219 | local function func(t, to, from)
220 | if recurse[t] then
221 | return
222 | end
223 | recurse[t] = true
224 | local mt = getmetatable(t)
225 | setmetatable(t, nil)
226 | rawset(t, to, rawget(t, from))
227 | rawset(t, from, nil)
228 | for k,v in pairs(t) do
229 | if v == from then
230 | t[k] = to
231 | elseif type(v) == "table" then
232 | if not recurse[v] then
233 | func(v, to, from)
234 | end
235 | end
236 |
237 | if type(k) == "table" then
238 | if not recurse[k] then
239 | func(k, to, from)
240 | end
241 | end
242 | end
243 | setmetatable(t, mt)
244 | if mt then
245 | if mt == from then
246 | setmetatable(t, to)
247 | elseif not recurse[mt] then
248 | func(mt, to, from)
249 | end
250 | end
251 | end
252 | function crawlReplace(t, to, from)
253 | func(t, to, from)
254 | for k in pairs(recurse) do
255 | recurse[k] = nil
256 | end
257 | end
258 | end
259 |
260 | -- @function destroyTable
261 | -- @brief remove all the contents of a table
262 | -- @param t table to destroy
263 | local function destroyTable(t)
264 | setmetatable(t, nil)
265 | for k,v in pairs(t) do t[k] = nil end
266 | table_setn(t, 0)
267 | end
268 |
269 | local function isFrame(frame)
270 | return type(frame) == "table" and type(rawget(frame, 0)) == "userdata" and type(rawget(frame, 'IsFrameType')) == "function" and getmetatable(frame) and type(rawget(getmetatable(frame), '__index')) == "function"
271 | end
272 |
273 | local new, del
274 | do
275 | local tables = setmetatable({}, {__mode = "k"})
276 |
277 | function new()
278 | local t = next(tables)
279 | if t then
280 | tables[t] = nil
281 | return t
282 | else
283 | return {}
284 | end
285 | end
286 |
287 | function del(t, depth)
288 | if depth and depth > 0 then
289 | for k,v in pairs(t) do
290 | if type(v) == "table" and not isFrame(v) then
291 | del(v, depth - 1)
292 | end
293 | end
294 | end
295 | destroyTable(t)
296 | tables[t] = true
297 | end
298 | end
299 |
300 | -- @function copyTable
301 | -- @brief Create a shallow copy of a table and return it.
302 | -- @param from The table to copy from
303 | -- @return A shallow copy of the table
304 | local function copyTable(from)
305 | local to = new()
306 | for k,v in pairs(from) do to[k] = v end
307 | table_setn(to, table.getn(from))
308 | setmetatable(to, getmetatable(from))
309 | return to
310 | end
311 |
312 | -- @function deepTransfer
313 | -- @brief Fully transfer all data, keeping proper previous table
314 | -- backreferences stable.
315 | -- @param to The table with which data is to be injected into
316 | -- @param from The table whose data will be injected into the first
317 | -- @param saveFields If available, a shallow copy of the basic data is saved
318 | -- in here.
319 | -- @param list The account of table references
320 | -- @param list2 The current status on which tables have been traversed.
321 | local deepTransfer
322 | do
323 | -- @function examine
324 | -- @brief Take account of all the table references to be shared
325 | -- between the to and from tables.
326 | -- @param to The table with which data is to be injected into
327 | -- @param from The table whose data will be injected into the first
328 | -- @param list An account of the table references
329 | local function examine(to, from, list, major)
330 | list[from] = to
331 | for k,v in pairs(from) do
332 | if rawget(to, k) and type(from[k]) == "table" and type(to[k]) == "table" and not list[from[k]] then
333 | if from[k] == to[k] then
334 | list[from[k]] = to[k]
335 | elseif AceLibrary.positions[from[v]] ~= major and AceLibrary.positions[from[v]] then
336 | list[from[k]] = from[k]
337 | elseif not list[from[k]] then
338 | examine(to[k], from[k], list, major)
339 | end
340 | end
341 | end
342 | return list
343 | end
344 |
345 | function deepTransfer(to, from, saveFields, major, list, list2)
346 | setmetatable(to, nil)
347 | local createdList
348 | if not list then
349 | createdList = true
350 | list = new()
351 | list2 = new()
352 | examine(to, from, list, major)
353 | end
354 | list2[to] = to
355 | for k,v in pairs(to) do
356 | if type(rawget(from, k)) ~= "table" or type(v) ~= "table" or isFrame(v) then
357 | if saveFields then
358 | saveFields[k] = v
359 | end
360 | to[k] = nil
361 | elseif v ~= _G then
362 | if saveFields then
363 | saveFields[k] = copyTable(v)
364 | end
365 | end
366 | end
367 | for k in pairs(from) do
368 | if rawget(to, k) and to[k] ~= from[k] and AceLibrary.positions[to[k]] == major and from[k] ~= _G then
369 | if not list2[to[k]] then
370 | deepTransfer(to[k], from[k], nil, major, list, list2)
371 | end
372 | to[k] = list[to[k]] or list2[to[k]]
373 | else
374 | rawset(to, k, from[k])
375 | end
376 | end
377 | table_setn(to, table.getn(from))
378 | setmetatable(to, getmetatable(from))
379 | local mt = getmetatable(to)
380 | if mt then
381 | if list[mt] then
382 | setmetatable(to, list[mt])
383 | elseif mt.__index and list[mt.__index] then
384 | mt.__index = list[mt.__index]
385 | end
386 | end
387 | destroyTable(from)
388 | if createdList then
389 | del(list)
390 | del(list2)
391 | end
392 | end
393 | end
394 |
395 | -- @method TryToLoadStandalone
396 | -- @brief Attempt to find and load a standalone version of the requested library
397 | -- @param major A string representing the major version
398 | -- @return If library is found, return values from the call to LoadAddOn are returned
399 | -- If the library has been requested previously, nil is returned.
400 | local function TryToLoadStandalone(major)
401 | if not AceLibrary.scannedlibs then AceLibrary.scannedlibs = {} end
402 | if AceLibrary.scannedlibs[major] then return end
403 |
404 | AceLibrary.scannedlibs[major] = true
405 |
406 | local name, _, _, enabled, loadable = GetAddOnInfo(major)
407 | if loadable then
408 | return LoadAddOn(name)
409 | end
410 |
411 | for i=1,GetNumAddOns() do
412 | if GetAddOnMetadata(i, "X-AceLibrary-"..major) then
413 | local name, _, _, enabled, loadable = GetAddOnInfo(i)
414 | if loadable then
415 | return LoadAddOn(name)
416 | end
417 | end
418 | end
419 | end
420 |
421 | -- @method IsNewVersion
422 | -- @brief Obtain whether the supplied version would be an upgrade to the
423 | -- current version. This allows for bypass code in library
424 | -- declaration.
425 | -- @param major A string representing the major version
426 | -- @param minor An integer or an svn revision string representing the minor version
427 | -- @return whether the supplied version would be newer than what is
428 | -- currently available.
429 | function AceLibrary:IsNewVersion(major, minor)
430 | argCheck(self, major, 2, "string")
431 | TryToLoadStandalone(major)
432 |
433 | if type(minor) == "string" then
434 | local m = svnRevisionToNumber(minor)
435 | if m then
436 | minor = m
437 | else
438 | _G.error(string.format("Bad argument #3 to `IsNewVersion'. Must be a number or SVN revision string. %q is not appropriate", minor), 2)
439 | end
440 | end
441 | argCheck(self, minor, 3, "number")
442 | local data = self.libs[major]
443 | if not data then
444 | return true
445 | end
446 | return data.minor < minor
447 | end
448 |
449 | -- @method HasInstance
450 | -- @brief Returns whether an instance exists. This allows for optional support of a library.
451 | -- @param major A string representing the major version.
452 | -- @param minor (optional) An integer or an svn revision string representing the minor version.
453 | -- @return Whether an instance exists.
454 | function AceLibrary:HasInstance(major, minor)
455 | argCheck(self, major, 2, "string")
456 | TryToLoadStandalone(major)
457 |
458 | if minor then
459 | if type(minor) == "string" then
460 | local m = svnRevisionToNumber(minor)
461 | if m then
462 | minor = m
463 | else
464 | _G.error(string.format("Bad argument #3 to `HasInstance'. Must be a number or SVN revision string. %q is not appropriate", minor), 2)
465 | end
466 | end
467 | argCheck(self, minor, 3, "number")
468 | if not self.libs[major] then
469 | return
470 | end
471 | return self.libs[major].minor == minor
472 | end
473 | return self.libs[major] and true
474 | end
475 |
476 | -- @method GetInstance
477 | -- @brief Returns the library with the given major/minor version.
478 | -- @param major A string representing the major version.
479 | -- @param minor (optional) An integer or an svn revision string representing the minor version.
480 | -- @return The library with the given major/minor version.
481 | function AceLibrary:GetInstance(major, minor)
482 | argCheck(self, major, 2, "string")
483 | TryToLoadStandalone(major)
484 |
485 | local data = self.libs[major]
486 | if not data then
487 | _G.error(string.format("Cannot find a library instance of %s.", major), 2)
488 | return
489 | end
490 | if minor then
491 | if type(minor) == "string" then
492 | local m = svnRevisionToNumber(minor)
493 | if m then
494 | minor = m
495 | else
496 | _G.error(string.format("Bad argument #3 to `GetInstance'. Must be a number or SVN revision string. %q is not appropriate", minor), 2)
497 | end
498 | end
499 | argCheck(self, minor, 2, "number")
500 | if data.minor ~= minor then
501 | _G.error(string.format("Cannot find a library instance of %s, minor version %d.", major, minor), 2)
502 | return
503 | end
504 | end
505 | return data.instance
506 | end
507 |
508 | -- Syntax sugar. AceLibrary("FooBar-1.0")
509 | AceLibrary_mt.__call = AceLibrary.GetInstance
510 |
511 | local donothing
512 |
513 | local AceEvent
514 |
515 | -- @method Register
516 | -- @brief Registers a new version of a given library.
517 | -- @param newInstance the library to register
518 | -- @param major the major version of the library
519 | -- @param minor the minor version of the library
520 | -- @param activateFunc (optional) A function to be called when the library is
521 | -- fully activated. Takes the arguments
522 | -- (newInstance [, oldInstance, oldDeactivateFunc]). If
523 | -- oldInstance is given, you should probably call
524 | -- oldDeactivateFunc(oldInstance).
525 | -- @param deactivateFunc (optional) A function to be called by a newer library's
526 | -- activateFunc.
527 | -- @param externalFunc (optional) A function to be called whenever a new
528 | -- library is registered.
529 | function AceLibrary:Register(newInstance, major, minor, activateFunc, deactivateFunc, externalFunc)
530 | argCheck(self, newInstance, 2, "table")
531 | argCheck(self, major, 3, "string")
532 | if type(minor) == "string" then
533 | local m = svnRevisionToNumber(minor)
534 | if m then
535 | minor = m
536 | else
537 | _G.error(string.format("Bad argument #4 to `Register'. Must be a number or SVN revision string. %q is not appropriate", minor), 2)
538 | end
539 | end
540 | argCheck(self, minor, 4, "number")
541 | if math.floor(minor) ~= minor or minor < 0 then
542 | error(self, "Bad argument #4 to `Register' (integer >= 0 expected, got %s)", minor)
543 | end
544 | argCheck(self, activateFunc, 5, "function", "nil")
545 | argCheck(self, deactivateFunc, 6, "function", "nil")
546 | argCheck(self, externalFunc, 7, "function", "nil")
547 | if not deactivateFunc then
548 | if not donothing then
549 | donothing = function() end
550 | end
551 | deactivateFunc = donothing
552 | end
553 | local data = self.libs[major]
554 | if not data then
555 | -- This is new
556 | local instance = copyTable(newInstance)
557 | crawlReplace(instance, instance, newInstance)
558 | destroyTable(newInstance)
559 | if AceLibrary == newInstance then
560 | self = instance
561 | AceLibrary = instance
562 | end
563 | self.libs[major] = {
564 | instance = instance,
565 | minor = minor,
566 | deactivateFunc = deactivateFunc,
567 | externalFunc = externalFunc,
568 | }
569 | rawset(instance, 'GetLibraryVersion', function(self)
570 | return major, minor
571 | end)
572 | if not rawget(instance, 'error') then
573 | rawset(instance, 'error', error)
574 | end
575 | if not rawget(instance, 'assert') then
576 | rawset(instance, 'assert', assert)
577 | end
578 | if not rawget(instance, 'argCheck') then
579 | rawset(instance, 'argCheck', argCheck)
580 | end
581 | if not rawget(instance, 'pcall') then
582 | rawset(instance, 'pcall', pcall)
583 | end
584 | addToPositions(instance, major)
585 | if activateFunc then
586 | safecall(activateFunc, instance, nil, nil) -- no old version, so explicit nil
587 | end
588 |
589 | if externalFunc then
590 | for k,data in pairs(self.libs) do
591 | if k ~= major then
592 | safecall(externalFunc, instance, k, data.instance)
593 | end
594 | end
595 | end
596 |
597 | for k,data in pairs(self.libs) do
598 | if k ~= major and data.externalFunc then
599 | safecall(data.externalFunc, data.instance, major, instance)
600 | end
601 | end
602 | if major == "AceEvent-2.0" then
603 | AceEvent = instance
604 | end
605 | if AceEvent then
606 | AceEvent.TriggerEvent(self, "AceLibrary_Register", major, instance)
607 | end
608 |
609 | return instance
610 | end
611 | local instance = data.instance
612 | if minor <= data.minor then
613 | -- This one is already obsolete, raise an error.
614 | _G.error(string.format("Obsolete library registered. %s is already registered at version %d. You are trying to register version %d. Hint: if not AceLibrary:IsNewVersion(%q, %d) then return end", major, data.minor, minor, major, minor), 2)
615 | return
616 | end
617 | -- This is an update
618 | local oldInstance = new()
619 |
620 | addToPositions(newInstance, major)
621 | local isAceLibrary = (AceLibrary == newInstance)
622 | local old_error, old_assert, old_argCheck, old_pcall
623 | if isAceLibrary then
624 | self = instance
625 | AceLibrary = instance
626 |
627 | old_error = instance.error
628 | old_assert = instance.assert
629 | old_argCheck = instance.argCheck
630 | old_pcall = instance.pcall
631 |
632 | self.error = error
633 | self.assert = assert
634 | self.argCheck = argCheck
635 | self.pcall = pcall
636 | end
637 | deepTransfer(instance, newInstance, oldInstance, major)
638 | crawlReplace(instance, instance, newInstance)
639 | local oldDeactivateFunc = data.deactivateFunc
640 | data.minor = minor
641 | data.deactivateFunc = deactivateFunc
642 | data.externalFunc = externalFunc
643 | rawset(instance, 'GetLibraryVersion', function(self)
644 | return major, minor
645 | end)
646 | if not rawget(instance, 'error') then
647 | rawset(instance, 'error', error)
648 | end
649 | if not rawget(instance, 'assert') then
650 | rawset(instance, 'assert', assert)
651 | end
652 | if not rawget(instance, 'argCheck') then
653 | rawset(instance, 'argCheck', argCheck)
654 | end
655 | if not rawget(instance, 'pcall') then
656 | rawset(instance, 'pcall', pcall)
657 | end
658 | if isAceLibrary then
659 | for _,v in pairs(self.libs) do
660 | local i = type(v) == "table" and v.instance
661 | if type(i) == "table" then
662 | if not rawget(i, 'error') or i.error == old_error then
663 | rawset(i, 'error', error)
664 | end
665 | if not rawget(i, 'assert') or i.assert == old_assert then
666 | rawset(i, 'assert', assert)
667 | end
668 | if not rawget(i, 'argCheck') or i.argCheck == old_argCheck then
669 | rawset(i, 'argCheck', argCheck)
670 | end
671 | if not rawget(i, 'pcall') or i.pcall == old_pcall then
672 | rawset(i, 'pcall', pcall)
673 | end
674 | end
675 | end
676 | end
677 | if activateFunc then
678 | safecall(activateFunc, instance, oldInstance, oldDeactivateFunc)
679 | else
680 | safecall(oldDeactivateFunc, oldInstance)
681 | end
682 | del(oldInstance)
683 |
684 | if externalFunc then
685 | for k,data in pairs(self.libs) do
686 | if k ~= major then
687 | safecall(externalFunc, instance, k, data.instance)
688 | end
689 | end
690 | end
691 |
692 | return instance
693 | end
694 |
695 | local iter
696 | function AceLibrary:IterateLibraries()
697 | if not iter then
698 | local function iter(t, k)
699 | k = next(t, k)
700 | if not k then
701 | return nil
702 | else
703 | return k, t[k].instance
704 | end
705 | end
706 | end
707 | return iter, self.libs, nil
708 | end
709 |
710 | -- @function Activate
711 | -- @brief The activateFunc for AceLibrary itself. Called when
712 | -- AceLibrary properly registers.
713 | -- @param self Reference to AceLibrary
714 | -- @param oldLib (optional) Reference to an old version of AceLibrary
715 | -- @param oldDeactivate (optional) Function to deactivate the old lib
716 | local function activate(self, oldLib, oldDeactivate)
717 | if not self.libs then
718 | if oldLib then
719 | self.libs = oldLib.libs
720 | self.scannedlibs = oldLib.scannedlibs
721 | end
722 | if not self.libs then
723 | self.libs = {}
724 | end
725 | if not self.scannedlibs then
726 | self.scannedlibs = {}
727 | end
728 | end
729 | if not self.positions then
730 | if oldLib then
731 | self.positions = oldLib.positions
732 | end
733 | if not self.positions then
734 | self.positions = setmetatable({}, { __mode = "k" })
735 | end
736 | end
737 |
738 | -- Expose the library in the global environment
739 | _G[ACELIBRARY_MAJOR] = self
740 |
741 | if oldDeactivate then
742 | oldDeactivate(oldLib)
743 | end
744 | end
745 |
746 | if not previous then
747 | previous = AceLibrary
748 | end
749 | if not previous.libs then
750 | previous.libs = {}
751 | end
752 | AceLibrary.libs = previous.libs
753 | if not previous.positions then
754 | previous.positions = setmetatable({}, { __mode = "k" })
755 | end
756 | AceLibrary.positions = previous.positions
757 | AceLibrary:Register(AceLibrary, ACELIBRARY_MAJOR, ACELIBRARY_MINOR, activate)
758 |
--------------------------------------------------------------------------------
/libs/AceLocale-2.2/AceLocale-2.2.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | Name: AceLocale-2.2
3 | Revision: $Rev: 17638 $
4 | Developed by: The Ace Development Team (http://www.wowace.com/index.php/The_Ace_Development_Team)
5 | Inspired By: Ace 1.x by Turan (turan@gryphon.com)
6 | Website: http://www.wowace.com/
7 | Documentation: http://www.wowace.com/index.php/AceLocale-2.2
8 | SVN: http://svn.wowace.com/root/trunk/Ace2/AceLocale-2.2
9 | Description: Localization library for addons to use to handle proper
10 | localization and internationalization.
11 | Dependencies: AceLibrary
12 | ]]
13 |
14 | local MAJOR_VERSION = "AceLocale-2.2"
15 | local MINOR_VERSION = "$Revision: 17638 $"
16 |
17 | if not AceLibrary then error(MAJOR_VERSION .. " requires AceLibrary.") end
18 | if not AceLibrary:IsNewVersion(MAJOR_VERSION, MINOR_VERSION) then return end
19 |
20 | if loadstring("return function(...) return ... end") and AceLibrary:HasInstance(MAJOR_VERSION) then return end -- lua51 check
21 | local AceLocale = {}
22 |
23 | local DEFAULT_LOCALE = "enUS"
24 | local _G = getfenv(0)
25 |
26 | local BASE_TRANSLATIONS, DEBUGGING, TRANSLATIONS, BASE_LOCALE, TRANSLATION_TABLES, REVERSE_TRANSLATIONS, STRICTNESS, DYNAMIC_LOCALES, CURRENT_LOCALE, NAME
27 |
28 | local rawget = rawget
29 | local rawset = rawset
30 | local type = type
31 |
32 | local newRegistries = {}
33 | local scheduleClear
34 |
35 | local lastSelf
36 | local __index = function(self, key)
37 | lastSelf = self
38 | local value = (rawget(self, TRANSLATIONS) or AceLocale.prototype)[key]
39 | rawset(self, key, value)
40 | return value
41 | end
42 |
43 | local __newindex = function(self, k, v)
44 | if type(v) ~= "function" and type(k) ~= "table" then
45 | AceLocale.error(self, "Cannot change the values of an AceLocale instance.")
46 | end
47 | rawset(self, k, v)
48 | end
49 |
50 | local __tostring = function(self)
51 | if type(rawget(self, 'GetLibraryVersion')) == "function" then
52 | return self:GetLibraryVersion()
53 | else
54 | return "AceLocale(" .. self[NAME] .. ")"
55 | end
56 | end
57 |
58 | local function clearCache(self)
59 | if not rawget(self, BASE_TRANSLATIONS) then
60 | return
61 | end
62 |
63 | local cache = self[BASE_TRANSLATIONS]
64 | rawset(self, REVERSE_TRANSLATIONS, nil)
65 |
66 | for k in pairs(self) do
67 | if rawget(cache, k) ~= nil then
68 | self[k] = nil
69 | end
70 | end
71 | rawset(self, 'tmp', true)
72 | self.tmp = nil
73 | end
74 |
75 | local function refixInstance(instance)
76 | if getmetatable(instance) then
77 | setmetatable(instance, nil)
78 | end
79 | local translations = instance[TRANSLATIONS]
80 | if translations then
81 | if getmetatable(translations) then
82 | setmetatable(translations, nil)
83 | end
84 | local baseTranslations = instance[BASE_TRANSLATIONS]
85 | if getmetatable(baseTranslations) then
86 | setmetatable(baseTranslations, nil)
87 | end
88 | if translations == baseTranslations or instance[STRICTNESS] then
89 | setmetatable(instance, {
90 | __index = __index,
91 | __newindex = __newindex,
92 | __tostring = __tostring
93 | })
94 |
95 | setmetatable(translations, {
96 | __index = AceLocale.prototype
97 | })
98 | else
99 | setmetatable(instance, {
100 | __index = __index,
101 | __newindex = __newindex,
102 | __tostring = __tostring
103 | })
104 |
105 | setmetatable(translations, {
106 | __index = baseTranslations,
107 | })
108 |
109 | setmetatable(baseTranslations, {
110 | __index = AceLocale.prototype,
111 | })
112 | end
113 | else
114 | setmetatable(instance, {
115 | __index = __index,
116 | __newindex = __newindex,
117 | __tostring = __tostring,
118 | })
119 | end
120 | clearCache(instance)
121 | newRegistries[instance] = true
122 | scheduleClear()
123 | return instance
124 | end
125 |
126 | function AceLocale:new(name)
127 | self:argCheck(name, 2, "string")
128 |
129 | if self.registry[name] and type(rawget(self.registry[name], 'GetLibraryVersion')) ~= "function" then
130 | return self.registry[name]
131 | end
132 |
133 | AceLocale.registry[name] = refixInstance({
134 | [STRICTNESS] = false,
135 | [NAME] = name,
136 | })
137 | newRegistries[AceLocale.registry[name]] = true
138 | return AceLocale.registry[name]
139 | end
140 |
141 | AceLocale.prototype = { class = AceLocale }
142 |
143 | function AceLocale.prototype:EnableDebugging()
144 | if rawget(self, BASE_TRANSLATIONS) then
145 | AceLocale.error(self, "Cannot enable debugging after a translation has been registered.")
146 | end
147 | rawset(self, DEBUGGING, true)
148 | end
149 |
150 | function AceLocale.prototype:EnableDynamicLocales(override)
151 | AceLocale.argCheck(self, override, 2, "boolean", "nil")
152 | if not override and rawget(self, BASE_TRANSLATIONS) then
153 | AceLocale.error(self, "Cannot enable dynamic locales after a translation has been registered.")
154 | end
155 | if not rawget(self, DYNAMIC_LOCALES) then
156 | rawset(self, DYNAMIC_LOCALES, true)
157 | if rawget(self, BASE_LOCALE) then
158 | if not rawget(self, TRANSLATION_TABLES) then
159 | rawset(self, TRANSLATION_TABLES, {})
160 | end
161 | self[TRANSLATION_TABLES][self[BASE_LOCALE]] = self[BASE_TRANSLATIONS]
162 | self[TRANSLATION_TABLES][self[CURRENT_LOCALE]] = self[TRANSLATIONS]
163 | end
164 | end
165 | end
166 |
167 | function AceLocale.prototype:RegisterTranslations(locale, func)
168 | AceLocale.argCheck(self, locale, 2, "string")
169 | AceLocale.argCheck(self, func, 3, "function")
170 |
171 | if locale == rawget(self, BASE_LOCALE) then
172 | AceLocale.error(self, "Cannot provide the same locale more than once. %q provided twice.", locale)
173 | end
174 |
175 | if rawget(self, BASE_TRANSLATIONS) and GetLocale() ~= locale then
176 | if rawget(self, DEBUGGING) or rawget(self, DYNAMIC_LOCALES) then
177 | if not rawget(self, TRANSLATION_TABLES) then
178 | rawset(self, TRANSLATION_TABLES, {})
179 | end
180 | if self[TRANSLATION_TABLES][locale] then
181 | AceLocale.error(self, "Cannot provide the same locale more than once. %q provided twice.", locale)
182 | end
183 | local t = func()
184 | func = nil
185 | if type(t) ~= "table" then
186 | AceLocale.error(self, "Bad argument #3 to `RegisterTranslations'. function did not return a table. (expected table, got %s)", type(t))
187 | end
188 | self[TRANSLATION_TABLES][locale] = t
189 | t = nil
190 | end
191 | func = nil
192 | return
193 | end
194 | local t = func()
195 | func = nil
196 | if type(t) ~= "table" then
197 | AceLocale.error(self, "Bad argument #3 to `RegisterTranslations'. function did not return a table. (expected table, got %s)", type(t))
198 | end
199 |
200 | rawset(self, TRANSLATIONS, t)
201 | if not rawget(self, BASE_TRANSLATIONS) then
202 | rawset(self, BASE_TRANSLATIONS, t)
203 | rawset(self, BASE_LOCALE, locale)
204 | for key,value in pairs(t) do
205 | if value == true then
206 | t[key] = key
207 | end
208 | end
209 | else
210 | for key, value in pairs(self[TRANSLATIONS]) do
211 | if not rawget(self[BASE_TRANSLATIONS], key) then
212 | AceLocale.error(self, "Improper translation exists. %q is likely misspelled for locale %s.", key, locale)
213 | end
214 | if value == true then
215 | AceLocale.error(self, "Can only accept true as a value on the base locale. %q is the base locale, %q is not.", rawget(self, BASE_LOCALE), locale)
216 | end
217 | end
218 | end
219 | rawset(self, CURRENT_LOCALE, locale)
220 | refixInstance(self)
221 | if rawget(self, DEBUGGING) or rawget(self, DYNAMIC_LOCALES) then
222 | if not rawget(self, TRANSLATION_TABLES) then
223 | rawset(self, TRANSLATION_TABLES, {})
224 | end
225 | self[TRANSLATION_TABLES][locale] = t
226 | end
227 | t = nil
228 | end
229 |
230 | function AceLocale.prototype:SetLocale(locale)
231 | AceLocale.argCheck(self, locale, 2, "string", "boolean")
232 | if not rawget(self, DYNAMIC_LOCALES) then
233 | AceLocale.error(self, "Cannot call `SetLocale' without first calling `EnableDynamicLocales'.")
234 | end
235 | if not rawget(self, TRANSLATION_TABLES) then
236 | AceLocale.error(self, "Cannot call `SetLocale' without first calling `RegisterTranslations'.")
237 | end
238 | if locale == true then
239 | locale = GetLocale()
240 | if not self[TRANSLATION_TABLES][locale] then
241 | locale = self[BASE_LOCALE]
242 | end
243 | end
244 |
245 | if self[CURRENT_LOCALE] == locale then
246 | return
247 | end
248 |
249 | if not self[TRANSLATION_TABLES][locale] then
250 | AceLocale.error(self, "Locale %q not registered.", locale)
251 | end
252 |
253 | self[TRANSLATIONS] = self[TRANSLATION_TABLES][locale]
254 | self[CURRENT_LOCALE] = locale
255 | refixInstance(self)
256 | end
257 |
258 | function AceLocale.prototype:GetLocale()
259 | if not rawget(self, TRANSLATION_TABLES) then
260 | AceLocale.error(self, "Cannot call `GetLocale' without first calling `RegisterTranslations'.")
261 | end
262 | return self[CURRENT_LOCALE]
263 | end
264 |
265 | local function iter(t, position)
266 | return (next(t, position))
267 | end
268 |
269 | function AceLocale.prototype:IterateAvailableLocales()
270 | if not rawget(self, DYNAMIC_LOCALES) then
271 | AceLocale.error(self, "Cannot call `IterateAvailableLocales' without first calling `EnableDynamicLocales'.")
272 | end
273 | if not rawget(self, TRANSLATION_TABLES) then
274 | AceLocale.error(self, "Cannot call `IterateAvailableLocales' without first calling `RegisterTranslations'.")
275 | end
276 | return iter, self[TRANSLATION_TABLES], nil
277 | end
278 |
279 | function AceLocale.prototype:HasLocale(locale)
280 | if not rawget(self, DYNAMIC_LOCALES) then
281 | AceLocale.error(self, "Cannot call `HasLocale' without first calling `EnableDynamicLocales'.")
282 | end
283 | AceLocale.argCheck(self, locale, 2, "string")
284 | return rawget(self, TRANSLATION_TABLES) and self[TRANSLATION_TABLES][locale] ~= nil
285 | end
286 |
287 | function AceLocale.prototype:SetStrictness(strict)
288 | AceLocale.argCheck(self, strict, 2, "boolean")
289 | local mt = getmetatable(self)
290 | if not mt then
291 | AceLocale.error(self, "Cannot call `SetStrictness' without a metatable.")
292 | end
293 | if not rawget(self, TRANSLATIONS) then
294 | AceLocale.error(self, "No translations registered.")
295 | end
296 | rawset(self, STRICTNESS, strict)
297 | refixInstance(self)
298 | end
299 |
300 | local function initReverse(self)
301 | rawset(self, REVERSE_TRANSLATIONS, {})
302 | local alpha = self[TRANSLATIONS]
303 | local bravo = self[REVERSE_TRANSLATIONS]
304 | for base, localized in pairs(alpha) do
305 | bravo[localized] = base
306 | end
307 | end
308 |
309 | function AceLocale.prototype:GetTranslation(text)
310 | AceLocale.argCheck(self, text, 1, "string", "number")
311 | if not rawget(self, TRANSLATIONS) then
312 | AceLocale.error(self, "No translations registered")
313 | end
314 | return self[text]
315 | end
316 |
317 | function AceLocale.prototype:GetStrictTranslation(text)
318 | AceLocale.argCheck(self, text, 1, "string", "number")
319 | local x = rawget(self, TRANSLATIONS)
320 | if not x then
321 | AceLocale.error(self, "No translations registered")
322 | end
323 | local value = rawget(x, text)
324 | if value == nil then
325 | AceLocale.error(self, "Translation %q does not exist for locale %s", text, self[CURRENT_LOCALE])
326 | end
327 | return value
328 | end
329 |
330 | function AceLocale.prototype:GetReverseTranslation(text)
331 | local x = rawget(self, REVERSE_TRANSLATIONS)
332 | if not x then
333 | if not rawget(self, TRANSLATIONS) then
334 | AceLocale.error(self, "No translations registered")
335 | end
336 | initReverse(self)
337 | x = self[REVERSE_TRANSLATIONS]
338 | end
339 | local translation = x[text]
340 | if not translation then
341 | AceLocale.error(self, "Reverse translation for %q does not exist", text)
342 | end
343 | return translation
344 | end
345 |
346 | function AceLocale.prototype:GetIterator()
347 | local x = rawget(self, TRANSLATIONS)
348 | if not x then
349 | AceLocale.error(self, "No translations registered")
350 | end
351 | return next, x, nil
352 | end
353 |
354 | function AceLocale.prototype:GetReverseIterator()
355 | local x = rawget(self, REVERSE_TRANSLATIONS)
356 | if not x then
357 | if not rawget(self, TRANSLATIONS) then
358 | AceLocale.error(self, "No translations registered")
359 | end
360 | initReverse(self)
361 | x = self[REVERSE_TRANSLATIONS]
362 | end
363 | return next, x, nil
364 | end
365 |
366 | function AceLocale.prototype:HasTranslation(text)
367 | AceLocale.argCheck(self, text, 1, "string", "number")
368 | local x = rawget(self, TRANSLATIONS)
369 | if not x then
370 | AceLocale.error(self, "No translations registered")
371 | end
372 | return rawget(x, text) and true
373 | end
374 |
375 | function AceLocale.prototype:HasReverseTranslation(text)
376 | local x = rawget(self, REVERSE_TRANSLATIONS)
377 | if not x then
378 | if not rawget(self, TRANSLATIONS) then
379 | AceLocale.error(self, "No translations registered")
380 | end
381 | initReverse(self)
382 | x = self[REVERSE_TRANSLATIONS]
383 | end
384 | return x[text] and true
385 | end
386 |
387 | function AceLocale.prototype:Debug()
388 | if not rawget(self, DEBUGGING) then
389 | return
390 | end
391 | local words = {}
392 | local locales = {"enUS", "ruRU", "deDE", "frFR", "koKR", "zhCN", "zhTW", "esES"}
393 | local localizations = {}
394 | DEFAULT_CHAT_FRAME:AddMessage("--- AceLocale Debug ---")
395 | for _,locale in ipairs(locales) do
396 | if not self[TRANSLATION_TABLES][locale] then
397 | DEFAULT_CHAT_FRAME:AddMessage(string.format("Locale %q not found", locale))
398 | else
399 | localizations[locale] = self[TRANSLATION_TABLES][locale]
400 | end
401 | end
402 | local localeDebug = {}
403 | for locale, localization in pairs(localizations) do
404 | localeDebug[locale] = {}
405 | for word in pairs(localization) do
406 | if type(localization[word]) == "table" then
407 | if type(words[word]) ~= "table" then
408 | words[word] = {}
409 | end
410 | for bit in pairs(localization[word]) do
411 | if type(localization[word][bit]) == "string" then
412 | words[word][bit] = true
413 | end
414 | end
415 | elseif type(localization[word]) == "string" then
416 | words[word] = true
417 | end
418 | end
419 | end
420 | for word in pairs(words) do
421 | if type(words[word]) == "table" then
422 | for bit in pairs(words[word]) do
423 | for locale, localization in pairs(localizations) do
424 | if not rawget(localization, word) or not localization[word][bit] then
425 | localeDebug[locale][word .. "::" .. bit] = true
426 | end
427 | end
428 | end
429 | else
430 | for locale, localization in pairs(localizations) do
431 | if not rawget(localization, word) then
432 | localeDebug[locale][word] = true
433 | end
434 | end
435 | end
436 | end
437 | for locale, t in pairs(localeDebug) do
438 | if not next(t) then
439 | DEFAULT_CHAT_FRAME:AddMessage(string.format("Locale %q complete", locale))
440 | else
441 | DEFAULT_CHAT_FRAME:AddMessage(string.format("Locale %q missing:", locale))
442 | for word in pairs(t) do
443 | DEFAULT_CHAT_FRAME:AddMessage(string.format(" %q", word))
444 | end
445 | end
446 | end
447 | DEFAULT_CHAT_FRAME:AddMessage("--- End AceLocale Debug ---")
448 | end
449 |
450 | setmetatable(AceLocale.prototype, {
451 | __index = function(self, k)
452 | if type(k) ~= "table" and k ~= 0 and k ~= "GetLibraryVersion" and k ~= "error" and k ~= "assert" and k ~= "argCheck" and k ~= "pcall" then -- HACK: remove "GetLibraryVersion" and such later.
453 | AceLocale.error(lastSelf or self, "Translation %q does not exist.", k)
454 | end
455 | return nil
456 | end
457 | })
458 |
459 | local function activate(self, oldLib, oldDeactivate)
460 | AceLocale = self
461 |
462 | self.frame = oldLib and oldLib.frame or CreateFrame("Frame")
463 | self.registry = oldLib and oldLib.registry or {}
464 | self.BASE_TRANSLATIONS = oldLib and oldLib.BASE_TRANSLATIONS or {}
465 | self.DEBUGGING = oldLib and oldLib.DEBUGGING or {}
466 | self.TRANSLATIONS = oldLib and oldLib.TRANSLATIONS or {}
467 | self.BASE_LOCALE = oldLib and oldLib.BASE_LOCALE or {}
468 | self.TRANSLATION_TABLES = oldLib and oldLib.TRANSLATION_TABLES or {}
469 | self.REVERSE_TRANSLATIONS = oldLib and oldLib.REVERSE_TRANSLATIONS or {}
470 | self.STRICTNESS = oldLib and oldLib.STRICTNESS or {}
471 | self.NAME = oldLib and oldLib.NAME or {}
472 | self.DYNAMIC_LOCALES = oldLib and oldLib.DYNAMIC_LOCALES or {}
473 | self.CURRENT_LOCALE = oldLib and oldLib.CURRENT_LOCALE or {}
474 |
475 | BASE_TRANSLATIONS = self.BASE_TRANSLATIONS
476 | DEBUGGING = self.DEBUGGING
477 | TRANSLATIONS = self.TRANSLATIONS
478 | BASE_LOCALE = self.BASE_LOCALE
479 | TRANSLATION_TABLES = self.TRANSLATION_TABLES
480 | REVERSE_TRANSLATIONS = self.REVERSE_TRANSLATIONS
481 | STRICTNESS = self.STRICTNESS
482 | NAME = self.NAME
483 | DYNAMIC_LOCALES = self.DYNAMIC_LOCALES
484 | CURRENT_LOCALE = self.CURRENT_LOCALE
485 |
486 |
487 | local GetTime = GetTime
488 | local timeUntilClear = GetTime() + 5
489 | scheduleClear = function()
490 | if next(newRegistries) then
491 | self.frame:Show()
492 | timeUntilClear = GetTime() + 5
493 | end
494 | end
495 |
496 | if not self.registry then
497 | self.registry = {}
498 | else
499 | for name, instance in pairs(self.registry) do
500 | local name = name
501 | local mt = getmetatable(instance)
502 | setmetatable(instance, nil)
503 | instance[NAME] = name
504 | local strict
505 | if instance[STRICTNESS] ~= nil then
506 | strict = instance[STRICTNESS]
507 | elseif instance[TRANSLATIONS] ~= instance[BASE_TRANSLATIONS] then
508 | if getmetatable(instance[TRANSLATIONS]).__index == oldLib.prototype then
509 | strict = true
510 | end
511 | end
512 | instance[STRICTNESS] = strict and true or false
513 | refixInstance(instance)
514 | end
515 | end
516 |
517 | self.frame:SetScript("OnEvent", scheduleClear)
518 | self.frame:SetScript("OnUpdate", function() -- (this, elapsed)
519 | if timeUntilClear - GetTime() <= 0 then
520 | self.frame:Hide()
521 | for k in pairs(newRegistries) do
522 | clearCache(k)
523 | newRegistries[k] = nil
524 | k = nil
525 | end
526 | end
527 | end)
528 | self.frame:UnregisterAllEvents()
529 | self.frame:RegisterEvent("ADDON_LOADED")
530 | self.frame:RegisterEvent("PLAYER_ENTERING_WORLD")
531 | self.frame:Show()
532 |
533 | if oldDeactivate then
534 | oldDeactivate(oldLib)
535 | end
536 | end
537 |
538 | AceLibrary:Register(AceLocale, MAJOR_VERSION, MINOR_VERSION, activate)
539 |
--------------------------------------------------------------------------------
/libs/Babble-Class-2.2/Babble-Class-2.2.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | Name: Babble-Class-2.2
3 | Revision: $Rev: 14410 $
4 | Author(s): ckknight (ckknight@gmail.com)
5 | Website: http://ckknight.wowinterface.com/
6 | Documentation: http://wiki.wowace.com/index.php/Babble-Class-2.2
7 | SVN: http://svn.wowace.com/root/trunk/Babble-2.2/Babble-Class-2.2
8 | Description: A library to provide localizations for classes.
9 | Dependencies: AceLibrary, AceLocale-2.2
10 | ]]
11 |
12 | local MAJOR_VERSION = "Babble-Class-2.2"
13 | local MINOR_VERSION = tonumber(string.sub("$Revision: 14410 $", 12, -3))
14 |
15 | if not AceLibrary then error(MAJOR_VERSION .. " requires AceLibrary") end
16 |
17 | if not AceLibrary:HasInstance("AceLocale-2.2") then error(MAJOR_VERSION .. " requires AceLocale-2.2") end
18 |
19 | local _, x = AceLibrary("AceLocale-2.2"):GetLibraryVersion()
20 | MINOR_VERSION = MINOR_VERSION * 100000 + x
21 |
22 | if not AceLibrary:IsNewVersion(MAJOR_VERSION, MINOR_VERSION) then return end
23 |
24 | local BabbleClass = AceLibrary("AceLocale-2.2"):new(MAJOR_VERSION)
25 |
26 | -- uncomment below for debug information
27 | -- BabbleClass:EnableDebugging()
28 |
29 | BabbleClass:RegisterTranslations("enUS", function()
30 | return {
31 | ["Warlock"] = true,
32 | ["Warrior"] = true,
33 | ["Hunter"] = true,
34 | ["Mage"] = true,
35 | ["Priest"] = true,
36 | ["Druid"] = true,
37 | ["Paladin"] = true,
38 | ["Shaman"] = true,
39 | ["Rogue"] = true,
40 | }
41 | end)
42 |
43 | BabbleClass:RegisterTranslations("ruRU", function()
44 | return {
45 | ["Warlock"] = "Чернокнижник",
46 | ["Warrior"] = "Воин",
47 | ["Hunter"] = "Охотник",
48 | ["Mage"] = "Маг",
49 | ["Priest"] = "Жрец",
50 | ["Druid"] = "Друид",
51 | ["Paladin"] = "Паладин",
52 | ["Shaman"] = "Шаман",
53 | ["Rogue"] = "Разбойник",
54 | }
55 | end)
56 |
57 | BabbleClass:RegisterTranslations("deDE", function()
58 | return {
59 | ["Warlock"] = "Hexenmeister",
60 | ["Warrior"] = "Krieger",
61 | ["Hunter"] = "Jäger",
62 | ["Mage"] = "Magier",
63 | ["Priest"] = "Priester",
64 | ["Druid"] = "Druide",
65 | ["Paladin"] = "Paladin",
66 | ["Shaman"] = "Schamane",
67 | ["Rogue"] = "Schurke",
68 | }
69 | end)
70 |
71 | BabbleClass:RegisterTranslations("frFR", function()
72 | return {
73 | ["Warlock"] = "D\195\169moniste",
74 | ["Warrior"] = "Guerrier",
75 | ["Hunter"] = "Chasseur",
76 | ["Mage"] = "Mage",
77 | ["Priest"] = "Pr\195\170tre",
78 | ["Druid"] = "Druide",
79 | ["Paladin"] = "Paladin",
80 | ["Shaman"] = "Chaman",
81 | ["Rogue"] = "Voleur",
82 | }
83 | end)
84 |
85 | BabbleClass:RegisterTranslations("zhCN", function()
86 | return {
87 | ["Warlock"] = "术士",
88 | ["Warrior"] = "战士",
89 | ["Hunter"] = "猎人",
90 | ["Mage"] = "法师",
91 | ["Priest"] = "牧师",
92 | ["Druid"] = "德鲁伊",
93 | ["Paladin"] = "圣骑士",
94 | ["Shaman"] = "萨满祭司",
95 | ["Rogue"] = "盗贼",
96 | }
97 | end)
98 |
99 | BabbleClass:RegisterTranslations("zhTW", function()
100 | return {
101 | ["Warlock"] = "術士",
102 | ["Warrior"] = "戰士",
103 | ["Hunter"] = "獵人",
104 | ["Mage"] = "法師",
105 | ["Priest"] = "牧師",
106 | ["Druid"] = "德魯伊",
107 | ["Paladin"] = "聖騎士",
108 | ["Shaman"] = "薩滿",
109 | ["Rogue"] = "盜賊",
110 | }
111 | end)
112 |
113 | BabbleClass:RegisterTranslations("koKR", function()
114 | return {
115 | ["Warlock"] = "흑마법사",
116 | ["Warrior"] = "전사",
117 | ["Hunter"] = "사냥꾼",
118 | ["Mage"] = "마법사",
119 | ["Priest"] = "사제",
120 | ["Druid"] = "드루이드",
121 | ["Paladin"] = "성기사",
122 | ["Shaman"] = "주술사",
123 | ["Rogue"] = "도적",
124 | }
125 | end)
126 |
127 | BabbleClass:Debug()
128 | BabbleClass:SetStrictness(true)
129 |
130 | function BabbleClass:GetColor(class)
131 | self:argCheck(class, 2, "string")
132 | if self:HasReverseTranslation(class) then
133 | class = string.upper(self:GetReverseTranslation(class))
134 | else
135 | class = string.upper(class)
136 | end
137 | if RAID_CLASS_COLORS and RAID_CLASS_COLORS[class] then
138 | return RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b
139 | end
140 | return 0.63, 0.63, 0.63
141 | end
142 |
143 | function BabbleClass:GetHexColor(class)
144 | self:argCheck(class, 2, "string")
145 | local r, g, b = self:GetColor(class)
146 | return string.format("%02x%02x%02x", r * 255, g * 255, b * 255)
147 | end
148 |
149 | AceLibrary:Register(BabbleClass, MAJOR_VERSION, MINOR_VERSION)
150 | BabbleClass = nil
151 |
--------------------------------------------------------------------------------
/localization.de.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | CensusPlus for World of Warcraft(tm).
3 |
4 | License:
5 | This program is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | as published by the Free Software Foundation; either version 2
8 | of the License, or (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program(see GLP.txt); if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 | ]]
19 |
20 |
21 | -- Version : German (by MadMax-X, StarDust)
22 | -- Last Update : 02/17/2005
23 |
24 | if ( GetLocale() == "deDE" ) then
25 |
26 | -- Cosmos Configuration
27 | CENSUSPlus_BUTTON_TEXT = "Census+";
28 | CENSUSPlus_BUTTON_SUBTEXT = "Realm Census";
29 | CENSUSPlus_BUTTON_TIP = "Hier klicken um Census+ anzuzeigen oder zu verstecken.";
30 | CENSUSPlus_HELP = " Benutze /censusplus um das Census+ Fenster zu \195\182ffnen.";
31 |
32 | -- Chat Configuration
33 | CENSUSPlus_MSG1 = " Geladen - mit /censusplus or /census+ wird das Hauptfenster ge\195\182ffnet";
34 | CENSUSPlus_MSG2 = "Mit /censusdate kann das aktuelle Datum im Format MM-DD-YYYY gesetzt werden, z.B. 12-25-2004";
35 |
36 | -- Interface Configuration
37 | CENSUSPlus_UPLOAD = "Lade deine Census+ Daten bei www.WarcraftRealms.com hoch!";
38 | CENSUSPlus_SETTINGDATE = "Datum wird gesetzt => ";
39 | CENSUSPlus_PAUSE = "Pause";
40 | CENSUSPlus_UNPAUSE = "Weiter";
41 | CENSUSPlus_STOP = "Stop";
42 |
43 | CENSUSPlus_TAKECENSUS = "Z\195\164hle alle aktiven \nSpieler deiner Fraktion \nauf diesem Server.";
44 | CENSUSPlus_PURGEDATABASE = "L\195\182sche die Datenbank \nf\195\188r diesen Server \nund diese Fraktion.";
45 | CENSUSPlus_PAUSECENSUS = "Pausiere die laufende Z\195\164hlung.";
46 | CENSUSPlus_STOPCENSUS = "Stoppe das laufende Census+.";
47 |
48 | CENSUSPlus_PURGEMSG = "Charakterdatenbank wurde bereinigt.";
49 | CENSUSPlus_ISINPROGRESS = "Es l\195\164uft bereits eine Z\195\164hlung, versuch es bitte sp\195\164ter nochmal.";
50 | CENSUSPlus_TAKINGONLINE = "Z\195\164hlung der gerade aktiven Charaktere...";
51 | CENSUSPlus_PLZUPDATEDATE = "Bitte benutze /censusdate um das aktuelle Datum zu setzen und somit die Auswertung genauer zu machen. (Format: /censusdate MM-DD-YYYY, z.B. /censusdate 12-25-2004";
52 | CENSUSPlus_NOCENSUS = "Es l\195\164uft gerade keine Z\195\164hlung.";
53 | CENSUSPlus_FINISHED = "Z\195\164hlung beendet. %s neue Charaktere gefunden, %s aktualisiert.";
54 | CENSUSPlus_TOOMANY = "FEHLER: Zu viele \195\188bereinstimmende Charaktere: %s";
55 | CENSUSPlus_WAITING = "Warte, um /who - Abfrage zu senden...";
56 | CENSUSPlus_SENDING = "Sende /who %s";
57 | CENSUSPlus_PROCESSING = "Verarbeite %s Charaktere.";
58 |
59 | CENSUSPlus_REALMNAME = "Server: %s";
60 | CENSUSPlus_REALMUNKNOWN = "Server: Unbekannt";
61 | CENSUSPlus_FACTION = "Fraktion: %s";
62 | CENSUSPlus_FACTIONUNKNOWN = "Fraktion: Unbekannt";
63 | CENSUSPlus_TOTALCHAR = "Charaktere Gesamte : %d";
64 | CENSUSPlus_TOTALCHAR_0 = "Charaktere Gesamte : 0";
65 | CENSUSPlus_TOTALCHARXP = "Charakter-XP Gesamte : %d";
66 | CENSUSPlus_TOTALCHARXP_0 = "Charakter-XP Gesamte : 0";
67 | CENSUSPlus_AUTOCLOSEWHO = "Who automatisch beenden";
68 | CENSUSPlus_SHOWMINI = "Mini-Button beim Start";
69 | CENSUSPlus_UNGUILDED = "(ohne Gilde)";
70 | CENSUSPlus_TAKE = "Z\195\164hlen";
71 | CENSUSPlus_TOPGUILD = "Top Gilden nach XP";
72 | CENSUSPlus_RACE = "Rassen";
73 | CENSUSPlus_CLASS = "Klassen";
74 | CENSUSPlus_LEVEL = "Level";
75 | CENSUSPlus_PURGE = "L\195\182schen";
76 |
77 | CENSUSPlus_MAXIMIZE = "Census+ Fenster maximieren.";
78 | CENSUSPlus_MINIMIZE = "Census+ Fenster minimieren.";
79 | CENSUSPlus_BUTTON_MINIMIZE = "Minimieren";
80 |
81 | CENSUSPlus_TURTLE = "TURTLE";
82 |
83 | CENSUSPlus_DRUID = "Druide";
84 | CENSUSPlus_HUNTER = "J\195\164ger";
85 | CENSUSPlus_MAGE = "Magier";
86 | CENSUSPlus_PRIEST = "Priester";
87 | CENSUSPlus_ROGUE = "Schurke";
88 | CENSUSPlus_WARLOCK = "Hexenmeister";
89 | CENSUSPlus_WARRIOR = "Krieger";
90 | CENSUSPlus_SHAMAN = "Schamane";
91 | CENSUSPlus_PALADIN = "Paladin";
92 |
93 | CENSUSPlus_DWARF = "Zwerg";
94 | CENSUSPlus_GNOME = "Gnom";
95 | CENSUSPlus_HUMAN = "Mensch";
96 | CENSUSPlus_NIGHTELF = "Nachtelf";
97 | CENSUSPlus_ORC = "Orc";
98 | CENSUSPlus_TAUREN = "Tauren";
99 | CENSUSPlus_TROLL = "Troll";
100 | CENSUSPlus_UNDEAD = "Untoter";
101 |
102 | CENSUSPLUS_US_LOCALE = "Bitte gib an, ob du auf einem US-Server spielst.";
103 | CENSUSPLUS_EU_LOCALE = "Bitte gib an, ob du auf einem EURO-Server spielst.";
104 | CENSUSPLUS_LOCALE_SELECT = "Bitte gib an, ob du auf einem US- oder EURO-Server spielst.";
105 |
106 | end
--------------------------------------------------------------------------------
/localization.fr.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | CensusPlus for World of Warcraft(tm).
3 |
4 | License:
5 | This program is free software; you can redistribute it and/or
6 | modify it under the terms of the GNU General Public License
7 | as published by the Free Software Foundation; either version 2
8 | of the License, or (at your option) any later version.
9 |
10 | This program is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | GNU General Public License for more details.
14 |
15 | You should have received a copy of the GNU General Public License
16 | along with this program(see GLP.txt); if not, write to the Free Software
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 | ]]
19 |
20 |
21 | -- Version : French (by Juki)
22 | -- Last Update : 02/17/2005
23 |
24 | if ( GetLocale() == "frFR" ) then
25 |
26 | -- Cosmos Configuration
27 | CENSUSPlus_BUTTON_TEXT = "Census+";
28 | CENSUSPlus_BUTTON_SUBTEXT = "Stats serveur";
29 | CENSUSPlus_BUTTON_TIP = "Cliquez ici pour montrer ou masquer Census+.";
30 | CENSUSPlus_HELP = " Utilisez /censusplus pour ouvrir et fermer Census+.";
31 |
32 | -- Chat Configuration
33 | CENSUSPlus_MSG1 = " Chargée - Tapez /censusplus ou /census+ pour ouvrir la fenêtre principale";
34 | CENSUSPlus_MSG2 = "Utilisez /censusdate pour configurer la date du jour dans le format MM-DD-YYYY, ie.12-25-2004";
35 |
36 | -- Chat Configuration
37 | CENSUSPlus_UPLOAD = "";
38 | CENSUSPlus_SETTINGDATE = "Mise à jour de la date => ";
39 | CENSUSPlus_PAUSE = "Pause";
40 | CENSUSPlus_UNPAUSE = "Reprendre";
41 | CENSUSPlus_STOP = "Stop";
42 |
43 | CENSUSPlus_TAKECENSUS = "Faire un recensement des joueurs \nactuellement en ligne sur ce serveur \net dans cette faction";
44 | CENSUSPlus_PURGEDATABASE = "Supprime la base de donnée concernant \nle serveur et la faction en cours.";
45 | CENSUSPlus_PAUSECENSUS = "Mettre en pause le recensement en cours";
46 | CENSUSPlus_STOPCENSUS = "Arrêter le recensement en cours"
47 |
48 | CENSUSPlus_PURGEMSG = "Base de donnée supprimée.";
49 | CENSUSPlus_ISINPROGRESS = "Un recensement est en cours, veuillez patienter";
50 | CENSUSPlus_TAKINGONLINE = "Recensement des joueurs en cours ...";
51 | CENSUSPlus_PLZUPDATEDATE = "SVP utilisez /censusdate pour configurer la date du jour pour des données plus précises. Format /censusdate MM-DD-YYYY, exemple, /censusdate 12-25-2004";
52 | CENSUSPlus_NOCENSUS = "Aucun recensement en cours";
53 | CENSUSPlus_FINISHED = "Recensement terminé. %s nouveaux personnages et %s mis à jour.";
54 | CENSUSPlus_TOOMANY = "ERREUR: Trop de joueurs correspondants à : %s";
55 | CENSUSPlus_WAITING = "En attente de lancement de requête /who ...";
56 | CENSUSPlus_SENDING = "Envoi de requête /who %s";
57 | CENSUSPlus_PROCESSING = "Analyse de %s personnages.";
58 |
59 | CENSUSPlus_REALMNAME = "Serveur : %s";
60 | CENSUSPlus_REALMUNKNOWN = "Serveur : Inconnu";
61 | CENSUSPlus_FACTION = "Faction : %s";
62 | CENSUSPlus_FACTIONUNKNOWN = "Faction : Inconnu";
63 | CENSUSPlus_TOTALCHAR = "Nombre de personnages : %d";
64 | CENSUSPlus_TOTALCHAR_0 = "Nombre de personnages : 0";
65 | CENSUSPlus_TOTALCHARXP = "Nombre d'xp total : %d";
66 | CENSUSPlus_TOTALCHARXP_0 = "Nombre d'xp total : 0";
67 | CENSUSPlus_AUTOCLOSEWHO = "Fermeture auto du /Who";
68 | CENSUSPlus_SHOWMINI = "Montrer Mini au démarrage";
69 | CENSUSPlus_UNGUILDED = "(Sans Guilde)";
70 | CENSUSPlus_TAKE = "Recenser";
71 | CENSUSPlus_TOPGUILD = "Meilleures guildes par XP";
72 | CENSUSPlus_RACE = "Races";
73 | CENSUSPlus_CLASS = "Classes";
74 | CENSUSPlus_LEVEL = "Niveaux";
75 | CENSUSPlus_PURGE = "Mettre à Zero";
76 |
77 | CENSUSPlus_MAXIMIZE = "Agrandir la fenêtre CensusPlus";
78 | CENSUSPlus_MINIMIZE = "Réduire la fenêtre CensusPlus";
79 | CENSUSPlus_BUTTON_MINIMIZE = "Réduire";
80 |
81 | CENSUSPlus_TURTLE = "TURTLE";
82 |
83 | CENSUSPlus_DRUID = "Druide";
84 | CENSUSPlus_HUNTER = "Chasseur";
85 | CENSUSPlus_MAGE = "Mage";
86 | CENSUSPlus_PRIEST = "Prêtre";
87 | CENSUSPlus_ROGUE = "Voleur";
88 | CENSUSPlus_WARLOCK = "Démoniste";
89 | CENSUSPlus_WARRIOR = "Guerrier";
90 | CENSUSPlus_SHAMAN = "Chaman";
91 | CENSUSPlus_PALADIN = "Paladin";
92 |
93 | CENSUSPlus_DWARF = "Nain";
94 | CENSUSPlus_GNOME = "Gnome";
95 | CENSUSPlus_HUMAN = "Humain";
96 | CENSUSPlus_NIGHTELF = "Elfe de la nuit";
97 | CENSUSPlus_ORC = "Orc";
98 | CENSUSPlus_TAUREN = "Tauren";
99 | CENSUSPlus_TROLL = "Troll";
100 | CENSUSPlus_UNDEAD = "Mort-vivant";
101 |
102 | CENSUSPLUS_US_LOCALE = "Choisissez si vous jouez sur un serveur US";
103 | CENSUSPLUS_EU_LOCALE = "Choisissez si vous jouez sur un serveur EURO";
104 | CENSUSPLUS_LOCALE_SELECT = "Choisissez la localité de votre serveur";
105 |
106 | end
--------------------------------------------------------------------------------
/localization.lua:
--------------------------------------------------------------------------------
1 | --[[
2 | CensusPlus for World of Warcraft(tm).
3 |
4 | Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com
5 |
6 | License:
7 | This program is free software; you can redistribute it and/or
8 | modify it under the terms of the GNU General Public License
9 | as published by the Free Software Foundation; either version 2
10 | of the License, or (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License
18 | along with this program(see GLP.txt); if not, write to the Free Software
19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 | ]]
21 |
22 |
23 | CENSUSPlus_BUTTON_TEXT = "Census+ Turtle";
24 | CENSUSPlus_BUTTON_SUBTEXT = "Realm Census";
25 | CENSUSPlus_BUTTON_TIP = "Click here to show or hide Census+ Turtle.";
26 | CENSUSPlus_HELP = " Use /censusplus to open and close the Census+ Turtle UI.";
27 |
28 | CENSUSPlus_MSG1 = " Loaded - type /censusplus or /census+ to open main window";
29 | CENSUSPlus_MSG2 = "Use /censusdate to set today's date in the format of MM-DD-YYYY, ie. 12-25-2004";
30 |
31 | CENSUSPlus_UPLOAD = "https://github.com/Lexiebean/CensusPlusTurtle";
32 | CENSUSPlus_SETTINGDATE = "Setting date to => ";
33 | CENSUSPlus_PAUSE = "Pause";
34 | CENSUSPlus_UNPAUSE = "Un-Pause";
35 | CENSUSPlus_STOP = "Stop";
36 | CENSUSPlus_PRUNE = "Prune";
37 |
38 | CENSUSPlus_TAKECENSUS = "Take a census of players \ncurrently online on this server \nand in this faction";
39 | CENSUSPlus_PURGEDATABASE = "Purge the database for this server and faction";
40 | CENSUSPlus_PAUSECENSUS = "Pause the current census";
41 | CENSUSPlus_UNPAUSECENSUS = "Un-Pause the current census";
42 | CENSUSPlus_STOPCENSUS = "Stop the currently active Census";
43 | CENSUSPlus_PRUNECENSUS = "Prune the database by removing characters not seen in 30 days.";
44 |
45 | CENSUSPlus_PURGEMSG = "Purged character database.";
46 | CENSUSPlus_ISINPROGRESS = "A Census is in progress, try again later";
47 | CENSUSPlus_TAKINGONLINE = "Taking census of characters online...";
48 | CENSUSPlus_PLZUPDATEDATE = "Please use /censusdate to set today's date for more more accurate data. Format /censusdate MM-DD-YYYY, example, /censusdate 12-25-2004";
49 | CENSUSPlus_NOCENSUS = "A Census is not currently in progress";
50 | CENSUSPlus_FINISHED = "Finished Taking data. Found %s new characters and saw %s. Took %s.";
51 | CENSUSPlus_TOOMANY = "WARNING: Too many characters matching: %s";
52 | CENSUSPlus_WAITING = "Waiting to send who request...";
53 | CENSUSPlus_SENDING = "Sending /who %s";
54 | CENSUSPlus_PROCESSING = "Processing %s characters.";
55 |
56 | CENSUSPlus_REALMNAME = "Realm: %s";
57 | CENSUSPlus_REALMUNKNOWN = "Realm: Unknown";
58 | CENSUSPlus_FACTION = "Faction: %s";
59 | CENSUSPlus_FACTIONUNKNOWN = "Faction: Unknown";
60 | CENSUSPlus_LOCALE = "Locale : %s";
61 | CENSUSPlus_LOCALEUNKNOWN = "Locale : Unknown";
62 | CENSUSPlus_TOTALCHAR = "Total Characters: %d";
63 | CENSUSPlus_TOTALCHAR_0 = "Total Characters: 0";
64 | CENSUSPlus_TOTALCHARXP = "Total Character XP: %d";
65 | CENSUSPlus_TOTALCHARXP_0 = "Total Character XP: 0";
66 | CENSUSPlus_AUTOCLOSEWHO = "Automatically Close Who";
67 | CENSUSPlus_SHOWMINI = "Show Mini On Start";
68 | CENSUSPlus_UNGUILDED = "(Unguilded)";
69 | CENSUSPlus_TAKE = "Take";
70 | CENSUSPlus_TOPGUILD = "Top Guilds By XP";
71 | CENSUSPlus_RACE = "Races";
72 | CENSUSPlus_CLASS = "Classes";
73 | CENSUSPlus_LEVEL = "Levels";
74 | CENSUSPlus_PURGE = "Purge";
75 | CENSUSPlus_MAXXED = "MAXXED!";
76 |
77 | CENSUSPlus_MAXIMIZE = "Maximize the CensusPlus Window";
78 | CENSUSPlus_MINIMIZE = "Minimize the CensusPlus Window";
79 | CENSUSPlus_BUTTON_MINIMIZE = "Minimize";
80 |
81 | CENSUSPlus_DRUID = "Druid";
82 | CENSUSPlus_HUNTER = "Hunter";
83 | CENSUSPlus_MAGE = "Mage";
84 | CENSUSPlus_PRIEST = "Priest";
85 | CENSUSPlus_ROGUE = "Rogue";
86 | CENSUSPlus_WARLOCK = "Warlock";
87 | CENSUSPlus_WARRIOR = "Warrior";
88 | CENSUSPlus_SHAMAN = "Shaman";
89 | CENSUSPlus_PALADIN = "Paladin";
90 |
91 | CENSUSPlus_DWARF = "Dwarf";
92 | CENSUSPlus_GNOME = "Gnome";
93 | CENSUSPlus_HUMAN = "Human";
94 | CENSUSPlus_NIGHTELF = "Night Elf";
95 | CENSUSPlus_ORC = "Orc";
96 | CENSUSPlus_TAUREN = "Tauren";
97 | CENSUSPlus_TROLL = "Troll";
98 | CENSUSPlus_UNDEAD = "Undead";
99 | CENSUSPlus_HIGHELF = "High Elf";
100 | CENSUSPlus_GOBLIN = "Goblin";
101 |
102 | CENSUSPlus_WarsongGulch = "Warsong Gulch";
103 | CENSUSPlus_AlteracValley = "Alterac Valley";
104 | CENSUSPlus_ArathiBasin = "Arathi Basin";
105 |
106 |
107 | CENSUSPLUS_US_LOCALE = "Select if you play on US Servers";
108 | CENSUSPLUS_EU_LOCALE = "Select if you play on EURO Servers";
109 | CENSUSPLUS_LOCALE_SELECT = "Select if you play on US or EURO servers";
110 |
111 | CENSUSPlus_BUTTON_OPTIONS = "Options";
112 | CENSUSPlus_OPTIONS_HEADER = "Census+ Turtle Options";
113 | CENSUSPlus_ISINBG = "You are currently in a Battleground so a Census cannot be taken";
114 | CENSUS_OPTIONS_BUTPOS = "Button Position";
115 | CENSUS_OPTIONS_BUTSHOW = "Show Minimap Button";
116 | CENSUS_OPTIONS_AUTOCENSUS = "Auto-Census";
117 | CENSUS_OPTIONS_THISPROFILE = "Collect Profile for this Char";
118 | CENSUS_OPTIONS_AUTOSTART = "Auto-Start";
119 | CENSUS_OPTIONS_VERBOSE = "Verbose";
120 | CENSUS_OPTIONS_SOUND_ON_COMPLETE = "Play Sound When Done";
121 |
122 | CENSUSPlus_AUTOSTART_TOOLTIP = "Enable Census+ Turtle to start automatically";
123 | CENSUSPlus_VERBOSE_TOOLTIP = "Deselect to stop the spam!";
124 | CENSUSPlus_AUTOCENSUS_TOOLTIP = "Enable Census+ Turtle to run automatically while playing";
125 | CENSUSPlus_THISPROFILE_TOOLTIP = "Collect profile data for this character to upload to WarcraftRealms.com";
126 |
127 | CENSUSPlus_BUTTON_CHARACTERS = "Show Chars";
128 | CENSUSPlus_Characters = "Characters";
129 |
130 | CENSUS_BUTTON_TOOLTIP = "Open CensusPlus Turtle";
131 |
132 | CENSUS_LEVEL_NO_GUILD = "(.+): Level (%d+) (.+) (.+) - (.+)";
133 | CENSUS_LEVEL_W_GUILD = "(.+): Level (%d+) (.+) (.+) <(.+)> - (.+)";
134 | CENSUS_MULT_PLAYERS = "(%d+) players total";
135 | CENSUS_SING_PLAYER = "(%d+) player total";
136 |
137 | CENSUSPlus_CANCEL = "Cancel";
138 |
139 | CENSUSPlus_OVERRIDE = "Census in progress, submitting override";
140 | CENSUSPlus_OVERRIDE_COMPLETE = "Override complete resuming census";
141 | CENSUSPlus_OVERRIDE_COMPLETE_BUT_PAUSED = "Override complete, but census has been paused";
142 |
143 | CENSUSPlus_PURGE_LOCAL_CONFIRM = "Are you sure you wish to PURGE your local database?";
144 | CENSUSPlus_OVERRIDE_COMPLET_PAUSED = "Override complete but Census has been paused, Click to Continue";
145 |
146 | CENSUSPlus_YES = "Yes";
147 | CENSUSPlus_NO = "No";
148 | CENSUSPlus_CONTINUE = "Continue";
149 |
150 | if ( GetLocale() == "frFR" ) then
151 | -- Traduit par Juki
152 |
153 | CENSUSPlus_BUTTON_TEXT = "Census+";
154 | CENSUSPlus_BUTTON_SUBTEXT = "Stats serveur";
155 | CENSUSPlus_BUTTON_TIP = "Cliquez ici pour montrer ou masquer Census+.";
156 | CENSUSPlus_HELP = " Utilisez /censusplus pour ouvrir et fermer Census+.";
157 |
158 | CENSUSPlus_MSG1 = " Chargée - Tapez /censusplus ou /census+ pour ouvrir la fenêtre principale";
159 | CENSUSPlus_MSG2 = "Utilisez /censusdate pour configurer la date du jour dans le format MM-DD-YYYY, ie.12-25-2004";
160 |
161 | CENSUSPlus_UPLOAD = "";
162 | CENSUSPlus_UPLOAD2 = "";
163 | CENSUSPlus_SETTINGDATE = "Mise à jour de la date => ";
164 | CENSUSPlus_PAUSE = "Pause";
165 | CENSUSPlus_UNPAUSE = "Reprendre";
166 | CENSUSPlus_STOP = "Stop";
167 |
168 | CENSUSPlus_TAKECENSUS = "Faire un recensement des joueurs \nactuellement en ligne sur ce serveur \net dans cette faction";
169 | CENSUSPlus_PURGEDATABASE = "Supprime la base de donnée concernant \nle serveur et la faction en cours.";
170 | CENSUSPlus_PAUSECENSUS = "Mettre en pause le recensement en cours";
171 | CENSUSPlus_STOPCENSUS = "Arrêter le recensement en cours"
172 |
173 | CENSUSPlus_PURGEMSG = "Base de donnée supprimée.";
174 | CENSUSPlus_ISINPROGRESS = "Un recensement est en cours, veuillez patienter";
175 | CENSUSPlus_TAKINGONLINE = "Recensement des joueurs en cours ...";
176 | CENSUSPlus_PLZUPDATEDATE = "SVP utilisez /censusdate pour configurer la date du jour pour des données plus précises. Format /censusdate MM-DD-YYYY, exemple, /censusdate 12-25-2004";
177 | CENSUSPlus_NOCENSUS = "Aucun recensement en cours";
178 | CENSUSPlus_FINISHED = "Recensement terminé. %s nouveaux personnages et %s mis à jour.";
179 | CENSUSPlus_TOOMANY = "ERREUR: Trop de joueurs correspondants à : %s";
180 | CENSUSPlus_WAITING = "En attente de lancement de requête /who ...";
181 | CENSUSPlus_SENDING = "Envoi de requête /who %s";
182 | CENSUSPlus_PROCESSING = "Analyse de %s personnages.";
183 |
184 | CENSUSPlus_REALMNAME = "Serveur : %s";
185 | CENSUSPlus_REALMUNKNOWN = "Serveur : Inconnu";
186 | CENSUSPlus_FACTION = "Faction : %s";
187 | CENSUSPlus_FACTIONUNKNOWN = "Faction : Inconnu";
188 | CENSUSPlus_TOTALCHAR = "Nombre de personnages : %d";
189 | CENSUSPlus_TOTALCHAR_0 = "Nombre de personnages : 0";
190 | CENSUSPlus_TOTALCHARXP = "Nombre d'xp total : %d";
191 | CENSUSPlus_TOTALCHARXP_0 = "Nombre d'xp total : 0";
192 | CENSUSPlus_AUTOCLOSEWHO = "Fermeture auto du /Who";
193 | CENSUSPlus_SHOWMINI = "Montrer Mini au démarrage";
194 | CENSUSPlus_UNGUILDED = "(Sans Guilde)";
195 | CENSUSPlus_TAKE = "Recenser";
196 | CENSUSPlus_TOPGUILD = "Meilleures guildes par XP";
197 | CENSUSPlus_RACE = "Races";
198 | CENSUSPlus_CLASS = "Classes";
199 | CENSUSPlus_LEVEL = "Niveaux";
200 | CENSUSPlus_PURGE = "Mettre à Zero";
201 |
202 | CENSUSPlus_MAXIMIZE = "Agrandir la fenêtre CensusPlus";
203 | CENSUSPlus_MINIMIZE = "Réduire la fenêtre CensusPlus";
204 | CENSUSPlus_BUTTON_MINIMIZE = "Réduire";
205 |
206 | CENSUSPlus_HORDE = "Horde";
207 | CENSUSPlus_ALLIANCE = "Alliance";
208 |
209 | CENSUSPlus_DRUID = "Druide";
210 | CENSUSPlus_HUNTER = "Chasseur";
211 | CENSUSPlus_MAGE = "Mage";
212 | CENSUSPlus_PRIEST = "Prêtre";
213 | CENSUSPlus_ROGUE = "Voleur";
214 | CENSUSPlus_WARLOCK = "Démoniste";
215 | CENSUSPlus_WARRIOR = "Guerrier";
216 | CENSUSPlus_SHAMAN = "Chaman";
217 | CENSUSPlus_PALADIN = "Paladin";
218 |
219 | CENSUSPlus_DWARF = "Nain";
220 | CENSUSPlus_GNOME = "Gnome";
221 | CENSUSPlus_HUMAN = "Humain";
222 | CENSUSPlus_NIGHTELF = "Elfe de la nuit";
223 | CENSUSPlus_ORC = "Orc";
224 | CENSUSPlus_TAUREN = "Tauren";
225 | CENSUSPlus_TROLL = "Troll";
226 | CENSUSPlus_UNDEAD = "Mort-vivant";
227 |
228 | CENSUSPlus_WarsongGulch = "Goulet des Warsong";
229 | CENSUSPlus_AlteracValley = "Vallée d'Alterac";
230 | CENSUSPlus_ArathiBasin = "Bassin d'Arathi";
231 |
232 | CENSUSPLUS_US_LOCALE = "Choisissez si vous jouez sur un serveur US";
233 | CENSUSPLUS_EU_LOCALE = "Choisissez si vous jouez sur un serveur EURO";
234 | CENSUSPLUS_LOCALE_SELECT = "Choisissez la localité de votre serveur";
235 |
236 |
237 | elseif ( GetLocale() == "deDE" ) then
238 | -- Thanks to MadMax-X for this German translation
239 | CENSUSPlus_BUTTON_TEXT = "Census+";
240 | CENSUSPlus_BUTTON_SUBTEXT = "Realm Census";
241 | CENSUSPlus_BUTTON_TIP = "Hier klicken um Census+ anzuzeigen oder zu verstecken.";
242 | CENSUSPlus_HELP = " Benutze /censusplus um die Census+ Oberfläche zu öffnen.";
243 |
244 | CENSUSPlus_MSG1 = " Geladen - mit /censusplus or /census+ wird das Hauptfenster geöffnet";
245 | CENSUSPlus_MSG2 = "Mit /censusdate kann das aktuelle Datum im Format MM-DD-YYYY gesetzt werden, z.B. 12-25-2004";
246 |
247 | CENSUSPlus_UPLOAD = "Lade deine CensusPlus Daten bei www.WarcraftRealms.com hoch!";
248 | CENSUSPlus_SETTINGDATE = "Datum wird gesetzt => ";
249 | CENSUSPlus_PAUSE = "Pause";
250 | CENSUSPlus_UNPAUSE = "Weiter";
251 | CENSUSPlus_STOP = "Stop";
252 |
253 | CENSUSPlus_TAKECENSUS = "Zähle alle aktiven \nSpieler deiner Fraktion \nauf diesem Server.";
254 | CENSUSPlus_PURGEDATABASE = "Lösche die Datenbank \nfür diesen Server \nund diese Fraktion.";
255 | CENSUSPlus_PAUSECENSUS = "Pausiere die laufende Zählung";
256 | CENSUSPlus_STOPCENSUS = "Stoppe die laufende Zählung";
257 |
258 | CENSUSPlus_PURGEMSG = "Charakterdatenbank für Server %s und Fraktion %s gelöscht.";
259 | CENSUSPlus_ISINPROGRESS = "Es läuft schon eine Zählung, versuch es später nochmal";
260 | CENSUSPlus_TAKINGONLINE = "Zählung der gerade aktiven Charaktere...";
261 | CENSUSPlus_PLZUPDATEDATE = "Bitte benutze /censusdate um das aktuelle Datum zu setzen, damit die Auswertung genauer wird. (Format: /censusdate MM-DD-YYYY, z.B. /censusdate 12-25-2004";
262 | CENSUSPlus_NOCENSUS = "Es läuft gerade keine Zählung";
263 | CENSUSPlus_FINISHED = "Zählung beendet. %s neue Charactere gefunden und %s aktualisiert.";
264 | CENSUSPlus_TOOMANY = "FEHLER: Zu viele passende Charaktere: %s";
265 | CENSUSPlus_WAITING = "Warte, um /who zu senden...";
266 | CENSUSPlus_SENDING = "Sende /who %s";
267 | CENSUSPlus_PROCESSING = "Verarbeite %s Charaktere.";
268 |
269 | CENSUSPlus_REALMNAME = "Server: %s";
270 | CENSUSPlus_REALMUNKNOWN = "Server: Unbekannt";
271 | CENSUSPlus_FACTION = "Fraktion: %s";
272 | CENSUSPlus_FACTIONUNKNOWN = "Fraktion: Unbekannt";
273 | CENSUSPlus_TOTALCHAR = "Gesamte Charaktere: %d";
274 | CENSUSPlus_TOTALCHAR_0 = "Gesamte Charaktere: 0";
275 | CENSUSPlus_TOTALCHARXP = "Gesamte Charakter-XP: %d";
276 | CENSUSPlus_TOTALCHARXP_0 = "Gesamte Charakter-XP: 0";
277 | CENSUSPlus_AUTOCLOSEWHO = "Schließe Who automatisch";
278 | CENSUSPlus_SHOWMINI = "Mini-Button beim Start anzeigen";
279 | CENSUSPlus_UNGUILDED = "(Gildenlos)";
280 | CENSUSPlus_TAKE = "Zählen";
281 | CENSUSPlus_TOPGUILD = "Top Gilden nach XP";
282 | CENSUSPlus_RACE = "Rassen";
283 | CENSUSPlus_CLASS = "Klassen";
284 | CENSUSPlus_LEVEL = "Level";
285 | CENSUSPlus_PURGE = "Löschen";
286 |
287 | CENSUSPlus_MAXIMIZE = "Maximiere das CensusPlus Fenster";
288 | CENSUSPlus_MINIMIZE = "Minimiere das CensusPlus Fenster";
289 | CENSUSPlus_BUTTON_MINIMIZE = "Minimieren";
290 |
291 | CENSUSPlus_HORDE = "Horde";
292 | CENSUSPlus_ALLIANCE = "Alliance";
293 |
294 | CENSUSPlus_DRUID = "Druide";
295 | CENSUSPlus_HUNTER = "Jäger";
296 | CENSUSPlus_MAGE = "Magier";
297 | CENSUSPlus_PRIEST = "Priester";
298 | CENSUSPlus_ROGUE = "Schurke";
299 | CENSUSPlus_WARLOCK = "Hexenmeister";
300 | CENSUSPlus_WARRIOR = "Krieger";
301 | CENSUSPlus_SHAMAN = "Schamane";
302 | CENSUSPlus_PALADIN = "Paladin";
303 |
304 | CENSUSPlus_DWARF = "Zwerg";
305 | CENSUSPlus_GNOME = "Gnom";
306 | CENSUSPlus_HUMAN = "Mensch";
307 | CENSUSPlus_NIGHTELF = "Nachtelf";
308 | CENSUSPlus_ORC = "Orc";
309 | CENSUSPlus_TAUREN = "Tauren";
310 | CENSUSPlus_TROLL = "Troll";
311 | CENSUSPlus_UNDEAD = "Untoter";
312 |
313 | CENSUSPlus_WarsongGulch = "Warsongschlucht";
314 | CENSUSPlus_AlteracValley = "Alteractal";
315 | CENSUSPlus_ArathiBasin = "Arathibecken";
316 |
317 | CENSUSPLUS_US_LOCALE= "Auswählen, wenn du auf US-Servern spielst";
318 | CENSUSPLUS_EU_LOCALE= "Auswählen, wenn du auf EURO-Servern spielst";
319 | CENSUSPLUS_LOCALE_SELECT= "Wähle, ob du auf US oder EURO-Servern spielst";
320 |
321 | CENSUSPlus_BUTTON_OPTIONS = "Optionen";
322 | CENSUSPlus_OPTIONS_HEADER = "Census+ Optionen";
323 | CENSUSPlus_ISINBG = "Du befindest dich momentan auf einem Schlachtfeld und daher kann Census+ keine Abfrage duchführen.";
324 | CENSUS_OPTIONS_BUTPOS = "Button Position";
325 | CENSUS_OPTIONS_BUTSHOW = "Minimap-Button";
326 | CENSUS_OPTIONS_AUTOSTART = "Autom. Starten";
327 | CENSUS_OPTIONS_VERBOSE = "Verbose";
328 | CENSUS_OPTIONS_AUTOCENSUS = "Autom. Zählen";
329 | CENSUS_OPTIONS_THISPROFILE = "Profil nur diesen Charakter";
330 | CENSUS_OPTIONS_EXIT = "Schließen";
331 |
332 | CENSUS_BUTTON_TOOLTIP = "CensusPlus öffnen";
333 |
334 | CENSUS_LEVEL_NO_GUILD = "(.+): Stufe (%d+) (.+) (.+) - (.+)";
335 | CENSUS_LEVEL_W_GUILD = "(.+): Stufe (%d+) (.+) (.+) <(.+)> - (.+)";
336 | CENSUS_MULT_PLAYERS = "(%d+) Spieler gesamt";
337 | CENSUS_SING_PLAYER = "(%d+) Spieler gesamt";
338 |
339 | elseif ( GetLocale() == "esES" ) then
340 | -- Thanks to NeKRoMaNT EU-Zul'jin < contacto@nekromant.com> for the Spanish Translation
341 | CENSUSPlus_BUTTON_TEXT = "Census+";
342 | CENSUSPlus_BUTTON_SUBTEXT = "Estadísticas Servidor";
343 | CENSUSPlus_BUTTON_TIP = "Pulsa aquí para mostrar u ocultar Census+.";
344 | CENSUSPlus_HELP = " Usa /censusplus para abrir y cerrar la interfaz Census+.";
345 |
346 | CENSUSPlus_MSG1 = " operativo - Escribe /censusplus o /census+ para abrir la ventana principal";
347 |
348 | CENSUSPlus_UPLOAD = "¡Asegúrate de enviar tus datos a www.WarcraftRealms.com!";
349 | CENSUSPlus_PAUSE = "Pausa";
350 | CENSUSPlus_UNPAUSE = "Continuar";
351 | CENSUSPlus_STOP = "Detener";
352 | CENSUSPlus_PRUNE = "Resetear";
353 |
354 | CENSUSPlus_TAKECENSUS = "Realizar un censo de jugadores \nconectados en este servidor \ny en esta facción";
355 | CENSUSPlus_PURGEDATABASE = "Purgar la base de datos para este servidor y facción";
356 | CENSUSPlus_PAUSECENSUS = "Pausar el censo actual";
357 | CENSUSPlus_UNPAUSECENSUS = "Continuar el censo actual";
358 | CENSUSPlus_STOPCENSUS = "Detener el censo actual";
359 | CENSUSPlus_PRUNECENSUS = "Optimiza la base de datos borrando personajes sin censar en los últimos 30 días";
360 |
361 | CENSUSPlus_PURGEMSG = "Base de datos de personajes purgada.";
362 | CENSUSPlus_ISINPROGRESS = "Censo en progreso, vuelve a intentarlo mas tarde";
363 | CENSUSPlus_TAKINGONLINE = "Realizando censo de personajes conectados...";
364 | CENSUSPlus_NOCENSUS = "No hay ningún censo activo";
365 | CENSUSPlus_FINISHED = "Se ha terminado de recoger datos. Encontrados %s nuevos personajes y %s actualizados. Duración %s.";
366 | CENSUSPlus_TOOMANY = "AVISO: Demasiadas coincidencias: %s";
367 | CENSUSPlus_WAITING = "Esperando a enviar petición /quien...";
368 | CENSUSPlus_SENDING = "Enviando /quien %s";
369 | CENSUSPlus_PROCESSING = "Procesando %s personajes.";
370 |
371 | CENSUSPlus_REALMNAME = "Servidor: %s";
372 | CENSUSPlus_REALMUNKNOWN = "ServidorReino: Desconocido";
373 | CENSUSPlus_FACTION = "Facción: %s";
374 | CENSUSPlus_FACTIONUNKNOWN = "Facción: Desconocida";
375 | CENSUSPlus_LOCALE = "Región : %s";
376 | CENSUSPlus_LOCALEUNKNOWN = "Región : Desconocida";
377 | CENSUSPlus_TOTALCHAR = "Personajes Totales: %d";
378 | CENSUSPlus_TOTALCHAR_0 = "Personajes Totales: 0";
379 | CENSUSPlus_TOTALCHARXP = "Total EXP Personajes: %d";
380 | CENSUSPlus_TOTALCHARXP_0 = "Total EXP Personajes: 0";
381 | CENSUSPlus_AUTOCLOSEWHO = "Cerrar Quien Automático";
382 | CENSUSPlus_SHOWMINI = "Minimizado al inicio";
383 | CENSUSPlus_UNGUILDED = "(Sin Hermandad)";
384 | CENSUSPlus_TAKE = "Comenzar";
385 | CENSUSPlus_TOPGUILD = "Clanes por Experiencia";
386 | CENSUSPlus_RACE = "Razas";
387 | CENSUSPlus_CLASS = "Clases";
388 | CENSUSPlus_LEVEL = "Niveles";
389 | CENSUSPlus_PURGE = "Purgar";
390 | CENSUSPlus_MAXXED = "MAXXED!";
391 |
392 | CENSUSPlus_MAXIMIZE = "Maximizar la ventana de CensusPlus";
393 | CENSUSPlus_MINIMIZE = "Minimizar la ventana de CensusPlus";
394 | CENSUSPlus_BUTTON_MINIMIZE = "Minimizar";
395 |
396 | CENSUSPlus_HORDE = "Horde";
397 | CENSUSPlus_ALLIANCE = "Alliance";
398 |
399 | CENSUSPlus_DRUID = "Druida";
400 | CENSUSPlus_HUNTER = "Cazador";
401 | CENSUSPlus_MAGE = "Mago";
402 | CENSUSPlus_PRIEST = "Sacerdote";
403 | CENSUSPlus_ROGUE = "Pícaro";
404 | CENSUSPlus_WARLOCK = "Brujo";
405 | CENSUSPlus_WARRIOR = "Guerrero";
406 | CENSUSPlus_SHAMAN = "Chamán";
407 | CENSUSPlus_PALADIN = "Paladín";
408 |
409 | CENSUSPlus_DWARF = "Enano";
410 | CENSUSPlus_GNOME = "Gnomo";
411 | CENSUSPlus_HUMAN = "Humano";
412 | CENSUSPlus_NIGHTELF = "Elfo de la noche";
413 | CENSUSPlus_ORC = "Orco";
414 | CENSUSPlus_TAUREN = "Tauren";
415 | CENSUSPlus_TROLL = "Trol";
416 | CENSUSPlus_UNDEAD = "No-muerto";
417 |
418 | CENSUSPlus_WarsongGulch = "Garganta Grito de Guerra";
419 | CENSUSPlus_AlteracValley = "Valle de Alterac";
420 | CENSUSPlus_ArathiBasin = "Cuenca de Arathi";
421 |
422 | CENSUSPlus_BUTTON_OPTIONS = "Opciones";
423 | CENSUSPlus_OPTIONS_HEADER = "Opciones Census+";
424 | CENSUS_OPTIONS_BUTPOS = "Posición de botón";
425 | CENSUS_OPTIONS_BUTSHOW = "Mostrar botón";
426 |
427 | CENSUSPlus_BUTTON_CHARACTERS = "Mostrar personajes";
428 | CENSUSPlus_Characters = "Personajes";
429 |
430 | CENSUS_BUTTON_TOOLTIP = "Abrir CensusPlus";
431 |
432 | CENSUS_LEVEL_NO_GUILD = "(.+): Nivel (%d+) (.+) (.+) - (.+)";
433 | CENSUS_LEVEL_W_GUILD = "(.+): Nivel (%d+) (.+) (.+) <(.+)> - (.+)";
434 | CENSUS_MULT_PLAYERS = "(%d+) jugadores en total";
435 | CENSUS_SING_PLAYER = "(%d+) jugador en total";
436 |
437 | CENSUSPlus_CANCEL = "Cancelar";
438 | end
439 |
440 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | CensusPlus - by Rollie of Bloodscalp aka Cooper Sellers, cont. laytya (2017) for Vanilla
2 |
3 | WEBSITE
4 |
5 | http://www.warcraftrealms.com/
6 |
7 | VERSION
8 | 3.6.0 - 02/03/2017
9 | - added colors
10 | - added numbers
11 | - fixed work w/ Elysium's servers
12 | - added character sorting
13 |
14 | 3.5.1 - 10/07/2006 - Update
15 | - Finally put in place a way to do a normal /who while census is running
16 | - If your /who returns more than 3 results, the friends frame window
17 | will be displayed and the census will be paused
18 | - Added an audible sound that can be played with the census is complete. In addition
19 | an option has been added to the options panel to disable this feature.
20 | - Moved the Verbose option to be a character specific option
21 | - Added Spanish Translation, props to Nekormant of EU-Zul'jin for this translation
22 |
23 | 3.5 - 08/29/2006 - Update
24 | - Updated TOC for patch 1.12
25 | - New commands:
26 | /census take - allows you to start a census via command line
27 | /census stop - allows you to stop a census via command line
28 | - Added a right click menu to the mini-map button to allow you to do common
29 | census functions like Take, Stop, and Pause
30 | - Added a player list feature that will show you the list of players for currently
31 | selected filters in the display. This list is capped at 1000 players.
32 | - Modified the locale detection to hopefully clear up locale issues
33 | - Added battleground wait time collection information which will soon start being reflected
34 | on the site
35 | - Removed the restriction on taking census snapshots while in battlegrounds
36 | - Made efforts to removing the lag created when a census finishes. You will likely still
37 | see the lag if you have the Census window open when a census completes, but if it
38 | is closed, there should be no noticable lag.
39 |
40 |
41 | 3.4 - 07/03/2006 - Update
42 | - Updated TOC for patch 1.11
43 | - New commands:
44 | /census timer ## - will set the timer for the autocensus function (in minutes)
45 | - Added a confirmation box when you hit the Purge button
46 |
47 |
48 | 3.3 - 03/30/2006 - Update
49 | - Updated TOC for patch 1.10
50 | - Added a couple of new commands:
51 | /census who XXXX - will return any local data you have where a character name or guild
52 | matches (partially or fully) the given term
53 | /census who unguilded ## - where ## is a level, will return all unguilded characters
54 | of that level
55 | - Attempt at removing the extra 3 or less spam for German clients
56 |
57 | 3.1 - 1/03/2006 - Update
58 | - Many fixes pertaining to profile data gathering
59 | - Added method to determine regional servers (EU vs US)
60 | - Added fixes for searches and battlegrounds
61 | - Added pruning options, can now do the following:
62 | /census prune x - prunes data older than X days
63 | /census serverprune - will prune all data other than the current server
64 | - Several other minor fixes and tweaks
65 |
66 | 2.0 - 4/23/2005 - Update
67 | -Friends panel will no longer even attempt to open if the auto-close who is selected. This
68 | allows any other panels to be open during a census and they will not close or change your
69 | view.
70 | -Mini-Census button is now moveable. You'll have to click just around the button to move it
71 | -Added PVP Honor tracking. This will be viewable on the site soon.
72 | -Modified the time tracking, cool new stats on the site to follow soon.
73 | -Added in some regional server detection. Please note if you get any error messages detailing
74 | that the Mod thinks your locale should be set differently and let me know about them.
75 | -Auto-census will no longer start as soon as you log in and will instead wait 5 minutes.
76 |
77 | 1.8 - 3/23/2005 - Update
78 | -Silenced the Friends panel clicking when opening and closing during a census
79 | -Implemented the new time() and date() APIs
80 | -Removed /censusdate
81 | -Added option to take auto-census
82 | -Added option window
83 |
84 | 1.4 - 2/4/2005 - French and German localization
85 | 1.3 - - Small bug fix for error in 1.2
86 |
87 | 1.2 - 1/19/2005 - Update
88 | -Fixed a bug with a current census that is paused becoming unpaused when you close certain windows.
89 | -Added a /censusverbose command that will toggle the CensusPlus messages on/off.
90 | -Modified the way a census is taken. Instead of the divide and conquer style used that started a census
91 | with 1-60 and going from there, it will now start in 5 level increments and divide if necessary.
92 | -Added guild support. The mod will now capture guild data when viewed on the guild panel. This data
93 | is used to provide more comprehensive data on the site and is available through the guild exports.
94 | -Added a tracking feature that will allow tracking of the number of characters seen during a census.
95 | This data is displayed on the Activity Page
96 |
97 | 1.0 - 1/10/2005
98 |
99 | INTRODUCTION
100 |
101 | CensusPlus came about due to requested changes and desired options
102 | not present in the original Census UI Mod by Ian Pieragostini.
103 |
104 | I spoke with Ian and he has lost interest in World of Warcraft modding
105 | and encouraged me to modify the Census Mod to my liking. Thus I
106 | have done so.
107 |
108 | The original Census UI Mod basically took snapshots of your current
109 | realm and faction. You could keep this data and combine it with
110 | other snapshots to provide greater statistical analysis.
111 |
112 | CensusPlus offers many features above and beyond what the original Census
113 | UI mod provided. Here follows a list of added features:
114 |
115 | - Abilty to minimize the main census window
116 | which provides you the abilty to actually play while a census
117 | is being taken
118 | - Ability for the Friends panel not to be shown after
119 | each /who is sent to the server. This keeps the UI open from
120 | the main Census window
121 | - Ability to pause and unpause the current census
122 | - Ability to stop the current census in progress
123 | - Added a date information which allows the user to place a
124 | date timestamp on all characters that are found during census's
125 | taken that day -- This helps facilitate greater accuracy in
126 | results when census data is uploaded to www.warcraftrealms.com
127 | - Data on number of characters seen during the census snapshot.
128 | - Collection of Honor points data.
129 |
130 | USAGE
131 |
132 | Unzip the files into your %World of Warcraft/Interface/AddOns directory. It
133 | should create a CensusPlus directory with the installed files.
134 |
135 | If you have Cosmos installed, CensusPlus will register itself with Cosmos
136 | and you can invoke the Census window by selecting the CensusPlus option from
137 | the Census menu.
138 |
139 | You can also invoke the CensusPlus window by typing /censusplus or /census+
140 |
141 | You can select to not open the Friends panel when a /who is sent.
142 |
143 | You can select to automatically display the Mini-Census button which must be
144 | visible in order for a Census to be taken while the main Census window is
145 | minimized.
146 |
147 | By selecting the Take button from the main census panel, you will initiate a
148 | Census snapshot. Depending on the population of your realm and faction, this could
149 | take several minutes.
150 |
151 | Clicking the Purge button will purge all your collected data from your local Census
152 | database.
153 |
154 | Clicking the Stop button will stop the current census if one is in progress.
155 |
156 | Clicking the Pause button will pause the current census if one is in progress.
157 |
158 | If you so choose, you can upload your collected census information to
159 | http://www.warcraftrealms.com Doing so will greatly help in the tracking
160 | of your realm and faction's population numbers and statistics.
161 |
162 |
163 |
164 |
165 |
166 |
--------------------------------------------------------------------------------