Mercurial > wow > emfor1
changeset 0:edfa01041183
Census+ Mod :
- TLJ guild search
- searchstart at Level 1 for community events
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CensusButton.lua Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,115 @@ +--[[ + CensusPlus for World of Warcraft(tm). + + Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com + + License: + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program(see GLP.txt); if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]] + + +local init = false; + +function CensusButton_OnClick() + CensusPlus_Toggle(); +end + +function CensusButton_Init() + if(CensusPlus_Database["Info"]["CensusButtonShown"] == 1 ) then + CensusButtonFrame:Show(); + else + CensusButtonFrame:Hide(); + end + + init = true; +end + +function CensusButton_Toggle() + if(CensusButtonFrame:IsVisible()) then + CensusButtonFrame:Hide(); + CensusPlus_Database["Info"]["CensusButtonShown"] = false; + else + CensusButtonFrame:Show(); + CensusPlus_Database["Info"]["CensusButtonShown"] = true; + end +end + +function CensusButton_UpdatePosition() + CensusButtonFrame:SetPoint( + "TOPLEFT", + "Minimap", + "TOPLEFT", + 54 - (78 * cos(CensusPlus_Database["Info"]["CensusButtonPosition"])), + (78 * sin(CensusPlus_Database["Info"]["CensusButtonPosition"])) - 55 + ); +end + +function CensusButton_OnUpdate() + if( init ) then + CensusPlus_OnUpdate(); + end +end + +function CensusPlusButton_OnClick( arg1, arg2 ) + if ( arg1 == "LeftButton" ) then + CensusButton_OnClick(); + else + ToggleDropDownMenu( 1, nil, CP_ButtonDropDown, "CensusButtonFrame", 20, 20 ); + end + +end + +function CensusPlus_ButtonDropDown_Initialize() + + local info; + + if (g_IsCensusPlusInProgress == true) then + if( g_CensusPlusManuallyPaused == true ) then + info = { + text = CENSUSPlus_UNPAUSE; + func = CensusPlus_Take_OnClick; + }; + else + info = { + text = CENSUSPlus_PAUSE; + func = CensusPlus_Take_OnClick; + }; + end + else + info = { + text = CENSUSPlus_TAKE; + func = CensusPlus_Take_OnClick; + }; + end + UIDropDownMenu_AddButton(info, 1); + + info = { + text = CENSUSPlus_STOP; + func = CensusPlus_StopCensus; + }; + UIDropDownMenu_AddButton(info, 1); + + info = { + text = CENSUSPlus_CANCEL; + func = CensusPlus_CloseDropDown; + }; + UIDropDownMenu_AddButton(info, 1); + +end + + +function CensusPlus_CloseDropDown() + CloseDropDownMenus(); +end \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CensusButton.xml Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,93 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd"> + <Script file="CensusButton.lua"/> + <Frame name="CensusButtonFrame" parent="UIParent" hidden="true" enableMouse="true" toplevel="true" movable="true"> + <Size> + <AbsDimension x="32" y="32"/> + </Size> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="Minimap" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="-10" y="0"/> + </Offset> + </Anchor> + </Anchors> + <Frames> + <Button name="CensusButton"> + <Size> + <AbsDimension x="32" y="32"/> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="0" y="0"/> + </Offset> + </Anchor> + </Anchors> + <Frames> + <Frame name="CP_ButtonDropDown" inherits="UIDropDownMenuTemplate" id="1" hidden="true"> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="-15" y="20"/> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnLoad> + UIDropDownMenu_Initialize(CP_ButtonDropDown, CensusPlus_ButtonDropDown_Initialize, "MENU" ); + </OnLoad> + </Scripts> + </Frame> + </Frames> + <NormalTexture file="Interface\AddOns\CensusPlus\Skin\CensusButton-Up"/> + <PushedTexture file="Interface\AddOns\CensusPlus\Skin\CensusButton-Down"/> + <HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/> + <Scripts> + <OnLoad> + this:RegisterForClicks("LeftButtonUp", "RightButtonUp"); + </OnLoad> + <OnClick> + if( not CensusButtonFrame.isMoving ) then + CensusPlusButton_OnClick(arg1, arg2); + PlaySound("igMainMenuOptionCheckBoxOn"); + end + </OnClick> + <OnMouseUp> + if ( CensusButtonFrame.isMoving ) then + CensusButtonFrame:StopMovingOrSizing(); + CensusButtonFrame.isMoving = false; + end + </OnMouseUp> + <OnMouseDown> + if ( ( ( not CensusButtonFrame.isLocked ) or ( CensusButtonFrame.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then + CensusButtonFrame:StartMoving(); + CensusButtonFrame.isMoving = true; + end + </OnMouseDown> + <OnEnter> + GameTooltip_SetDefaultAnchor(GameTooltip, UIParent); +<!-- CENSUS_BUTTON_TOOLTIP="test"; --> + GameTooltip:SetText(CENSUS_BUTTON_TOOLTIP); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + </Frames> + <Scripts> + <OnLoad> + this:RegisterEvent("VARIABLES_LOADED"); + </OnLoad> + <OnEvent> + CensusButton_Init(); + </OnEvent> + <OnHide> + if ( this.isMoving ) then + this:StopMovingOrSizing(); + this.isMoving = false; + end + </OnHide> + </Scripts> + </Frame> +</Ui>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CensusPlayerList.lua Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,296 @@ +--[[ + CensusPlus for World of Warcraft(tm). + + Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com + + License: + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program(see GLP.txt); if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]] + + +------------------------------------------------------------------------------------ +-- +-- CensusPlus +-- A WoW UI customization by Cooper Sellers +-- +-- +------------------------------------------------------------------------------------ + +local g_PlayerList = {}; +local g_PlayerLookupTable = {}; +local CensusPlus_NumPlayerButtons = 20; +local g_MaxNumListed = 1000; + +function CensusPlus_ShowPlayerList() + CP_PlayerListWindow:Show(); +end + +function CensusPlus_PlayerListOnShow() + + debugprofilestart(); + + local guildKey = nil; + local raceKey = nil; + local classKey = nil; + local levelKey = nil; + + + -- + -- Clear our character list + -- + CensusPlus_ClearPlayerList(); + + -- + -- Get realm and faction + -- + local realmName = g_CensusPlusLocale .. GetCVar("realmName"); + if( realmName == nil ) then + return; + end + + local factionGroup = UnitFactionGroup("player"); + if( factionGroup == nil ) then + return; + end + + + -- + -- Has the user made any selections? + -- + if (g_GuildSelected ~= nil ) then + guildKey = g_GuildSelected; + end + if (g_RaceSelected > 0) then + local thisFactionRaces = CensusPlus_GetFactionRaces(factionGroup); + raceKey = thisFactionRaces[g_RaceSelected]; + end + if (g_ClassSelected > 0) then + local thisFactionClasses = CensusPlus_GetFactionClasses(factionGroup); + classKey = thisFactionClasses[g_ClassSelected]; + end + if (g_LevelSelected > 0 or g_LevelSelected < 0) then + levelKey = g_LevelSelected; + end + + debugprofilestart(); + + CensusPlus_ForAllCharacters( realmName, factionGroup, raceKey, classKey, guildKey, levelKey, CensusPlus_AddPlayerToList); + + if( CensusPlus_EnableProfiling ) then + CensusPlus_Msg( "PROFILE: Time to do calcs 1 " .. debugprofilestop() / 1000000000 ); + debugprofilestart(); + end + + + -- + -- Build our list + -- + CensusPlus_UpdatePlayerListButtons(); + + local totalCharactersText = format(CENSUSPlus_TOTALCHAR, table.getn( g_PlayerList ) ); + if( table.getn( g_PlayerList ) == g_MaxNumListed ) then + totalCharactersText = totalCharactersText .. " -- " .. CENSUSPlus_MAXXED; + end + + CensusPlayerListCount:SetText(totalCharactersText); + +end + +---------------------------------------------------------------------------------- +-- +-- Predicate function which can be used to compare two characters for sorting +-- +--------------------------------------------------------------------------------- +local function CharacterPredicate(lhs, rhs) + -- + -- nil references are always less than + -- + if (lhs == nil) then + if (rhs == nil) then + return false; + else + return true; + end + elseif (rhs == nil) then + return false; + end + -- + -- Sort by name + -- + if (lhs.m_name < rhs.m_name) then + return true; + elseif (rhs.m_name < lhs.m_name) then + return false; + end + + -- + -- Sort by level + -- + if (lhs.m_level < rhs.m_level) then + return true; + elseif (rhs.m_level < lhs.m_level) then + return false; + end + + -- + -- identical + -- + return false; +end + +local function CensusPlus_UpdatePlayerLookup( index, entry ) + -- + -- Have to update our table + -- + g_PlayerLookupTable[entry.m_name] = index; +end + + + +---------------------------------------------------------------------------------- +-- +-- Update the Player button contents +-- +--------------------------------------------------------------------------------- +function CensusPlus_UpdatePlayerListButtons() + -- + -- Sort the list + -- + local size = table.getn(g_PlayerList); + if (size) then + table.sort(g_PlayerList, CharacterPredicate); + + table.foreach(g_PlayerList, CensusPlus_UpdatePlayerLookup ); + + end + + -- + -- Determine where the scroll bar is + -- + local offset = FauxScrollFrame_GetOffset( CensusPlusPlayerListScrollFrame ); + -- + -- Walk through all the rows in the frame + -- + local i = 1; + while( i <= CensusPlus_NumPlayerButtons ) do + -- + -- Get the index to the ad displayed in this row + -- + local iPlayer = i + offset; + -- + -- Get the button on this row + -- + local button = getglobal("CensusPlusPlayerButton"..i); + -- + -- Is there a valid Player on this row? + -- + if (iPlayer <= size) then + local player = g_PlayerList[iPlayer]; + -- + -- Update the button text + -- + button:Show(); + local textField = "CensusPlusPlayerButton"..i.."Name"; + if ( player.m_name == nil or player.m_name == "") then + getglobal(textField):SetText( "None" ); + else + getglobal(textField):SetText( player.m_name ); + end + + local textField = "CensusPlusPlayerButton"..i.."Level"; + if ( player.m_level == nil or player.m_level == "") then + getglobal(textField):SetText( "n/a" ); + else + getglobal(textField):SetText( player.m_level ); + end + + local textField = "CensusPlusPlayerButton"..i.."Class"; + if ( player.m_guild == nil or player.m_guild == "") then + getglobal(textField):SetText( "Unguilded" ); + else + getglobal(textField):SetText( player.m_guild ); + end + + local textField = "CensusPlusPlayerButton"..i.."Seen"; + if ( player.m_seen == nil or player.m_seen == "") then + getglobal(textField):SetText( "UNK" ); + else + getglobal(textField):SetText( player.m_seen ); + end + else + -- + -- Hide the button + -- + button:Hide(); + end + -- + -- Next row + -- + i = i + 1; + end + -- + -- Update the scroll bar + -- + FauxScrollFrame_Update(CensusPlusPlayerListScrollFrame, size, CensusPlus_NumPlayerButtons, CensusPlus_GUILDBUTTONSIZEY); +end + +---------------------------------------------------------------------------------- +-- +-- Find a characters in the g_PlayerList array by name +-- +--------------------------------------------------------------------------------- +function CensusPlus_PlayerButton_OnClick() + local id = this:GetID(); + local offset = FauxScrollFrame_GetOffset( CensusPlusPlayerListScrollFrame ); + local newSelection = id + offset; + + local player = g_PlayerList[newSelection]; + FriendsFrame_ShowDropdown(player.m_name, 1); +end + +---------------------------------------------------------------------------------- +-- +-- Clear all the characters +-- +--------------------------------------------------------------------------------- +function CensusPlus_ClearPlayerList() + g_PlayerList = nil; + g_PlayerList = {}; + + g_PlayerLookupTable = nil; + g_PlayerLookupTable = {}; +end + +---------------------------------------------------------------------------------- +-- +-- Add a character to the list +-- +--------------------------------------------------------------------------------- +function CensusPlus_AddPlayerToList( name, level, guild, raceName, className, lastseen ) + local size = table.getn( g_PlayerList ); + + if( size >= g_MaxNumListed ) then + return; + end + + local index = g_PlayerLookupTable[name]; + if (index == nil) then + local size = table.getn( g_PlayerList ); + index = size + 1; + g_PlayerList[index] = { m_name = name, m_level = level, m_guild = guild, m_seen = lastseen }; + g_PlayerLookupTable[name] = index; + end +end +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CensusPlayerList.xml Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,376 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd"> + <Script file="CensusPlayerList.lua"/> + <Button name="CensusPlusPlayerButtonTemplate" virtual="true"> + <Size> + <AbsDimension x="330" y="16" /> + </Size> + <Layers> + <Layer level="BORDER"> + <FontString name="$parentName" inherits="GameFontNormalSmall" justifyH="LEFT"> + <Size> + <AbsDimension x="88" y="16"/> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="2" y="-1"/> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="$parentLevel" inherits="GameFontHighlightSmall" justifyH="CENTER"> + <Size> + <AbsDimension x="20" y="16"/> + </Size> + <Anchors> + <Anchor point="LEFT" relativeTo="$parentName" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="2" y="0"/> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="$parentClass" inherits="GameFontHighlightSmall" justifyH="LEFT"> + <Size> + <AbsDimension x="100" y="16"/> + </Size> + <Anchors> + <Anchor point="LEFT" relativeTo="$parentLevel" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="22" y="0"/> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="$parentSeen" inherits="GameFontHighlightSmall" justifyH="LEFT"> + <Size> + <AbsDimension x="130" y="16"/> + </Size> + <Anchors> + <Anchor point="LEFT" relativeTo="$parentClass" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="22" y="0"/> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"> + <Size> + <AbsDimension x="310" y="16" /> + </Size> + <Anchors> + <Anchor point="TOP"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </HighlightTexture> + <Scripts> + <OnLoad> + this:RegisterForClicks( "RightButtonUp"); + </OnLoad> + <OnClick> + CensusPlus_PlayerButton_OnClick(); + PlaySound("igMainMenuOptionCheckBoxOn"); + </OnClick> + </Scripts> + </Button> + <Frame name="CP_PlayerListWindow" toplevel="true" enableMouse="true" movable="true" parent="UIParent" hidden="true" frameStrata="DIALOG" > + <Size> + <AbsDimension x="390" y="400" /> + </Size> + <Anchors> + <Anchor point="TOPRIGHT" relativeTo="CensusPlus"> + <Offset> + <AbsDimension x="20" y="0"/> + </Offset> + </Anchor> + </Anchors> + <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true"> + <BackgroundInsets> + <AbsInset left="11" right="12" top="12" bottom="11" /> + </BackgroundInsets> + <TileSize> + <AbsValue val="32" /> + </TileSize> + <EdgeSize> + <AbsValue val="32" /> + </EdgeSize> + </Backdrop> + <Layers> + <Layer level="ARTWORK"> + <Texture name="CensusPlayerListFrameHeader" file="Interface\DialogFrame\UI-DialogBox-Header"> + <Size> + <AbsDimension x="296" y="64"/> + </Size> + <Anchors> + <Anchor point="TOP"> + <Offset> + <AbsDimension x="0" y="12"/> + </Offset> + </Anchor> + </Anchors> + </Texture> + <FontString inherits="GameFontNormal" text="CENSUSPlus_Characters"> + <Anchors> + <Anchor point="TOP" relativeTo="CensusPlayerListFrameHeader"> + <Offset> + <AbsDimension x="0" y="-14"/> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlayerListCount" inherits="GameFontHighlight" text="TOTAL CHARS"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CP_PlayerListWindow" relativeFrom="BOTTOMLEFT"> + <Offset> + <AbsDimension x="20" y="25" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Frames> + <Button name="CP_PlayerListCloseButton" inherits="UIPanelCloseButton"> + <Anchors> + <Anchor point="TOPRIGHT"> + <Offset> + <AbsDimension x="-5" y="-5" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + PlaySound("igMainMenuOptionCheckBoxOn"); + HideUIPanel(CP_PlayerListWindow); + </OnClick> + </Scripts> + </Button> + + <Button name="CensusPlusPlayerButton1" inherits="CensusPlusPlayerButtonTemplate" id="1"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CP_PlayerListWindow"> + <Offset> + <AbsDimension x="20" y="-30" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton2" inherits="CensusPlusPlayerButtonTemplate" id="2"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton1" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton3" inherits="CensusPlusPlayerButtonTemplate" id="3"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton2" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton4" inherits="CensusPlusPlayerButtonTemplate" id="4"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton3" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton5" inherits="CensusPlusPlayerButtonTemplate" id="5"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton4" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton6" inherits="CensusPlusPlayerButtonTemplate" id="6"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton5" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton7" inherits="CensusPlusPlayerButtonTemplate" id="7"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton6" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton8" inherits="CensusPlusPlayerButtonTemplate" id="8"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton7" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton9" inherits="CensusPlusPlayerButtonTemplate" id="9"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton8" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton10" inherits="CensusPlusPlayerButtonTemplate" id="10"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton9" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton11" inherits="CensusPlusPlayerButtonTemplate" id="11"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton10" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton12" inherits="CensusPlusPlayerButtonTemplate" id="12"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton11" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton13" inherits="CensusPlusPlayerButtonTemplate" id="13"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton12" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton14" inherits="CensusPlusPlayerButtonTemplate" id="14"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton13" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton15" inherits="CensusPlusPlayerButtonTemplate" id="15"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton14" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton16" inherits="CensusPlusPlayerButtonTemplate" id="16"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton15" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton17" inherits="CensusPlusPlayerButtonTemplate" id="17"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton16" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton18" inherits="CensusPlusPlayerButtonTemplate" id="18"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton17" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton19" inherits="CensusPlusPlayerButtonTemplate" id="19"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton18" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusPlayerButton20" inherits="CensusPlusPlayerButtonTemplate" id="20"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton19" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <ScrollFrame name="CensusPlusPlayerListScrollFrame" inherits="FauxScrollFrameTemplate"> + <Size> + <AbsDimension x="340" y="350" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusPlayerButton1" relativePoint="TOPLEFT"> + <Offset> + <AbsDimension x="-10" y="0" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnVerticalScroll> + FauxScrollFrame_OnVerticalScroll(self, offset, CensusPlus_GUILDBUTTONSIZEY, CensusPlus_UpdatePlayerListButtons); + </OnVerticalScroll> + </Scripts> + </ScrollFrame> + </Frames> + <Scripts> + <OnShow> + CensusPlus_PlayerListOnShow(); + </OnShow> + <OnMouseUp> + if ( this.isMoving ) then + this:StopMovingOrSizing(); + this.isMoving = false; + end + </OnMouseUp> + <OnMouseDown> + if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then + this:StartMoving(); + this.isMoving = true; + end + </OnMouseDown> + <OnHide> + if ( this.isMoving ) then + this:StopMovingOrSizing(); + this.isMoving = false; + end + </OnHide> + </Scripts> + </Frame> +</Ui>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CensusPlus.lua Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,4010 @@ +--[[ + CensusPlus for World of Warcraft(tm). + + Copyright 2005 - 2007 Cooper Sellers and WarcraftRealms.com + + License: + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program(see GLP.txt); if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]] + + +------------------------------------------------------------------------------------ +-- +-- CensusPlus +-- A WoW UI customization by Cooper Sellers +-- +-- +------------------------------------------------------------------------------------ + +---------------------------------------------------------------------------------- +-- +-- EURO vs US localization problem workaround for common server names +-- +--------------------------------------------------------------------------------- +local g_InterfaceVersion = 30000; +g_CensusPlusLocale = "N/A"; -- Must read either US or EU +g_CensusPlusTZOffset = -999; +local g_LocaleSet = false; +local g_TZWarningSent = false; + + +---------------------------------------------------------------------------------- +-- +-- Constants +--rm +local CensusPlus_MYGUILD = "The Last Journey"; -- Special guild to search +--------------------------------------------------------------------------------- +local CensusPlus_VERSION = "4.2.2"; -- version +local CensusPlus_MAXBARHEIGHT = 128; -- Length of blue bars +local CensusPlus_NUMGUILDBUTTONS = 10; -- How many guild buttons are on the UI? +local MAX_CHARACTER_LEVEL = 80; -- Maximum level a PC can attain +--rm +local MAX_LEVEL_DISPLAY = 255; -- Maximum level a PC can attain +local MAX_WHO_RESULTS = 45; -- Maximum number of who results the server will return +CensusPlus_GUILDBUTTONSIZEY = 16; +local CensusPlus_UPDATEDELAY = 5; -- Delay time between /who messages +local CP_MAX_TIMES = 50; + +local g_ServerPrefix = ""; -- US VERSION!! +--local g_ServerPrefix = "EU-"; -- EU VERSION!! + +local wholib +---------------------------------------------------------------------------------- +-- +-- Print a string to the chat frame +-- msg - message to print +-- +--------------------------------------------------------------------------------- +function CensusPlus_Msg(msg) + if( msg == nil ) then + msg = " NIL "; + end + ChatFrame1:AddMessage("Census+: "..msg, 1.0, 1.0, 0.5); +end + +function CensusPlus_WhoMsg(msg) + if( msg == nil ) then + msg = " NIL "; + end + ChatFrame1:AddMessage("Census+ Who: "..msg, 0.8, 0.8, 0.1); +end + +local function CensusPlus_Msg2( msg ) + if( msg == nil ) then + msg = " NIL "; + end + ChatFrame2:AddMessage("Census+: "..msg, 0.5, 1.0, 1.0); +end + +---------------------------------------------------------------------------------- +-- +-- Global scope variables +-- +--------------------------------------------------------------------------------- +CensusPlus_Database = {}; -- Database of all CensusPlus results +CensusPlus_BGInfo = {}; -- Battleground info +CensusPlus_PerCharInfo = {}; -- Per character settings +CensusPlus_Unhandled = {}; +local g_TrackUnhandled = false; + +---------------------------------------------------------------------------------- +-- +-- File scope variables +-- +--------------------------------------------------------------------------------- +local g_CensusPlusInitialized; -- Is CensusPlus initialized? +local g_JobQueue = {}; -- The queue of pending jobs +local g_CurrentJob = {}; -- Current job being executed +g_IsCensusPlusInProgress = false; -- Is a CensusPlus in progress? +g_CensusPlusPaused = false; -- Is CensusPlus in progress paused? +g_CensusPlusManuallyPaused = false; -- Is CensusPlus in progress manually paused? +local g_WhoAutoClose = 0; -- AutoClose who window? + +local g_NumNewCharacters = 0; -- How many new characters found this CensusPlus +local g_NumUpdatedCharacters = 0; -- How many characters were updated during this CensusPlus + +local g_MobXPByLevel = {}; -- XP earned for killing +local g_CharacterXPByLevel = {}; -- XP required to advance through the given level +local g_TotalCharacterXPPerLevel = {}; -- Total XP required to attain the given level + +CensusPlus_Guilds = {}; -- All known guild + +local g_TotalCharacterXP = 0; -- Total character XP for currently selected search +local g_TotalCount = 0; -- Total number of characters which meet search criteria +local g_RaceCount = {}; -- Totals for each race given search criteria +local g_ClassCount = {}; -- Totals for each class given search criteria +local g_LevelCount = {}; -- Totals for each level given search criteria +local g_TempCount = {}; +local g_TempZoneCount = {}; + +g_GuildSelected = nil; -- Search criteria: Currently selected guild, 0 indicates none +g_RaceSelected = 0; -- Search criteria: Currently selected race, 0 indicates none +g_ClassSelected = 0; -- Search criteria: Currently selected class, 0 indicates none +g_LevelSelected = 0; + +local g_LastOnUpdateTime = 0; -- Last time OnUpdate was called +local g_WaitingForWhoUpdate = false; -- Are we waiting for a who update event? + +local g_WhoAttempts = 0; -- Counter for detecting stuck who results +local g_MiniOnStart = 1; -- Flag to have the mini-censusP displayed on startup + +local g_CompleteCensusStarted = false; -- Flag for counter +local g_TakeHour = 0; -- Our timing hour +local g_TimeDatabase = {}; -- Time database +local g_ResetHour = true; -- Rest hour +local g_VariablesLoaded = false; -- flag to tell us if vars are loaded +local g_FirstRun = true; +local g_LastCensusRun = time() - 1500; -- timer used if auto census is turned on + +local g_Pre_FriendsFrameOnHideOverride = nil; -- override for friend's frame to stop the close window sound +local g_Pre_FriendsFrameOnShowOverride = nil; -- override for friend's frame to stop the close window sound +local g_Pre_WhoList_UpdateOverride = nil; -- override for friend's frame to stop the close window sound +local g_Pre_WhoHandler = nil; -- override for submiting a who +local CP_Pre_OnEvent = nil; +local g_Pre_FriendsFrame_Update = nil; +local g_SetItemRef_Override = nil; +local CP_updatingGuild = nil; +g_CensusPlusLastTarget = nil; +g_CensusPlusLastTargetName = nil; +local g_CurrentlyInBG = false; +local g_CurrentlyInBG_Msg = false; +local g_InternalSearchName = nil; +local g_InternalSearchLevel = nil; +local g_InternalSearchCount = 0; +CensusPlus_EnableProfiling = false; +local g_CensusPlus_StartTime = 0; +local g_CensusWhoOverrideMsg = nil; +local g_WaitingForOverrideUpdate = false; +local g_ProblematicMessageShown = false; +local g_WhoLibLoaded = false; +local g_PratLoaded = false; +local g_WhoLibSubvert = nil; +local g_WhoLibSendWhoSubvert = nil; +local g_whoLibResultSubvert = nil; +local g_WhoLibChatSubvert = nil; +local g_WhoLibAskWhoSubvert = nil; + +-- Battleground info +CENSUSPLUS_CURRENT_BATTLEFIELD_QUEUES = {}; + +local g_AccumulatedPruneData = {}; + +g_RaceClassList = { }; -- Used to pick the right icon +g_RaceClassList[CENSUSPlus_DRUID] = 10; +g_RaceClassList[CENSUSPlus_HUNTER] = 11; +g_RaceClassList[CENSUSPlus_MAGE] = 12; +g_RaceClassList[CENSUSPlus_PRIEST] = 13; +g_RaceClassList[CENSUSPlus_ROGUE] = 14; +g_RaceClassList[CENSUSPlus_WARLOCK] = 15; +g_RaceClassList[CENSUSPlus_WARRIOR] = 16; +g_RaceClassList[CENSUSPlus_SHAMAN] = 17; +g_RaceClassList[CENSUSPlus_PALADIN] = 18; +g_RaceClassList[CENSUSPlus_DEATHKNIGHT] = 30; + +g_RaceClassList[CENSUSPlus_DWARF] = 20; +g_RaceClassList[CENSUSPlus_GNOME] = 21; +g_RaceClassList[CENSUSPlus_HUMAN] = 22; +g_RaceClassList[CENSUSPlus_NIGHTELF] = 23; +g_RaceClassList[CENSUSPlus_ORC] = 24; +g_RaceClassList[CENSUSPlus_TAUREN] = 25; +g_RaceClassList[CENSUSPlus_TROLL] = 26; +g_RaceClassList[CENSUSPlus_UNDEAD] = 27; +g_RaceClassList[CENSUSPlus_DRAENEI] = 28; +g_RaceClassList[CENSUSPlus_BLOODELF] = 29; + +g_TimeDatabase[CENSUSPlus_DRUID] = 0; +g_TimeDatabase[CENSUSPlus_HUNTER] = 0; +g_TimeDatabase[CENSUSPlus_MAGE] = 0; +g_TimeDatabase[CENSUSPlus_PRIEST] = 0; +g_TimeDatabase[CENSUSPlus_ROGUE] = 0; +g_TimeDatabase[CENSUSPlus_WARLOCK] = 0; +g_TimeDatabase[CENSUSPlus_WARRIOR] = 0; +g_TimeDatabase[CENSUSPlus_SHAMAN] = 0; +g_TimeDatabase[CENSUSPlus_PALADIN] = 0; +g_TimeDatabase[CENSUSPlus_DEATHKNIGHT] = 0; +g_TimeDatabase[CENSUSPlus_WarsongGulch] = 0; +g_TimeDatabase[CENSUSPlus_AlteracValley] = 0; +g_TimeDatabase[CENSUSPlus_ArathiBasin] = 0; + +-- These two DO NOT need to be localized +local CENSUSPlus_HORDE = "Horde"; +local CENSUSPlus_ALLIANCE = "Alliance"; + + +local g_FactionCheck = {}; +g_FactionCheck[CENSUSPlus_ORC] = CENSUSPlus_HORDE; +g_FactionCheck[CENSUSPlus_TAUREN] = CENSUSPlus_HORDE; +g_FactionCheck[CENSUSPlus_TROLL] = CENSUSPlus_HORDE; +g_FactionCheck[CENSUSPlus_UNDEAD] = CENSUSPlus_HORDE; +g_FactionCheck[CENSUSPlus_BLOODELF] = CENSUSPlus_HORDE; + +g_FactionCheck[CENSUSPlus_DWARF] = CENSUSPlus_ALLIANCE; +g_FactionCheck[CENSUSPlus_GNOME] = CENSUSPlus_ALLIANCE; +g_FactionCheck[CENSUSPlus_HUMAN] = CENSUSPlus_ALLIANCE; +g_FactionCheck[CENSUSPlus_NIGHTELF] = CENSUSPlus_ALLIANCE; +g_FactionCheck[CENSUSPlus_DRAENEI] = CENSUSPlus_ALLIANCE; +local g_ReturnedZero = false; + +do + -- HACK + --[[ + seeing as Blizzard improperly coded GuildControlPopupFrame_OnEvent to mess up when GUILD_ROSTER_EVENT is dispatched, + and there is no real harm in removing the handler entirely, that's what's happening. If and when Blizzard decides to fix it, this should be removed. + Thanks to ckknight of wowace for this + ]] + GuildControlPopupFrame:SetScript("OnEvent", nil) +end + + +---------------------------------------------------------------------------------- +-- +-- Set up confirmation boxes +-- +--------------------------------------------------------------------------------- +StaticPopupDialogs["CP_PURGE_CONFIRM"] = { + text = CENSUSPlus_PURGE_LOCAL_CONFIRM, + button1 = CENSUSPlus_YES, + button2 = CENSUSPlus_NO, + OnAccept = function() + CensusPlus_DoPurge(); + end, + sound = "levelup2", + timeout = 0, + whileDead = 1, + hideOnEscape = 1, + showAlert = 1 +}; + +---------------------------------------------------------------------------------- +-- +-- Set up Continue after override box +-- +--------------------------------------------------------------------------------- +StaticPopupDialogs["CP_CONTINUE_CENSUS"] = { + text = CENSUSPlus_OVERRIDE_COMPLET_PAUSED, + button1 = CENSUSPlus_CONTINUE, + OnAccept = function() + g_CensusPlusManuallyPaused = false; + CensusPlusTakeButton:SetText( CENSUSPlus_PAUSE ); + end, + sound = "levelup2", + timeout = 0, + whileDead = 1, + hideOnEscape = 1, + showAlert = 1 +}; + +---------------------------------------------------------------------------------- +-- +-- Chat msg hook +-- +--------------------------------------------------------------------------------- +local function CP_HookAddMessage(frame) + local AddMessage = frame.AddMessage; + -- Create a closure to cleanly hook the AddMessage routine. + frame.AddMessage = + function (this, msg, r, g, b, id) + if( ( g_TrackUnhandled or g_IsCensusPlusInProgress ) and msg ) then + local s, e; + local results = { }; + local whoMsg = false; +--CensusPlus_Msg2( "Something : " .. msg ); + + -- + -- We don't need to process results from chat, we can get it straight from the who window (DUHH!) + -- So, we just need to see if we have a match, and suppress the output if so + -- + +-- results = CensusPlus_GatherSingleReturn( msg ); +-- if( results["NAME"] ~= nil ) then + results = { }; + s, e = strmatch(msg, CENSUS_SINGLE_MATCH_PATTERN); + if( s ~= nil ) then +-- CensusPlus_Msg2( " Name : " .. results["NAME"] .. " L: " .. results["LEVEL"] .. " R: " .. results["RACE"] .. " C: " .. results["CLASS"].. " G: " .. results["GUILD"].. " Z: " .. results["ZONE"] ); + whoMsg = true; +-- WR_ProcessSingleEntry( results["NAME"], results["LEVEL"], results["RACE"], results["CLASS"], results["GUILD"], results["ZONE"] ); + else + if( g_TrackUnhandled ) then + CensusPlus_Unhandled[msg] = 1; + end + end + + results = { }; + s, e = strmatch(msg, WHO_NUM_RESULTS); + if( s ~= nil ) then + -- We got a match, now just need to determine if it's 0 or not, so we'll use a bit more lax check + whoMsg = true; + + local result; + s, e, result = string.find( msg, "(%d+).*" ); + if( result == "0" ) then + g_ReteurnedZero = true; + end + + CensusPlus_ProcessWhoResults(); + end + + + if( whoMsg ) then + -- + -- Also bail out of an override if in place + -- + if( g_CensusWhoOverrideMsg ~= nil and g_WaitingForOverrideUpdate == true ) then + -- + -- Allow the who to act normally + -- + g_CensusWhoOverrideMsg = nil; + g_WaitingForOverrideUpdate = false; + CensusPlus_Msg( CENSUSPlus_OVERRIDE_COMPLETE ); + return AddMessage(this, msg, r, g, b, id) + elseif( CensusPlus_PerCharInfo["Verbose"] ~= true and + not g_CensusPlusPaused and + not g_CensusPlusManuallyPaused ) then + return; + + end + + g_WaitingForWhoUpdate = false; + end + + return AddMessage(this, msg, r, g, b, id) + else + return AddMessage(this, msg, r, g, b, id) + end + end +end + + + +----------------------------------------------------------------------------------- +-- +-- Insert a job at the end of the job queue +-- +----------------------------------------------------------------------------------- +local function InsertJobIntoQueue(job) +--CensusPlus_DumpJob( job ); + table.insert(g_JobQueue, job); +end + +----------------------------------------------------------------------------------- +-- +-- Initialize the tables of constants for XP calculations +-- +----------------------------------------------------------------------------------- +local function InitConstantTables() + -- + -- XP earned for killing + -- + --rm + for i = 1, MAX_LEVEL_DISPLAY, 1 do + g_MobXPByLevel[i] = i; + end + + -- + -- XP required to advance through the given level + -- + for i = 1, MAX_LEVEL_DISPLAY, 1 do + g_CharacterXPByLevel[i] = ((8 * i * g_MobXPByLevel[i]) / 100) * 100; + end + + -- + -- Total XP required to attain the given level + -- + local totalCharacterXP = 0; + for i = 1, MAX_LEVEL_DISPLAY, 1 do +-- g_TotalCharacterXPPerLevel[i] = totalCharacterXP; + --totalCharacterXP = totalCharacterXP + g_CharacterXPByLevel[i]; + val = (i*5)/MAX_LEVEL_DISPLAY; + g_TotalCharacterXPPerLevel[i] = math.exp(val); + end + +end + +----------------------------------------------------------------------------------- +-- +-- Return a table of races for the input faction +-- +----------------------------------------------------------------------------------- +function CensusPlus_GetFactionRaces(faction) + local ret = {}; + if (faction == CENSUSPlus_HORDE) then + ret = {CENSUSPlus_ORC, CENSUSPlus_TAUREN, CENSUSPlus_TROLL, CENSUSPlus_UNDEAD, CENSUSPlus_BLOODELF}; + elseif (faction == CENSUSPlus_ALLIANCE) then + ret = {CENSUSPlus_DWARF, CENSUSPlus_GNOME, CENSUSPlus_HUMAN, CENSUSPlus_NIGHTELF, CENSUSPlus_DRAENEI}; + end + return ret; +end + +----------------------------------------------------------------------------------- +-- +-- Return a table of classes for the input faction +-- +----------------------------------------------------------------------------------- +function CensusPlus_GetFactionClasses(faction) + local ret = {}; + if (faction == CENSUSPlus_HORDE) then + ret = {CENSUSPlus_DRUID, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_ROGUE, CENSUSPlus_WARLOCK, CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_SHAMAN, CENSUSPlus_DEATHKNIGHT}; + elseif (faction == CENSUSPlus_ALLIANCE) then + ret = {CENSUSPlus_DRUID, CENSUSPlus_HUNTER, CENSUSPlus_MAGE, CENSUSPlus_PRIEST, CENSUSPlus_ROGUE, CENSUSPlus_WARLOCK, CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_SHAMAN, CENSUSPlus_DEATHKNIGHT}; + end + return ret; +end + +----------------------------------------------------------------------------------- +-- +-- Return a table of classes for the input race +-- +----------------------------------------------------------------------------------- +local function GetRaceClasses(race) + local ret = {}; + if (race == CENSUSPlus_ORC) then + ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_SHAMAN, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; + elseif (race == CENSUSPlus_TAUREN) then + ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_SHAMAN, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT}; + elseif (race == CENSUSPlus_TROLL) then + ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_MAGE, CENSUSPlus_DEATHKNIGHT}; + elseif (race == CENSUSPlus_UNDEAD) then + ret = {CENSUSPlus_WARRIOR, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; + elseif (race == CENSUSPlus_DWARF) then + ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_DEATHKNIGHT}; + elseif (race == CENSUSPlus_GNOME) then + ret = {CENSUSPlus_WARRIOR, CENSUSPlus_ROGUE, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; + elseif (race == CENSUSPlus_HUMAN) then + ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; + elseif (race == CENSUSPlus_NIGHTELF) then + ret = {CENSUSPlus_WARRIOR, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_DRUID, CENSUSPlus_DEATHKNIGHT}; + elseif (race == CENSUSPlus_BLOODELF) then + ret = {CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_ROGUE, CENSUSPlus_PRIEST, CENSUSPlus_MAGE, CENSUSPlus_WARLOCK, CENSUSPlus_DEATHKNIGHT}; + elseif (race == CENSUSPlus_DRAENEI) then + ret = {CENSUSPlus_WARRIOR, CENSUSPlus_PALADIN, CENSUSPlus_HUNTER, CENSUSPlus_PRIEST, CENSUSPlus_SHAMAN, CENSUSPlus_MAGE, CENSUSPlus_DEATHKNIGHT}; + end + return ret; +end + +----------------------------------------------------------------------------------- +-- +-- Return common letters found in zone names +-- +----------------------------------------------------------------------------------- +local function GetZoneLetters() + return {"t", "d", "g", "f", "h", "b", "x", "gulch", "valley", "basin" }; +end + +----------------------------------------------------------------------------------- +-- +-- Return common letters found in names, may override this for other languages +-- Worst case scenario is to do it for every letter in the alphabet +-- +----------------------------------------------------------------------------------- +local function GetNameLetters() +--rm +-- return { "a", "b", "c", "d", "e", "f", "g", "i", "o", "p", "r", "s", "t", "u", "y" }; +-- return { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "\195\134", "\195\164", "\195\182", "\195\188", "\195\152" }; + return { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "\195\134", "\195\164", "\195\182", "\195\188", "\195\152", "\195\184" }; +end + +--------------------------------------------------------------------------------- +-- +-- Register with Cosmos UI +-- +--------------------------------------------------------------------------------- +local function CensusPlus_RegisterCosmos() + -- + -- If Cosmos is installed, add a button to the Cosmos page to activate CensusPlus + -- + if ( EarthFeature_AddButton ) then + EarthFeature_AddButton( + { + id = "CensusPlus"; + name = CENSUSPlus_BUTTON_TEXT; + subtext = CENSUSPlus_BUTTON_SUBTEXT; + tooltip = CENSUSPlus_BUTTON_TIP; + icon = "Interface\\AddOns\\CensusPlus\\Skin\\CensusPlus_Icon"; + callback = CensusPlus_Toggle; + } + ); + elseif ( Cosmos_RegisterButton ) then + Cosmos_RegisterButton(CENSUSPlus_BUTTON_TEXT, CENSUSPlus_BUTTON_SUBTEXT, CENSUSPlus_BUTTON_TIP, "Interface\\AddOns\\CensusPlus\\Skin\\CensusPlus_Icon", CensusPlus_Toggle); + end +end + + +---------------------------------------------------------------------------------- +-- +-- Called when the main window is shown +-- +--------------------------------------------------------------------------------- +function CensusPlus_OnShow() + -- Initialize if this is the first OnShow event + if (g_CensusPlusInitialized == false) then + g_CensusPlusInitialized = true; + end + CensusPlus_UpdateView(); +end + +---------------------------------------------------------------------------------- +-- +-- Toggle hidden status +-- +--------------------------------------------------------------------------------- +function CensusPlus_Toggle() + if ( CensusPlus:IsVisible() ) then + CensusPlus:Hide(); + else + CensusPlus:Show(); + end +end + +---------------------------------------------------------------------------------- +-- +-- Toggle options pane +-- +--------------------------------------------------------------------------------- +function CensusPlus_ToggleOptions() + if ( CP_OptionsWindow:IsVisible() ) then + CP_OptionsWindow:Hide(); + else + CP_OptionsWindow:Show(); + end +end + +----------------------------------------------------------------------------------- +-- +-- Called once on load +-- +----------------------------------------------------------------------------------- +function CensusPlus_OnLoad() + -- + -- Update the version number + -- + CensusPlusText:SetText("Census+ EmSpe\195\167ial v"..CensusPlus_VERSION .. " " .. g_CensusPlusLocale ); + CensusPlusText2:SetText( CENSUSPlus_UPLOAD ); + + -- + -- Init constant tables + -- + InitConstantTables(); + + -- + -- Register with Cosmos, if it is installed + -- + CensusPlus_RegisterCosmos(); + + -- + -- Register for events + -- + this:RegisterEvent("VARIABLES_LOADED"); +-- this:RegisterEvent("WHO_LIST_UPDATE"); + + + this:RegisterEvent("CHAT_MSG_SYSTEM"); + + + this:RegisterEvent("ZONE_CHANGED_NEW_AREA"); + + -- + -- Register a slash command + -- + SLASH_CensusPlusCMD1 = "/CensusPlus"; + SLASH_CensusPlusCMD2 = "/Census+"; + SLASH_CensusPlusCMD3 = "/Census"; + SlashCmdList["CensusPlusCMD"] = CensusPlus_Command; + + SLASH_CensusPlusVerbose1 = "/censusverbose"; + SlashCmdList["CensusPlusVerbose"] = CensusPlus_Verbose; + + -- + -- Set the auto close to true + -- + CensusPlus_AutoCloseWho( 1 ); + --AutoClose:SetChecked( 1 ); + +-- g_Pre_FriendsFrameOnHideOverride = FriendsFrame_OnHide; +-- FriendsFrame_OnHide = CensusPlus_FriendsFrame_OnHide; + +-- g_Pre_FriendsFrameOnShowOverride = FriendsFrame_OnShow; +-- FriendsFrame_OnShow = CensusPlus_FriendsFrame_OnShow; + +-- g_Pre_WhoList_UpdateOverride = WhoList_Update; +-- WhoList_Update = CensusPlus_WhoList_Update; + +-- g_Pre_FriendsFrame_Update = FriendsFrame_Update; +-- FriendsFrame_Update = CensusPlus_FriendsFrame_Update; + + g_SetItemRef_Override = SetItemRef; + SetItemRef = CensusPlus_SetItemRef; + + CP_Pre_OnEvent = FriendsFrame_OnEvent; + FriendsFrame_OnEvent = CensusPlus_FriendsFrame_OnEvent; + + g_Pre_WhoHandler = SlashCmdList["WHO"]; + SlashCmdList["WHO"] = CensusPlus_WhoHandler; + + CensusPlus_CheckForBattleground(); + + -- Hook the default chat frame's AddMessage method. + CP_HookAddMessage(ChatFrame1); + + -- + -- Set up an empty frame to do updates + -- + local updateFrame = CreateFrame("Frame"); + updateFrame:SetScript("OnUpdate", CensusPlus_OnUpdate); + CensusPlusTakeGuildButton:SetText( CENSUSPlus_TAKEGUILD.." \""..CensusPlus_MYGUILD.."\"" ); +end + +function CensusPlus_FriendsFrame_OnEvent(...) + +-- CensusPlus_Msg( "CP_FF_OE Message =>" .. event ); + + if(wholib == nil and + event == "WHO_LIST_UPDATE" and g_IsCensusPlusInProgress and g_WaitingForWhoUpdate ) then + -- + -- First check for an override + -- + if( g_CensusWhoOverrideMsg ~= nil and g_WaitingForOverrideUpdate == true ) then + -- + -- Allow the who to act normally + -- + g_CensusWhoOverrideMsg = nil; + g_WaitingForOverrideUpdate = false; + CensusPlus_Msg( CENSUSPlus_OVERRIDE_COMPLETE_BUT_PAUSED ); +-- g_Pre_WhoList_UpdateOverride(); + + + g_WaitingForWhoUpdate = false; + CP_Pre_OnEvent(...); + -- + -- If we opened the who window, do a manual pause and open a dialog + -- + g_CensusPlusManuallyPaused = true; + CensusPlusTakeButton:SetText( CENSUSPlus_UNPAUSE ); + + StaticPopup_Show ("CP_CONTINUE_CENSUS"); + + elseif ( g_IsCensusPlusInProgress ) then + -- + -- Only process who results if a CensusPlus is in progress + -- + + CP_ProcessWhoEvent() + + + else + -- + -- This is just a random /who done by the player + -- + CensusPlus_ProcessWhoResults(); + end + -- + -- We got the who update + -- + g_WaitingForWhoUpdate = false; + + return; + + end + + CP_Pre_OnEvent(...); + +end + +function CP_ProcessWhoEvent(query, ...) + local numWhoResults = GetNumWhoResults(); + if( numWhoResults == 0 ) then + return; + end + + CensusPlus_ProcessWhoResults(); + if (numWhoResults > MAX_WHO_RESULTS) then + -- + -- Who list is overflowed, split the query to make the return smaller + -- + local minLevel = g_CurrentJob.m_MinLevel; + local maxLevel = g_CurrentJob.m_MaxLevel; + local race = g_CurrentJob.m_Race; + local class = g_CurrentJob.m_Class; + local zoneLetter = g_CurrentJob.m_zoneLetter; + local letter = g_CurrentJob.m_Letter; +--rmg + local guild = g_CurrentJob.m_Guild; + + if (minLevel ~= maxLevel) then + + -- + -- The level range is greater than a single level, so split it in half and submit the two jobs + -- + local pivot = floor((minLevel + maxLevel) / 2); + local jobLower = CensusPlus_CreateJob( minLevel, pivot, nil, nil, nil , guild ); + InsertJobIntoQueue(jobLower); + local jobUpper = CensusPlus_CreateJob( pivot + 1, maxLevel, nil, nil, nil , guild ); + InsertJobIntoQueue(jobUpper); + else + -- + -- We cannot split the level range any more + -- + local factionGroup = UnitFactionGroup("player"); + local level = minLevel; + if (race == nil) then + -- + -- This job does not specify race, so split it that way, making four new jobs + -- + local thisFactionRaces = CensusPlus_GetFactionRaces(factionGroup); + local numRaces = table.getn(thisFactionRaces); + for i = 1, numRaces, 1 do + local job = CensusPlus_CreateJob( level, level, thisFactionRaces[i], nil, nil , guild ); + InsertJobIntoQueue(job); + end + else + if (class == nil) then + -- + -- This job does not specify class, so split it that way, making more jobs + -- + local thisRaceClasses = GetRaceClasses(race); + local numClasses = table.getn(thisRaceClasses); + for i = 1, numClasses, 1 do + local job = CensusPlus_CreateJob( level, level, race, thisRaceClasses[i], nil , guild ); + InsertJobIntoQueue(job); + end + else + if( letter == nil ) then + -- There are too many characters with a single level, class and race + -- The work around we are going to pursue is to check by name for a,e,i,o,r,s,t,u + local letters = GetNameLetters(); + for i=1, table.getn( letters ), 1 do + local job = CensusPlus_CreateJob( level, level, race, class, letters[i] , guild ); + InsertJobIntoQueue(job); + end + else + -- There are too many characters with a single level, class, race and letter, give up + local whoText = CensusPlus_CreateWhoText(g_CurrentJob); + CensusPlus_Msg(format(CENSUSPlus_TOOMANY, whoText)); + end + end + end + end + end + + local whoText = CensusPlus_CreateWhoText(g_CurrentJob); + + if whoText == query then + g_WaitingForWhoUpdate = false + end +end + +----------------------------------------------------------------------------------- +-- +-- Load Handler for options box +-- +----------------------------------------------------------------------------------- +function CP_OptionsOnShow() + CP_OptionAutoClose:SetChecked(g_WhoAutoClose); + CP_OptionAutoStartButton:SetChecked(g_MiniOnStart); + CP_OptionVerboseButton:SetChecked(CensusPlus_PerCharInfo["Verbose"]); + CP_OptionAutoCensusButton:SetChecked( CensusPlus_Database["Info"]["AutoCensus"] ); +-- CP_OptionProcessCharProfileButton:SetChecked( CensusPlus_DoThisCharacter ); +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus Friends Frame override to stop the window close sound +-- +----------------------------------------------------------------------------------- +function CensusPlus_FriendsFrame_OnHide() + g_Pre_FriendsFrameOnHideOverride(); +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus Friends Frame override to stop the window close sound +-- +----------------------------------------------------------------------------------- +function CensusPlus_FriendsFrame_OnShow() + g_Pre_FriendsFrameOnShowOverride(); +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus_WhoList_Update +-- +----------------------------------------------------------------------------------- +function CensusPlus_WhoList_Update() +--InCombatLockdown() == false + if( g_IsCensusPlusInProgress == true and g_WhoAutoClose ) then + local numWhos, totalCount = GetNumWhoResults(); + local name, guild, level, race, class, zone, group; + local button; + local columnTable; + local whoOffset = FauxScrollFrame_GetOffset(WhoListScrollFrame); + local whoIndex; + local showScrollBar = nil; + if ( numWhos > WHOS_TO_DISPLAY ) then + showScrollBar = 1; + end + local displayedText = ""; + if ( totalCount > MAX_WHOS_FROM_SERVER ) then + displayedText = format(WHO_FRAME_SHOWN_TEMPLATE, MAX_WHOS_FROM_SERVER); + end + WhoFrameTotals:SetText(format(GetText("WHO_FRAME_TOTAL_TEMPLATE", nil, totalCount), totalCount).." "..displayedText); + for i=1, WHOS_TO_DISPLAY, 1 do + whoIndex = whoOffset + i; + button = getglobal("WhoFrameButton"..i); + button.whoIndex = whoIndex; + name, guild, level, race, class, zone, group = GetWhoInfo(whoIndex); + columnTable = { zone, guild, race }; + getglobal("WhoFrameButton"..i.."Name"):SetText(name); + getglobal("WhoFrameButton"..i.."Level"):SetText(level); + getglobal("WhoFrameButton"..i.."Class"):SetText(class); + local variableText = getglobal("WhoFrameButton"..i.."Variable"); + variableText:SetText(columnTable[UIDropDownMenu_GetSelectedID(WhoFrameDropDown)]); + if ( not group ) then + group = ""; + end + --getglobal("WhoFrameButton"..i.."Group"):SetText(getglobal(strupper(group))); + + -- If need scrollbar resize columns + if ( showScrollBar ) then + variableText:SetWidth(95); + else + variableText:SetWidth(110); + end + + -- Highlight the correct who + if ( WhoFrame.selectedWho == whoIndex ) then + button:LockHighlight(); + else + button:UnlockHighlight(); + end + + if ( whoIndex > numWhos ) then + button:Hide(); + else + button:Show(); + end + end + + if ( not WhoFrame.selectedWho ) then + WhoFrameGroupInviteButton:Disable(); + WhoFrameAddFriendButton:Disable(); + else + WhoFrameGroupInviteButton:Enable(); + WhoFrameAddFriendButton:Enable(); + WhoFrame.selectedName = GetWhoInfo(WhoFrame.selectedWho); + end + + -- If need scrollbar resize columns + if ( showScrollBar ) then + WhoFrameColumn_SetWidth(WhoFrameColumnHeader2, 105); + UIDropDownMenu_SetWidth(WhoFrameDropDown, 80); + else + WhoFrameColumn_SetWidth(WhoFrameColumnHeader2, 120); + UIDropDownMenu_SetWidth(WhoFrameDropDown, 95); + end + + -- ScrollFrame update + FauxScrollFrame_Update(WhoListScrollFrame, numWhos, WHOS_TO_DISPLAY, FRIENDS_FRAME_WHO_HEIGHT ); + + else + g_Pre_WhoList_UpdateOverride(); + end +end + + +----------------------------------------------------------------------------------- +-- +-- CensusPlus_FriendsFrame_Update +-- +----------------------------------------------------------------------------------- +function CensusPlus_FriendsFrame_Update() + if ( FriendsFrame.selectedTab == 3 and g_IsCensusPlusInProgress == true and g_WhoAutoClose ) then + FriendsFrameTopLeft:SetTexture("Interface\\ClassTrainerFrame\\UI-ClassTrainer-TopLeft"); + FriendsFrameTopRight:SetTexture("Interface\\ClassTrainerFrame\\UI-ClassTrainer-TopRight"); + FriendsFrameBottomLeft:SetTexture("Interface\\FriendsFrame\\GuildFrame-BotLeft"); + FriendsFrameBottomRight:SetTexture("Interface\\FriendsFrame\\GuildFrame-BotRight"); + local guildName, title, rank = GetGuildInfo("player"); + if ( guildName ) then + FriendsFrameTitleText:SetText(format(GUILD_TITLE_TEMPLATE, title, guildName)); + else + FriendsFrameTitleText:SetText(""); + end + --GuildStatus_Update(); + FriendsFrameTitleText:SetText(guildName); + FriendsFrame_ShowSubFrame("GuildFrame"); + else + g_Pre_FriendsFrame_Update(); + end +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus Who Handler +-- +----------------------------------------------------------------------------------- +function CensusPlus_WhoHandler( msg ) + if( g_IsCensusPlusInProgress == true ) then +CensusPlus_Msg( "Census Who Handler" ); + if ( msg == "" ) then + msg = WhoFrame_GetDefaultWhoCommand(); + ShowWhoPanel(); + elseif ( msg == "cheat" ) then + -- Remove the "cheat" part later! + ShowWhoPanel(); + end + + -- + -- Queue up the command to run next + -- + g_CensusWhoOverrideMsg = msg; + CensusPlus_Msg( CENSUSPlus_OVERRIDE ); +-- CensusPlus_SendWho(msg); + else + g_Pre_WhoHandler(msg); + end +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus command +-- +----------------------------------------------------------------------------------- +function CensusPlus_Command( param ) + + local i,j, command, value = string.find(param, "^([^ ]+) (.+)$"); + +-- local firsti, lasti, command, value = string.find (param, "(%w+) (%w+) (%w+)") ; + +-- if( string.lower(param) == "locale" ) then +-- CP_EU_US_Version:Show(); +-- else + if( string.lower(param) == "options" ) then + CP_OptionsWindow:Show(); +-- elseif( string.lower(param) == "tz" ) then +-- CensusPlus_DetermineServerDate(); + elseif( command ~= nil and string.lower(command) == "prune" ) then + if( value ~= nil ) then + CensusPlus_PruneData( value, nil ); + else + CensusPlus_PruneData( 30, nil ); + end + elseif( command ~= nil and string.lower(command) == "timer" ) then + if( value ~= nil ) then + CensusPlus_Database["Info"]["AutoCensusTimer"] = value * 60; + CensusPlus_Msg( "Set autocensus timer to " .. value .. " minutes" ); + else + CensusPlus_Database["Info"]["AutoCensusTimer"] = 1800; + CensusPlus_Msg( "Set autocensus timer to 30 minutes" ); + end + elseif( string.lower(param) == "serverprune" ) then + CensusPlus_PruneData( 0, 1 ); + elseif( string.lower(param) == "bufftest" ) then + showAllUnitBuffs("player"); + elseif( string.lower(param) == "verbose" ) then + CensusPlus_Verbose(); + elseif( string.lower(param) == "take" ) then + CensusPlus_Take_OnClick(); + elseif( string.lower(param) == "stop" ) then + CensusPlus_StopCensus(); + elseif( string.lower(param) == "track" ) then + if( g_TrackUnhandled ) then + CensusPlus_Msg( "Tracking disabled!" ); + g_TrackUnhandled = false; + else + CensusPlus_Msg( "TRACKING ALL CHAT!" ); + g_TrackUnhandled = true; + end + elseif( command ~= nil and string.lower(command) == "who" ) then + local m,n, check, level = string.find(value, "(%w+) (%w+)"); + if( check ~= nil ) then + CensusPlus_InternalWho( string.lower(check), level ); + else + CensusPlus_InternalWho( string.lower(value), nil ); + end + elseif( command ~= nil and string.lower(command) == "test" ) then + if( value ~= nil ) then + CensusPlus_Test( value ); + else + CensusPlus_Test( 1 ); + end + else + CensusPlus_DisplayUsage(); + end +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus Display Usage +-- +----------------------------------------------------------------------------------- +function CensusPlus_DisplayUsage() + local text; + + CensusPlus:Show(); + + CensusPlus_Msg("Usage:\n /CensusPlus"); + CensusPlus_Msg(" /censusPlus verbose Toggle verbose mode off/on"); +-- CensusPlus_Msg(" /CensusPlus locale Bring up the locale selection dialog - (WARNING -- CHANGING YOUR LOCALE WILL PURGE YOUR DATABASE)"); + CensusPlus_Msg(" /CensusPlus options Bring up the Option window"); + CensusPlus_Msg(" /CensusPlus take Start a Census snapshot"); + CensusPlus_Msg(" /CensusPlus stop Stop a Census snapshot"); + CensusPlus_Msg(" /CensusPlus prune X Prune the database by removing characters not seen in X days"); + CensusPlus_Msg(" /CensusPlus serverprune Prune the database by removing all data from servers other than the one you are currently on."); + CensusPlus_Msg(" /CensusPlus who XXX Will display info that matches names or guilds."); + CensusPlus_Msg(" /CensusPlus who unguilded ## Will list unguilded characters of that level."); + CensusPlus_Msg(" /CensusPlus timer X ## Will set the autocensus timer (in minutes)."); +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus_InternalWho - will go through our local database and see if we have +-- any info on this person +-- +----------------------------------------------------------------------------------- +function CensusPlus_InternalWho( search, level ) + + if( g_CensusPlusLocale == "N/A" ) then + return; + end + + g_InternalSearchName = search; + g_InternalSearchLevel = level; + g_InternalSearchCount = 0; + local realmName = g_CensusPlusLocale .. GetCVar("realmName"); + CensusPlus_ForAllCharacters( realmName, UnitFactionGroup("player"), nil, nil, nil, nil, CensusPlus_InternalWhoResult) + + CensusPlus_WhoMsg( "Found " .. g_InternalSearchCount .. " players." ); +end + +function CensusPlus_InternalWhoResult(name, level, guild, race, class, lastSeen ) + lowerName = string.lower( name ); + level = string.lower( level ); + lowerGuild = string.lower( CensusPlus_SafeCheck( guild ) ); + + if( g_InternalSearchName == "unguilded" ) then + if( guild == "" ) then + local doit = 1; + if( g_InternalSearchLevel ~= nil ) then + if( g_InternalSearchLevel ~= level ) then + doit = 0; + end + end + if( doit == 1 ) then + local out = name .. " : Level " .. level .. " " .. race .. " " .. " " .. class; + out = out .. " Last Seen: " .. lastSeen; + CensusPlus_WhoMsg( out ); + g_InternalSearchCount = g_InternalSearchCount + 1; + end + end + elseif( string.find( lowerName, g_InternalSearchName ) or string.find( lowerGuild, g_InternalSearchName ) ) then + -- found someone! + local out = name .. " : Level " .. level .. " " .. race .. " " .. " " .. class; + if( guild ~= "" ) then + out = out .. " <" .. guild .. ">"; + end + out = out .. " Last Seen: " .. lastSeen; + CensusPlus_WhoMsg( out ); + g_InternalSearchCount = g_InternalSearchCount + 1; + end +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus Verbose option +-- +----------------------------------------------------------------------------------- +function CensusPlus_Verbose() + if( CensusPlus_PerCharInfo["Verbose"] == true ) then + CensusPlus_Msg( "Verbose Mode : OFF" ); + CensusPlus_PerCharInfo["Verbose"] = false; + else + CensusPlus_Msg( "Verbose Mode : ON" ); + CensusPlus_PerCharInfo["Verbose"] = true; + end +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus Auto Census set flag +-- +----------------------------------------------------------------------------------- +function CensusPlus_SetAutoCensus( flag ) + if( flag == 1 ) then + CensusPlus_Database["Info"]["AutoCensus"] = true; + else + CensusPlus_Database["Info"]["AutoCensus"] = false; + end +end + +----------------------------------------------------------------------------------- +-- +-- Minimize the window +-- +----------------------------------------------------------------------------------- +function CensusPlus_OnClickMinimize() + if( CensusPlus:IsVisible() ) then +-- MiniCensusPlus:Show(); + CensusPlus:Hide(); + end +end + +----------------------------------------------------------------------------------- +-- +-- Minimize the window +-- +----------------------------------------------------------------------------------- +function CensusPlus_OnClickMaximize() + if( MiniCensusPlus:IsVisible() ) then + MiniCensusPlus:Hide(); + CensusPlus:Show(); + end +end + +----------------------------------------------------------------------------------- +-- +-- Take or pause a census depending on current status +-- +----------------------------------------------------------------------------------- +function CensusPlus_Take_OnClick() + if (g_IsCensusPlusInProgress) then + CensusPlus_TogglePause(); + else + CensusPlus_StartCensus(); + end +end + +--rm +----------------------------------------------------------------------------------- +-- Take or pause a census depending on current status +----------------------------------------------------------------------------------- +function CensusPlus_TakeGuild_OnClick() + if (g_IsCensusPlusInProgress) then + CensusPlus_TogglePause(); + else + CensusPlus_StartGuildCensus(); + end +end + +----------------------------------------------------------------------------------- +-- +-- Display a tooltip for the take button +-- +----------------------------------------------------------------------------------- +function CensusPlus_Take_OnEnter() + if (g_IsCensusPlusInProgress) then + if (g_CensusPlusManuallyPaused) then + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_UNPAUSECENSUS, 1.0, 1.0, 1.0); + GameTooltip:Show(); + else + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_PAUSECENSUS, 1.0, 1.0, 1.0); + GameTooltip:Show(); + end + else + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_TAKECENSUS, 1.0, 1.0, 1.0); + GameTooltip:Show(); + end +end + +--rm +----------------------------------------------------------------------------------- +-- Display a tooltip for the take guild button +----------------------------------------------------------------------------------- +function CensusPlus_TakeGuild_OnEnter() + if (g_IsCensusPlusInProgress) then + if (g_CensusPlusManuallyPaused) then + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_UNPAUSECENSUS, 1.0, 1.0, 1.0); + GameTooltip:Show(); + else + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_PAUSECENSUS, 1.0, 1.0, 1.0); + GameTooltip:Show(); + end + else + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_TAKEGUILDCENSUS, 1.0, 1.0, 1.0); + GameTooltip:Show(); + end +end + +----------------------------------------------------------------------------------- +-- +-- Pause the current census +-- +----------------------------------------------------------------------------------- +function CensusPlus_TogglePause() + if (g_IsCensusPlusInProgress == true) then + if( g_CensusPlusManuallyPaused == true ) then + CensusPlusTakeButton:SetText( CENSUSPlus_PAUSE ); + g_CensusPlusManuallyPaused = false; + else + CensusPlusTakeButton:SetText( CENSUSPlus_UNPAUSE ); + g_CensusPlusManuallyPaused = true; + end + end +end + +----------------------------------------------------------------------------------- +-- +-- Purge the database for this realm and faction +-- +----------------------------------------------------------------------------------- +function CensusPlus_Purge() + StaticPopup_Show ("CP_PURGE_CONFIRM"); +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus_DoPurge +-- +----------------------------------------------------------------------------------- +function CensusPlus_DoPurge() + if( CensusPlus_Database["Servers"] ~= nil ) then + CensusPlus_Database["Servers"] = nil; + end + CensusPlus_Database["Servers"] = {}; + CensusPlus_UpdateView(); + CensusPlus_Msg(CENSUSPlus_PURGEMSG); + + if( CensusPlus_Database["Guilds"] ~= nil ) then + CensusPlus_Database["Guilds"] = nil; + end + CensusPlus_Database["Guilds"] = {}; + + if( CensusPlus_Database["TimesPlus"] ~= nil ) then + CensusPlus_Database["TimesPlus"] = nil; + end + CensusPlus_Database["TimesPlus"] = {}; + + if( CensusPlus_Profile ~= nil ) then + CensusPlus_Profile = nil; + end + CensusPlus_Profile = {}; + + if( CensusPlus_BGInfo ~= nil ) then + CensusPlus_BGInfo = nil; + end + CensusPlus_BGInfo = {}; + + CensusPlus_Msg( "Data Purged" ); +end + +----------------------------------------------------------------------------------- +-- +-- Handler for auto close checkbox +-- +----------------------------------------------------------------------------------- +function CensusPlus_AutoCloseWho(close) + g_WhoAutoClose = close; +end + +--function CensusPlus_WhoLibEvent(event, query, ...) +-- CensusPlus_Msg( event ) +--end + +--rm +----------------------------------------------------------------------------------- +-- Take a guild CensusPlus +----------------------------------------------------------------------------------- +function CensusPlus_StartGuildCensus() + if (g_IsCensusPlusInProgress) then + -- Do not initiate a new CensusPlus while one is in progress + CensusPlus_Msg(CENSUSPlus_ISINPROGRESS); + elseif( g_CurrentlyInBG ) then + g_LastCensusRun = time()-600; + if( not g_CurrentlyInBG_Msg ) then + CensusPlus_Msg(CENSUSPlus_ISINBG); + g_CurrentlyInBG_Msg = true; + end + else + -- Set a timer + g_CensusPlus_StartTime = time(); + -- Initialize the job queue and counters + CensusPlus_Msg(CENSUSPlus_TAKINGONLINE); + g_NumNewCharacters = 0; + g_NumUpdatedCharacters = 0; + g_JobQueue = {}; + g_TempCount = nil; + g_TempCount = {}; + g_TempZoneCount = nil; + g_TempZoneCount = {}; +-- The Job List Works as LIFO; last in, first out +-- for Cataclysm, ... and GM's :) after all following Jobs + local job = CensusPlus_CreateJob( ( MAX_CHARACTER_LEVEL + 1 ) , MAX_LEVEL_DISPLAY, nil, nil, nil , CensusPlus_MYGUILD ); + InsertJobIntoQueue(job); +-- ending with lvl MAX_CHARACTER_LEVEL + local counter = MAX_CHARACTER_LEVEL; + local LowCounter = counter; + local LowCharDetailLevel = 3; + local LevelStep = 10; + + local job = CensusPlus_CreateJob( counter, counter, nil, nil, nil , CensusPlus_MYGUILD ); + InsertJobIntoQueue(job); + counter = counter - 1; + while (counter > LowCharDetailLevel) do + LowCounter = counter - LevelStep + 1 ; + if (LowCounter <= LowCharDetailLevel) then + LowCounter = LowCharDetailLevel +1 ; + end + local job = CensusPlus_CreateJob( LowCounter, counter, nil, nil, nil , CensusPlus_MYGUILD ); + InsertJobIntoQueue(job); + counter = LowCounter - 1 ; + end + while (counter > 0) do + LowCounter = counter ; + local job = CensusPlus_CreateJob( LowCounter, counter, nil, nil, nil , CensusPlus_MYGUILD ); + InsertJobIntoQueue(job); + counter = LowCounter - 1 ; + end +------------------ +-- Test inserts +-- local job = CensusPlus_CreateJob( 11, 12, "Troll", nil, nil , CensusPlus_MYGUILD ); +-- InsertJobIntoQueue(job); + g_IsCensusPlusInProgress = true; + g_WaitingForWhoUpdate = false; + g_CensusPlusManuallyPaused = false; + local hour, minute = GetGameTime(); + g_TakeHour = hour; + g_ResetHour = true; + wholib = wholib or LibStub:GetLibrary("LibWho-2.0", true); + -- Subvert WhoLib + if( wholib ) then + CensusPlus_Msg( "Using WhoLib" ); + end + end + CensusPlusTakeButton:SetText( CENSUSPlus_PAUSE ); + CensusPlusTakeGuildButton:SetText( CENSUSPlus_TAKINGGUILD.." \""..CensusPlus_MYGUILD.."\"" ); +end + + +----------------------------------------------------------------------------------- +-- +-- Take a CensusPlus +-- +----------------------------------------------------------------------------------- +function CensusPlus_StartCensus() + + if (g_IsCensusPlusInProgress) then + if( g_CensusPlusManuallyPaused == true ) then + g_CensusPlusManuallyPaused = false; + CensusPlusPauseButton:SetText( CENSUSPlus_PAUSE ); + else + -- Do not initiate a new CensusPlus while one is in progress + CensusPlus_Msg(CENSUSPlus_ISINPROGRESS); + end + elseif( g_CurrentlyInBG ) then + g_LastCensusRun = time()-600; + if( not g_CurrentlyInBG_Msg ) then + CensusPlus_Msg(CENSUSPlus_ISINBG); + g_CurrentlyInBG_Msg = true; + end + else + -- + -- Set a timer + -- + g_CensusPlus_StartTime = time(); + + -- + -- Initialize the job queue and counters + -- + CensusPlus_Msg(CENSUSPlus_TAKINGONLINE); + g_NumNewCharacters = 0; + g_NumUpdatedCharacters = 0; + g_JobQueue = {}; + + g_TempCount = nil; + g_TempCount = {}; + + g_TempZoneCount = nil; + g_TempZoneCount = {}; +-- +-- First job covers all characters by searching all levels +-- +-- The Job List Works as LIFO; last in, first out +-- local job = {m_MinLevel = 1, m_MaxLevel = MAX_CHARACTER_LEVEL}; +-- InsertJobIntoQueue(job); +--rm +-- for Cataclysm, ... and GM's :) after all following Jobs + local job = CensusPlus_CreateJob( ( MAX_CHARACTER_LEVEL + 1 ) , MAX_LEVEL_DISPLAY, nil, nil, nil , nil ); + InsertJobIntoQueue(job); +---- ending with lvl 1-10 +-- local counter = 0; +-- for counter = 0, 6, 1 do +-- local job = CensusPlus_CreateJob( counter*10 + 1, counter*10+10, nil, nil, nil , nil ); +-- InsertJobIntoQueue(job); +-- end +---- do 71-79 before the above jobs +-- job = CensusPlus_CreateJob( 71, 79, nil, nil, nil , nil ); +-- InsertJobIntoQueue(job); +---- do 80-80 before the above jobs +-- job = CensusPlus_CreateJob( 80, 80, nil, nil, nil , nil ); +-- InsertJobIntoQueue(job); + +-- ending with lvl MAX_CHARACTER_LEVEL + local counter = MAX_CHARACTER_LEVEL; + local LowCounter = counter; + local LowCharDetailLevel = 3; + local LevelStep = 10; + + + local job = CensusPlus_CreateJob( counter, counter, nil, nil, nil , nil ); + InsertJobIntoQueue(job); + counter = counter - 1; + while (counter > LowCharDetailLevel) do + LowCounter = counter - LevelStep + 1 ; + if (LowCounter <= LowCharDetailLevel) then + LowCounter = LowCharDetailLevel +1 ; + end + local job = CensusPlus_CreateJob( LowCounter, counter, nil, nil, nil , nil ); + InsertJobIntoQueue(job); + counter = LowCounter - 1 ; + end + while (counter > 0) do + LowCounter = counter ; + local job = CensusPlus_CreateJob( LowCounter, counter, nil, nil, nil , nil ); + InsertJobIntoQueue(job); + counter = LowCounter - 1 ; + end +------------------ + + +-- for counter = 60, MAX_CHARACTER_LEVEL, 1 do +-- local job = CensusPlus_CreateJob( counter, counter, nil, nil, nil , nil ); +-- InsertJobIntoQueue(job); +-- end + +-- Test inserts +-- local job = CensusPlus_CreateJob( 11, 12, "Troll", nil, nil , nil ); +-- InsertJobIntoQueue(job); + g_IsCensusPlusInProgress = true; + g_WaitingForWhoUpdate = false; + g_CensusPlusManuallyPaused = false; + + local hour, minute = GetGameTime(); + g_TakeHour = hour; + g_ResetHour = true; + + wholib = wholib or LibStub:GetLibrary("LibWho-2.0", true); + -- + -- Subvert WhoLib + -- + if( wholib ) then + -- + -- Be prepared to subvert the WhoLib mechanic + -- +-- g_WhoLibSubvert = SlashCmdList["WHO"]; +-- SlashCmdList["WHO"] = CensusPlus_WhoHandler; +-- +-- g_WhoLibSendWhoSubvert = SendWho; +-- SendWho = WhoLibByALeX.hooks.SendWho; +-- +-- g_WhoLibResultSubvert = WhoLibByALeX.WHO_LIST_UPDATE; +-- g_WhoLibChatSubvert = WhoLibByALeX.CHAT_MSG_SYSTEM; +-- g_WhoLibAskWhoSubvert = WhoLibByALeX.AskWho; +-- +-- WhoLibByALeX.WHO_LIST_UPDATE = function( args ) end +-- WhoLibByALeX.CHAT_MSG_SYSTEM = function( args ) end +-- WhoLibByALeX.AskWho = function( args ) end + + CensusPlus_Msg( "Using WhoLib" ); + + + --wholib.RegisterCallback("CensusPlus", "WHOLIB_QUERY_RESULT", CensusPlus_WhoLibEvent) + + end + end + CensusPlusTakeButton:SetText( CENSUSPlus_PAUSE ); +end + +----------------------------------------------------------------------------------- +-- +-- Stop a CensusPlus +-- +----------------------------------------------------------------------------------- +function CensusPlus_StopCensus( ) + if (g_IsCensusPlusInProgress) then + CensusPlusTakeButton:SetText( CENSUSPlus_TAKE ); + CensusPlusTakeGuildButton:SetText( CENSUSPlus_TAKEGUILD.." \""..CensusPlus_MYGUILD.."\"" ); CensusPlusTakeGuildButton:SetText( CENSUSPlus_TAKEGUILD.." \""..CensusPlus_MYGUILD.."\"" ); + g_CensusPlusManuallyPaused = false; + + CensusPlusScanProgress:SetText( CENSUSPlus_SCAN_PROGRESS_0 ); + + g_JobQueue = {}; + g_JobQueue = nil; + g_JobQueue = {}; + + CensusPlus_DisplayResults( ); + + -- Clean up the times + CensusPlus_PruneTimes(); + +-- if( wholib ) then +-- SlashCmdList["WHO"] = g_WhoLibSubvert; +-- +-- SendWho = g_WhoLibSendWhoSubvert; +-- WhoLibByALeX.WHO_LIST_UPDATE = g_WhoLibResultSubvert; +-- WhoLibByALeX.CHAT_MSG_SYSTEM = g_WhoLibChatSubvert; +-- WhoLibByALeX.AskWho = g_WhoLibAskWhoSubvert; + + +-- CensusPlus_Msg( "Unregistering with WhoLib" ); + + --wholib.UnregisterAllCallbacks("CensusPlus") +-- end + + else + CensusPlus_Msg(CENSUSPlus_NOCENSUS); + end +end + +----------------------------------------------------------------------------------- +-- +-- Display Census results +-- +----------------------------------------------------------------------------------- +function CensusPlus_DisplayResults( ) + -- + -- We are all done, report our results + -- + g_IsCensusPlusInProgress = false; + + + -- + -- Finish our timer + -- + local total_time = time() - g_CensusPlus_StartTime; + + CensusPlus_Msg(format(CENSUSPlus_FINISHED, g_NumNewCharacters, g_NumUpdatedCharacters, SecondsToTime( total_time ))); + ChatFrame1:AddMessage(CENSUSPlus_UPLOAD, 0.5, 1.0, 1.0); + + CensusPlus_UpdateView(); + g_LastCensusRun = time(); + + CensusPlusTakeButton:SetText( CENSUSPlus_TAKE ); + CensusPlusTakeGuildButton:SetText( CENSUSPlus_TAKEGUILD.." \""..CensusPlus_MYGUILD.."\"" ); +end + +----------------------------------------------------------------------------------- +-- +-- Create a who command text for the input job +-- +----------------------------------------------------------------------------------- +function CensusPlus_CreateWhoText(job) + local whoText = ""; + local race = job.m_Race; + if (race ~= nil) then + whoText = whoText.." r-\""..race.."\""; + end + + local class = job.m_Class; + if (class ~= nil) then + whoText = whoText.." c-\""..class.."\""; + end + + local minLevel = tostring( job.m_MinLevel ); + if (minLevel == nil) then + minLevel = 1; + end + local maxLevel = job.m_MaxLevel; + if (maxLevel == nil) then + maxLevel = MAX_CHARACTER_LEVEL; + end + whoText = whoText.." ".. minLevel .."-".. maxLevel; + + local zoneLetter = job.m_zoneLetter; + if ( zoneLetter ~= nil) then + whoText = whoText.." z-"..zoneLetter; + end + + local letter = job.m_Letter; + if( letter ~= nil ) then + whoText = whoText.." n-"..letter; + end +--rmg + local guild = job.m_Guild; + if( guild ~= nil ) then + whoText = whoText.." g-\""..guild.."\""; + end + + return whoText; +end + +----------------------------------------------------------------------------------- +-- +-- Create a job +-- +----------------------------------------------------------------------------------- +function CensusPlus_CreateJob( minLevel, maxLevel, race, class, letter, guild ) + local job = {}; + job.m_MinLevel = minLevel; + job.m_MaxLevel = maxLevel; + job.m_Race = race; + job.m_Class = class; + job.m_Letter = letter; + job.m_Guild = guild; + +CensusPlus_DumpJob( job ); + + return job; +end + +----------------------------------------------------------------------------------- +-- +-- Debug function do dump a job +-- +----------------------------------------------------------------------------------- +function CensusPlus_DumpJob( job ) + local whoText = ""; + local race = job.m_Race; + if (race ~= nil) then + whoText = whoText.." R: "..race; + end + + local class = job.m_Class; + if (class ~= nil) then + whoText = whoText.." C: "..class; + end + + local minLevel = job.m_MinLevel; + if (minLevel ~= nil) then + whoText = whoText.." min: ".. minLevel; + end + + local maxLevel = job.m_MaxLevel; + if (maxLevel ~= nil) then + whoText = whoText.." max: ".. maxLevel; + end + + local zoneLetter = job.m_zoneLetter; + if ( zoneLetter ~= nil) then + whoText = whoText.." Z: "..zoneLetter; + end + + local letter = job.m_Letter; + if( letter ~= nil ) then + whoText = whoText.." N: "..letter; + end +--rmg + local guild = job.m_Guild; + if( guild ~= nil ) then + whoText = whoText.." G: \""..guild.."\""; + end + +--CensusPlus_Msg( "JOB DUMP: " .. whoText ); +end + +----------------------------------------------------------------------------------- +-- +-- Called on events +-- +----------------------------------------------------------------------------------- +function CensusPlus_OnEvent(event,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9) + + if( arg1 == nil ) then + arg1 = "nil" + end + if( arg2 == nil ) then + arg2 = "nil" + end + if( arg3 == nil ) then + arg3 = "nil" + end + if( arg4 == nil ) then + arg4 = "nil" + end + + -- + -- If we have not been initialized, do nothing + -- + if (g_CensusPlusInitialized == false) then + return + end + +-- CensusPlus_Msg( "Message =>" .. event ); + + -- + -- WHO_LIST_UPDATE + -- + if( event == "TRAINER_SHOW" or event == "MERCHANT_SHOW" or event == "TRADE_SHOW" or event == "GUILD_REGISTRAR_SHOW" + or event == "AUCTION_HOUSE_SHOW" or event == "BANKFRAME_OPENED" or event == "QUEST_DETAIL" ) then + if( g_IsCensusPlusInProgress ) then + g_CensusPlusPaused = true; + end + elseif( event == "TRAINER_CLOSED" or event == "MERCHANT_CLOSED" or event == "TRADE_CLOSED" or event == "GUILD_REGISTRAR_CLOSED" + or event == "AUCTION_HOUSE_CLOSED" or event == "BANKFRAME_CLOSED" or event == "QUEST_FINISHED" ) then + if( g_IsCensusPlusInProgress ) then + g_CensusPlusPaused = false; + end + elseif (event == "GUILD_ROSTER_SHOW") then + -- + -- Process Guild info + -- +--CensusPlus_Msg( " SHOW GUILD " ); + CensusPlus_ProcessGuildResults(); + + elseif (event == "GUILD_ROSTER_UPDATE") then + -- + -- Process Guild info + -- +--CensusPlus_Msg( " UPDATE GUILD " ); + if(not CP_updatingGuild ) then + CP_updatingGuild = 1; + CensusPlus_ProcessGuildResults(); + CP_updatingGuild = nil; + end + + + elseif ( event == "VARIABLES_LOADED" ) then + -- + -- Initialize our variables + -- + CensusPlus_InitializeVariables(); + elseif( event == "ZONE_CHANGED_NEW_AREA" ) then + -- + -- We need to check to see if we entered a battleground + -- + CensusPlus_CheckForBattleground(); + elseif( event == "UPDATE_BATTLEFIELD_STATUS" ) then + CensusPlus_UpdateBattleGroundInfo(); + end +end + +----------------------------------------------------------------------------------- +-- +-- ProcessTarget -- called when UNIT_FOCUS event is fired +-- +----------------------------------------------------------------------------------- +function CensusPlus_ProcessTarget( unit ) + -- have to totally disable this due to X-server bg's + if( true ) then + return; + end + + if ( UnitIsPlayer(unit) == nil or (not UnitIsPlayer(unit)) or unit == "player" or unit == nil ) then + return; + end + + local sightingData = CensusPlus_CollectSightingData( unit ); + if( sightingData == nil or sightingData.faction == nil ) then + return + end + + if (sightingData ~= nil and (sightingData.faction == "Alliance" or sightingData.faction == "Horde")) then + + -- + -- Do a quick check to see if this is an MC'd person + -- + if( sightingData.faction ~= g_FactionCheck[sightingData.race] ) then + return; + end + + + if( sightingData.guild == nil ) then + sightingData.guild = ""; + end + -- + -- Get the portion of the database for this server + -- + local realmName = g_CensusPlusLocale .. GetCVar("realmName"); + local realmDatabase = CensusPlus_Database["Servers"][realmName]; + if (realmDatabase == nil) then + CensusPlus_Database["Servers"][realmName] = {}; + realmDatabase = CensusPlus_Database["Servers"][realmName]; + end + + -- + -- Get the portion of the database for this faction + -- + local factionDatabase = realmDatabase[sightingData.faction]; + if (factionDatabase == nil) then + realmDatabase[sightingData.faction] = {}; + factionDatabase = realmDatabase[sightingData.faction]; + end + + -- + -- Get racial database + -- + local raceDatabase = factionDatabase[sightingData.race]; + if (raceDatabase == nil) then + factionDatabase[sightingData.race] = {}; + raceDatabase = factionDatabase[sightingData.race]; + end + + -- + -- Get class database + -- + local classDatabase = raceDatabase[sightingData.class]; + if (classDatabase == nil) then + raceDatabase[sightingData.class] = {}; + classDatabase = raceDatabase[sightingData.class]; + end + + -- + -- Get this player's entry + -- + local entry = classDatabase[sightingData.name]; + if (entry == nil) then + classDatabase[sightingData.name] = {}; + entry = classDatabase[sightingData.name]; + end + + -- + -- Update the information + -- + entry[1] = sightingData.level; + entry[2] = sightingData.guild; + entry[3] = CensusPlus_DetermineServerDate() .. ""; + + entry[7] = CensusPlus_DetermineServerDate() .. ""; + + -- + -- Update their rank info + -- + rankNumber = UnitPVPRank(unit); + if( rankNumber ~= 0 ) then +-- rankName= GetPVPRankInfo( rankNumber ) + entry[8] = rankNumber; -- slot 8 will be current rank + else + entry[8] = 0; -- slot 8 will be current rank + end + + -- + -- Trigger an update on the inspect honor frame to get honor information + -- + if ( UnitIsPlayer( unit ) and sightingData.level >= 30 + and CheckInteractDistance( unit, 1) + and not UnitIsUnit("player", unit) and unit == "target" + and g_CensusPlusLastTarget == nil + and g_CensusPlusLastTargetName == nil + and CensusPlus_IsInspectLoaded() ) then + NotifyInspect(unit); + InspectFrame.unit = unit; + if ( not HasInspectHonorData() ) then + g_CensusPlusLastTarget = entry; + g_CensusPlusLastTargetName = sightingData.name; + RequestInspectHonorData(); + else + InspectHonorFrame_Update(); + end + end + end +end + + +----------------------------------------------------------------------------------- +-- +-- Gather targeting data +-- +----------------------------------------------------------------------------------- +function CensusPlus_CollectSightingData(unit) + if ( UnitIsPlayer(unit) and UnitName(unit) ~= "Unknown Entity" ) then + return { + name=UnitName(unit), + level=UnitLevel(unit), + sex=UnitSex(unit), + race=UnitRace(unit), + class=UnitClass(unit), + guild=GetGuildInfo(unit), + faction=UnitFactionGroup(unit) + }; + else + return nil; + end +end + + +----------------------------------------------------------------------------------- +-- +-- Initialize our primary save variables -- called when VARIABLES_LOADED event is fired +-- +----------------------------------------------------------------------------------- +function CensusPlus_InitializeVariables() + + if( CensusPlus_Database["Servers"] == nil ) then + CensusPlus_Database["Servers"] = {}; + end + + if( CensusPlus_Database["Times"] ~= nil ) then + CensusPlus_Database["Times"] = nil; + end + + if( CensusPlus_Database["TimesPlus"] == nil ) then + CensusPlus_Database["TimesPlus"] = {}; + end + + if( CensusPlus_BGInfo == nil ) then + CensusPlus_BGInfo = {}; + end + + -- + -- Make sure info is last so it will be first in the output so we can grab the version number + -- + if( CensusPlus_Database["Info"] == nil ) then + CensusPlus_Database["Info"] = {}; + end + CensusPlus_Database["Info"]["Version"] = CensusPlus_VERSION; + CensusPlus_Database["Info"]["ClientLocale"] = GetLocale(); + if( CensusPlus_Database["Info"]["ClientLocale"] == "enUS" and GetCVar("realmList") == "eu.logon.worldofwarcraft.com" ) then + CensusPlus_Database["Info"]["ClientLocale"] = "enGB"; + end + if( CensusPlus_Database["Info"]["LoginServer"] ~= nil ) then + -- already present, make sure it equals, and if + -- not, force a purge + if( CensusPlus_Database["Info"]["LoginServer"] ~= GetCVar("realmList") ) then + -- + -- We have to nuke the data in the case that someone is playing on both + -- US and EU servers + -- + CensusPlus_DoPurge() + end + end + CensusPlus_Database["Info"]["LoginServer"] = GetCVar("realmList"); + + local firstVersionRun = CensusPlus_Database["Info"][g_InterfaceVersion]; + local localeSetting = CensusPlus_Database["Info"]["Locale"]; + if( localeSetting == "??" ) then + -- We had problems previously.. we must purge =( + CensusPlus_DoPurge(); + localeSetting = nil; + end + + -- + -- Have a new way to detect locale, yay! + -- + if( CensusPlus_Database["Info"]["ClientLocale"] == "enUS" ) then + CensusPlus_VerifyLocale( "US" ); + CensusPlus_Database["Info"]["Locale"] = "US"; + elseif( CensusPlus_Database["Info"]["ClientLocale"] == "enGB" or + CensusPlus_Database["Info"]["ClientLocale"] == "frFR" or + CensusPlus_Database["Info"]["ClientLocale"] == "deDE" or + CensusPlus_Database["Info"]["ClientLocale"] == "esES" ) then + CensusPlus_VerifyLocale( "EU" ); + CensusPlus_Database["Info"]["Locale"] = "EU"; + else + CensusPlus_VerifyLocale( "??" ); + CensusPlus_Database["Info"]["Locale"] = "??"; + end + + if( firstVersionRun == nil and g_InterfaceVersion == 21000 ) then + -- + -- Clean out all character entries that are irregular + -- + CensusPlus_CleanChars(); + CensusPlus_Database["Info"][g_InterfaceVersion] = true; + end + + local locale = CensusPlus_Database["Info"]["Locale"]; + CensusPlus_SelectLocale( CensusPlus_Database["Info"]["Locale"], true ); + + local miniStart = CensusPlus_Database["Info"]["MiniStart"]; + if( miniStart == nil ) then + miniStart = 0; + end + + if( CensusPlus_Database["Info"]["AutoCensus"] == nil ) then + CensusPlus_Database["Info"]["AutoCensus"] = false; + end + + if( CensusPlus_Database["Info"]["AutoCensusTimer"] == nil ) then + CensusPlus_Database["Info"]["AutoCensusTimer"] = 1800; + end + + if( CensusPlus_Database["Info"]["CensusButtonPosition"] == nil ) then + CensusPlus_Database["Info"]["CensusButtonPosition"] = 370; + end + + if( CensusPlus_Database["Info"]["CensusButtonShown"] == nil ) then + CensusPlus_Database["Info"]["CensusButtonShown"] = 1; + end + + if( CensusPlus_Database["Info"]["CensusButtonShown"] == 1 ) then + CensusButtonFrame:Show(); + else + CensusButtonFrame:Hide(); + end + + if( CensusPlus_Database["Info"]["UseLogBars"] == nil ) then + CensusPlus_Database["Info"]["UseLogBars"] = 1; + end + CP_OptionUseLogarithmicBars:SetChecked( CensusPlus_Database["Info"]["UseLogBars"] ); + + CensusPlus_AutoStart(miniStart); + + if( miniStart ) and (not Khaos) then + CensusPlus_Msg(" V"..CensusPlus_VERSION..CENSUSPlus_MSG1); + end + + g_VariablesLoaded = true; + + CensusPlus_CheckTZ(); + + InitConstantTables(); + + CP_OptionAutoShowMinimapButton:SetChecked(CensusPlus_Database["Info"]["CensusButtonShown"]); +-- CP_SliderButtonPos:SetValue(CensusPlus_Database["Info"]["CensusButtonPosition"]); + + if( CensusPlus_PerCharInfo["PlayFinishSound"] == nil ) then + CensusPlus_PerCharInfo["PlayFinishSound"] = true; + end + + CP_OptionPlaySoundOnCompleteButton:SetChecked( CensusPlus_PerCharInfo["PlayFinishSound"] ); + + if( CensusPlus_PerCharInfo["Verbose"] == nil ) then + CensusPlus_PerCharInfo["Verbose"] = false; + end + + + -- + -- If we are in a guild, attempt to gather the guild roster data + -- + if (IsInGuild()) then + GuildRoster(); + end + + -- + -- Prune times if we have too many + -- + CensusPlus_PruneTimes(); + + -- + -- Prune BG info if we have too many + -- + CensusPlus_PruneBGInfo(); + + -- + -- Check for WhoLib since it does not play nice with C+ + -- + CensusPlus_CheckForWhoLib(); + CensusPlus_CheckForPrat(); + + CensusPlus_Unhandled = nil; + CensusPlus_Unhandled = {}; +end + +function CensusPlus_CheckForWhoLib() + if( WhoLibByALeX and WhoLibByALeX.AskWho ) then + g_WhoLibLoaded = true; + CensusPlus_Msg( "ACE WhoLib detected - WhoLib does not play nice with other mods and as such, some WhoLib functionality must be disabled while a Census scan is in progress." ); + end +end + +function CensusPlus_CheckForPrat() + if( Prat ) then + g_PratLoaded = true; + CensusPlus_Msg( "Prat detected. CensusPlus will attempt to capture the 3 or less /who results that are displayed in chat, but may be unsuccessful." ); + end +end +----------------------------------------------------------------------------------- +-- +-- Call on the update event +-- +----------------------------------------------------------------------------------- +function CensusPlus_OnUpdate() + if( g_VariablesLoaded and g_IsCensusPlusInProgress == false and CensusPlus_Database["Info"]["AutoCensus"] == true and g_LastCensusRun < time() - CensusPlus_Database["Info"]["AutoCensusTimer"] ) then + CensusPlus_Take_OnClick(); + end + + if (g_IsCensusPlusInProgress == true and g_CensusPlusPaused == false and g_CensusPlusManuallyPaused == false ) then + + -- + -- update our progress + -- + local numJobs = table.getn(g_JobQueue); + if( numJobs > 0 ) then + CensusPlusScanProgress:SetText(format(CENSUSPlus_SCAN_PROGRESS, numJobs, CensusPlus_CreateWhoText( g_JobQueue[numJobs] ) )); + end + + if( g_ReturnedZero == true ) then + g_ReturnedZero = false; + -- + -- Determine if there is any more work to do + -- + if (numJobs > 0) then + -- + -- Remove the top job from the queue and send it + -- + local job = g_JobQueue[numJobs]; + table.remove(g_JobQueue); + local whoText = CensusPlus_CreateWhoText(job); + + -- + -- Zap our current job + -- + g_CurrentJob = nil; + + g_CurrentJob = job; + g_WaitingForWhoUpdate = true; + + CensusPlus_SendWho(whoText); + g_WhoAttempts = 0; + else + -- + -- We are all done, hide the friends frame and report our results + -- + if( CensusPlus_PerCharInfo["PlayFinishSound"] ) then + PlaySoundFile("Interface\\AddOns\\CensusPlus\\Sounds\\CensusComplete.ogg") + end + + CensusPlus_DoTimeCounts(); + CensusPlus_DisplayResults(); + end + end + + local now = GetTime(); + local delta = now - g_LastOnUpdateTime; + if (not g_WaitingForWhoUpdate or delta > CensusPlus_UPDATEDELAY) then + g_LastOnUpdateTime = now; + if (g_WaitingForWhoUpdate == true ) then + + -- + -- First check to see if we are waiting for an override + -- + if( g_WaitingForOverrideUpdate == true ) then + CensusPlus_SendWho( g_CensusWhoOverrideMsg ); + else + -- + -- Resend /who command + -- + g_WhoAttempts = g_WhoAttempts + 1; + local whoText = CensusPlus_CreateWhoText(g_CurrentJob); + if( CensusPlus_PerCharInfo["Verbose"] == true ) then + CensusPlus_Msg(CENSUSPlus_WAITING); + end + if( g_WhoAttempts < 2 ) then + CensusPlus_SendWho(whoText); + else + g_WaitingForWhoUpdate = false; + end + end + else + + -- + -- Check to see if we have an override waiting + -- + if( g_CensusWhoOverrideMsg ~= nil ) then + CensusPlus_SendWho( g_CensusWhoOverrideMsg ); + g_WaitingForOverrideUpdate = true; + g_WaitingForWhoUpdate = true; + else + -- + -- Determine if there is any more work to do + -- + local numJobs = table.getn(g_JobQueue); + if (numJobs > 0) then + -- + -- Remove the top job from the queue and send it + -- + local job = g_JobQueue[numJobs]; + table.remove(g_JobQueue); + local whoText = CensusPlus_CreateWhoText(job); + g_CurrentJob = nil; + g_CurrentJob = job; + g_WaitingForWhoUpdate = true; + CensusPlus_SendWho(whoText); + g_WaitingForWhoUpdate = true; + g_WhoAttempts = 0; + else + -- + -- We are all done, hide the friends frame and report our results + -- + if( CensusPlus_PerCharInfo["PlayFinishSound"] ) then + PlaySoundFile("Interface\\AddOns\\CensusPlus\\Sounds\\CensusComplete.ogg") + end + + CensusPlus_DoTimeCounts(); + CensusPlus_DisplayResults(); + end + end + end + end + end +end + +----------------------------------------------------------------------------------- +-- +-- Take final tally +-- +----------------------------------------------------------------------------------- +function CensusPlus_DoTimeCounts() + + if( g_CensusPlusLocale == "N/A" ) then + return; + end + + -- Zero out the times + g_TimeDatabase[CENSUSPlus_DRUID] = 0; + g_TimeDatabase[CENSUSPlus_HUNTER] = 0; + g_TimeDatabase[CENSUSPlus_MAGE] = 0; + g_TimeDatabase[CENSUSPlus_PRIEST] = 0; + g_TimeDatabase[CENSUSPlus_ROGUE] = 0; + g_TimeDatabase[CENSUSPlus_WARLOCK] = 0; + g_TimeDatabase[CENSUSPlus_WARRIOR] = 0; + g_TimeDatabase[CENSUSPlus_SHAMAN] = 0; + g_TimeDatabase[CENSUSPlus_PALADIN] = 0; + g_TimeDatabase[CENSUSPlus_DEATHKNIGHT] = 0; + g_TimeDatabase[CENSUSPlus_WarsongGulch] = 0; + g_TimeDatabase[CENSUSPlus_AlteracValley]= 0; + g_TimeDatabase[CENSUSPlus_ArathiBasin] = 0; + + g_NumUpdatedCharacters = 0; + + for charName, charClass in pairs(g_TempCount) do + if (CENSUSPlusFemale[charClass] ~= nil) then + charClass = CENSUSPlusFemale[charClass]; + end + g_TimeDatabase[charClass] = g_TimeDatabase[charClass] + 1; + g_NumUpdatedCharacters = g_NumUpdatedCharacters + 1; + end + + -- Collect some zone info + for charName, charZone in pairs(g_TempZoneCount) do + if( charZone == CENSUSPlus_WarsongGulch or charZone == CENSUSPlus_AlteracValley or charZone == CENSUSPlus_ArathiBasin ) then + g_TimeDatabase[charZone] = g_TimeDatabase[charZone] + 1; + end + end + + + local realmName = g_CensusPlusLocale .. GetCVar("realmName"); + if( CensusPlus_Database["TimesPlus"][realmName] == nil ) then + CensusPlus_Database["TimesPlus"][realmName]= {}; + end + + if( CensusPlus_Database["TimesPlus"][realmName][UnitFactionGroup("player")] == nil ) then + CensusPlus_Database["TimesPlus"][realmName][UnitFactionGroup("player")] = {}; + end + + local hour, minute = GetGameTime(); +-- CensusPlus_Database["TimesPlus"][realmName][UnitFactionGroup("player")]["" .. hour .. ""] = g_TimeDatabase; + CensusPlus_Database["TimesPlus"][realmName][UnitFactionGroup("player")][CensusPlus_DetermineServerDate() .. "&" .. hour .. ":" .. minute .. ":00"] = + g_TimeDatabase[CENSUSPlus_DRUID] .. "&" .. + g_TimeDatabase[CENSUSPlus_HUNTER] .. "&" .. + g_TimeDatabase[CENSUSPlus_MAGE] .. "&" .. + g_TimeDatabase[CENSUSPlus_PRIEST] .. "&" .. + g_TimeDatabase[CENSUSPlus_ROGUE] .. "&" .. + g_TimeDatabase[CENSUSPlus_WARLOCK] .. "&" .. + g_TimeDatabase[CENSUSPlus_WARRIOR] .. "&" .. + g_TimeDatabase[CENSUSPlus_SHAMAN] .. "&" .. + g_TimeDatabase[CENSUSPlus_PALADIN] .. "&" .. + g_TimeDatabase[CENSUSPlus_DEATHKNIGHT] .. "&" .. + g_TimeDatabase[CENSUSPlus_WarsongGulch] .. "&" .. + g_TimeDatabase[CENSUSPlus_AlteracValley] .. "&" .. + g_TimeDatabase[CENSUSPlus_ArathiBasin]; +end + +----------------------------------------------------------------------------------- +-- +-- Add the contents of the guild results to the database +-- +----------------------------------------------------------------------------------- +function CensusPlus_ProcessGuildResults() + + if( g_VariablesLoaded == false ) then + return; + end + + if( CensusPlus_Database["Info"]["Locale"] == nil ) then + return; + end + + if( g_CensusPlusLocale == "N/A" ) then + return; + end + + + -- + -- Grab temp var + -- + local showOfflineTemp = GetGuildRosterShowOffline(); + SetGuildRosterShowOffline(1); + + + -- + -- Walk through the guild info + -- + local numGuildMembers = GetNumGuildMembers(); +-- CensusPlus_Msg("Processing "..numGuildMembers.." guild members."); + + local realmName = g_CensusPlusLocale .. GetCVar("realmName"); + CensusPlus_Database["Guilds"] = nil; + if( CensusPlus_Database["Guilds"] == nil ) then + CensusPlus_Database["Guilds"] = {}; + end + + if (CensusPlus_Database["Guilds"][realmName] == nil) then + CensusPlus_Database["Guilds"][realmName] = {}; + end + + local guildRealmDatabase = CensusPlus_Database["Guilds"][realmName]; + if (guildRealmDatabase == nil) then + CensusPlus_Database["Guilds"][realmName] = {}; + guildRealmDatabase = CensusPlus_Database["Guilds"][realmName]; + end + + local factionGroup = UnitFactionGroup("player"); + if( factionGroup == nil ) then + CensusPlus_Database["Guilds"] = nil; + SetGuildRosterShowOffline(showOfflineTemp); + return; + end + + local factionDatabase = guildRealmDatabase[factionGroup]; + if (factionDatabase == nil) then + guildRealmDatabase[factionGroup] = {}; + factionDatabase = guildRealmDatabase[factionGroup]; + end + + CensusPlus_Database["Guilds"][realmName][factionGroup] = nil; + CensusPlus_Database["Guilds"][realmName][factionGroup] = {}; + + factionDatabase = CensusPlus_Database["Guilds"][realmName][factionGroup]; + + local Ginfo = GetGuildInfo("player"); + if( Ginfo == nil ) then + CensusPlus_Database["Guilds"] = nil; + SetGuildRosterShowOffline(showOfflineTemp); + return; + end + local guildDatabase = factionDatabase[Ginfo]; + if (guildDatabase == nil) then + factionDatabase[Ginfo] = {}; + guildDatabase = factionDatabase[Ginfo]; + end + + local info = guildDatabase["GuildInfo"]; + if (info == nil) then + guildDatabase["GuildInfo"] = {}; + info = guildDatabase["GuildInfo"]; + end + + info["Update"] = date( "%m-%d-%Y", time()) .. ""; + info["ShowOnline"] = 1; -- Variable comes from FriendsFrame + + guildDatabase["Members"] = nil; + guildDatabase["Members"] = {}; + + local members = guildDatabase["Members"]; + + for index = 1, numGuildMembers, 1 do + local name, rank, rankIndex, level, class, zone, note, officernote, online, status = GetGuildRosterInfo(index); + + if( members[name] == nil ) then + members[name] = {}; + end + +-- CensusPlus_Msg( "Name =>" .. name ); +-- CensusPlus_Msg( "rank =>" .. rank ); +-- CensusPlus_Msg( "rankIndex =>" .. rankIndex ); +-- CensusPlus_Msg( "level =>" .. level ); +-- CensusPlus_Msg( "class =>" .. class ); + members[name]["Rank"] = rank; + members[name]["RankIndex"] = rankIndex; + members[name]["Level"]= level; + members[name]["Class"]= class; +-- members[name]["Zone"]= zone; +-- members[name]["Note"]= CensusPlus_SafeSet( note ); +-- members[name]["OfficerNote"]= CensusPlus_SafeSet( officernote ); +-- members[name]["Online"]= online; +-- members[name]["Status"]= CensusPlus_SafeSet( status ); + end + + SetGuildRosterShowOffline(showOfflineTemp); +end + +function CensusPlus_SafeCheck( param ) + if( param == nil ) then + return "nil"; + else + return param; + end +end + +----------------------------------------------------------------------------------- +-- +-- Add the contents of the who results to the database +-- +----------------------------------------------------------------------------------- +function CensusPlus_ProcessWhoResults() + + -- + -- If we are in a BG then stop a census + -- + if( g_CurrentlyInBG and g_IsCensusPlusInProgress ) then + g_LastCensusRun = time()-600; + CensusPlus_Msg(CENSUSPlus_ISINBG); + CensusPlus_StopCensus( ); + end + + if( g_CensusPlusLocale == "N/A" ) then + return; + end + + -- + -- Get the portion of the database for this server + -- + local realmName = g_CensusPlusLocale .. GetCVar("realmName"); + local realmDatabase = CensusPlus_Database["Servers"][realmName]; + if (realmDatabase == nil) then + CensusPlus_Database["Servers"][realmName] = {}; + realmDatabase = CensusPlus_Database["Servers"][realmName]; + end + + -- + -- Get the portion of the database for this faction + -- + local factionGroup = UnitFactionGroup("player"); + if( factionGroup == nil ) then + return + end + + local factionDatabase = realmDatabase[factionGroup]; + if (factionDatabase == nil) then + realmDatabase[factionGroup] = {}; + factionDatabase = realmDatabase[factionGroup]; + end + + -- + -- Walk through all the who results + -- + local numWhoResults = GetNumWhoResults(); + if( CensusPlus_PerCharInfo["Verbose"] == true ) then + CensusPlus_Msg(format(CENSUSPlus_PROCESSING, numWhoResults)); + end + for i = 1, numWhoResults, 1 do + -- + -- Get who result entry + -- + local name, guild, level, race, class, zone, group = GetWhoInfo(i); + + if (CENSUSPlusFemale[race] ~= nil) then + race = CENSUSPlusFemale[race]; + end + + if (CENSUSPlusFemale[class] ~= nil) then + class = CENSUSPlusFemale[class]; + end + + -- + -- Test the name for possible color coding + -- + -- for example |cffff0000Rollie|r + local karma_check = string.find( name, "|cff" ); + if( karma_check ~= nil ) then + name = string.sub( name, 11, -3 ); + end + + -- + -- Further check for problematic chars + -- + local pattern = "[0-9\| -]"; + if( string.find( name, pattern ) ~= nil ) then + if( not g_ProblematicMessageShown ) then + CensusPlus_Msg( "This name is problematic => " .. name .. ", name skipped. This message will only be shown once." ); + g_ProblematicMessageShown = true; + end + return; + end + + + -- + -- Get racial database + -- + local raceDatabase = factionDatabase[race]; + if (raceDatabase == nil) then + factionDatabase[race] = {}; + raceDatabase = factionDatabase[race]; + end + + -- + -- Get class database + -- + local classDatabase = raceDatabase[class]; + if (classDatabase == nil) then + raceDatabase[class] = {}; + classDatabase = raceDatabase[class]; + end + + -- + -- Get this player's entry + -- + local entry = classDatabase[name]; + if (entry == nil) then + classDatabase[name] = {}; + entry = classDatabase[name]; + g_NumNewCharacters = g_NumNewCharacters + 1; + end + + -- + -- Update the information + -- + entry[1] = level; + entry[2] = guild; +-- local hour, minute = GetGameTime(); + entry[3] = CensusPlus_DetermineServerDate() .. ""; + + g_TempCount[name] = class; + g_TempZoneCount[name] = zone; + + end +-- CensusPlus_UpdateView(); +end + + +---------------------------------------------------------------------------------- +-- +-- Process a single entry +-- +--------------------------------------------------------------------------------- +function WR_ProcessSingleEntry( name, level, race, class, guild, zone ) + +CensusPlus_Msg2( "Processing " .. name ); + + if( g_CensusPlusLocale == "N/A" ) then + return; + end + + if (CENSUSPlusFemale[race] ~= nil) then + race = CENSUSPlusFemale[race]; + end + + if (CENSUSPlusFemale[class] ~= nil) then + class = CENSUSPlusFemale[class]; + end + + -- + -- Get the portion of the database for this server + -- + local realmName = g_CensusPlusLocale .. GetCVar("realmName"); + local realmDatabase = CensusPlus_Database["Servers"][realmName]; + if (realmDatabase == nil) then + CensusPlus_Database["Servers"][realmName] = {}; + realmDatabase = CensusPlus_Database["Servers"][realmName]; + end + + -- + -- Get the portion of the database for this faction + -- + local factionGroup = UnitFactionGroup("player"); + if( factionGroup == nil ) then + return + end + + local factionDatabase = realmDatabase[factionGroup]; + if (factionDatabase == nil) then + realmDatabase[factionGroup] = {}; + factionDatabase = realmDatabase[factionGroup]; + end + + -- + -- Remove the trailing ] that I can't remove through patterns + -- +-- local oldname = name; +-- name = string.sub( oldname, 1, string.len(oldname) - 3 ); + + level = tonumber( level ); + + -- + -- Test the name for possible color coding + -- + -- for example |cffff0000Rollie|r + local karma_check = string.find( name, "|cff" ); + if( karma_check ~= nil ) then + name = string.sub( name, 11, -3 ); + end + + local pattern = "[0-9\| :]"; + if( string.find( name, pattern ) ~= nil ) then + if( not g_ProblematicMessageShown ) then + CensusPlus_Msg( "This name is problematic => " .. name .. ", name skipped. This message will only be shown once." ); + end + return; + end + + -- + -- Do a race check just to be sure this is working + -- + if( g_FactionCheck[race] == nil ) then + CensusPlus_Msg( "Found an unknown race (" .. race .. "), please tell Rollie at WarcraftRealms.com" ); + return; + end + + -- + -- Get racial database + -- + local raceDatabase = factionDatabase[race]; + if (raceDatabase == nil) then + factionDatabase[race] = {}; + raceDatabase = factionDatabase[race]; + end + + -- + -- Get class database + -- + local classDatabase = raceDatabase[class]; + if (classDatabase == nil) then + raceDatabase[class] = {}; + classDatabase = raceDatabase[class]; + end + + -- + -- Get this player's entry + -- + local entry = classDatabase[name]; + if (entry == nil) then + classDatabase[name] = {}; + entry = classDatabase[name]; + g_NumNewCharacters = g_NumNewCharacters + 1; + end + + -- + -- Update the information + -- + entry[1] = level; + entry[2] = guild; +-- local hour, minute = GetGameTime(); + entry[3] = CensusPlus_DetermineServerDate() .. ""; + + g_TempCount[name] = class; + g_TempZoneCount[name] = zone; + +-- CensusPlus_Msg2( "Processed " .. name ); +end + +---------------------------------------------------------------------------------- +-- +-- Find a guild in the CensusPlus_Guilds array by name +-- +--------------------------------------------------------------------------------- +local function FindGuildByName(name) + local i; + local size = table.getn(CensusPlus_Guilds); + for i = 1, size, 1 do + local entry = CensusPlus_Guilds[i]; + if (entry.m_Name == name) then + return i; + end + end + return nil; +end + +---------------------------------------------------------------------------------- +-- +-- Add up the total character XP and count +-- +--------------------------------------------------------------------------------- +local g_AccumulateGuildTotals = true; +local function TotalsAccumulator(name, level, guild) + -- + -- Add character to our player list + -- + CensusPlus_AddPlayerToList( name, level, guild ); + + if( g_TotalCharacterXPPerLevel[level] ) then + InitConstantTables(); + end + + local totalCharacterXP = g_TotalCharacterXPPerLevel[level]; + if( totalCharacterXP == nil ) then + totalCharacterXP = 0; + end + if( g_TotalCharacterXP == nil ) then + g_TotalCharacterXP = 0; + end + g_TotalCharacterXP = g_TotalCharacterXP + totalCharacterXP; + g_TotalCount = g_TotalCount + 1; + if (g_AccumulateGuildTotals and (guild ~= nil)) then + local index = FindGuildByName(guild); + if (index == nil) then + local size = table.getn(CensusPlus_Guilds); + index = size + 1; + CensusPlus_Guilds[index] = {m_Name = guild, m_TotalCharacterXP = 0, m_Count = 0}; + end + local entry = CensusPlus_Guilds[index]; + entry.m_TotalCharacterXP = entry.m_TotalCharacterXP + totalCharacterXP; + entry.m_Count = entry.m_Count + 1; + end +end + +---------------------------------------------------------------------------------- +-- +-- Predicate function which can be used to compare two guilds for sorting +-- +--------------------------------------------------------------------------------- +local function GuildPredicate(lhs, rhs) + -- + -- nil references are always less than + -- + if (lhs == nil) then + if (rhs == nil) then + return false; + else + return true; + end + elseif (rhs == nil) then + return false; + end + -- + -- Sort by total XP first + -- + if (rhs.m_TotalCharacterXP < lhs.m_TotalCharacterXP) then + return true; + elseif (lhs.m_TotalCharacterXP < rhs.m_TotalCharacterXP) then + return false; + end + -- + -- Sort by name + -- + if (lhs.m_Name < rhs.m_Name) then + return true; + elseif (rhs.m_Name < lhs.m_Name) then + return false; + end + + -- + -- identical + -- + return false; +end + + +---------------------------------------------------------------------------------- +-- +-- Another accumulator for adding up XP and counts +-- +--------------------------------------------------------------------------------- +local g_AccumulatorCount = 0; +local g_AccumulatorXPTotal = 0; +local function CensusPlus_Accumulator(name, level, guild) + if( g_TotalCharacterXPPerLevel[level] == nil ) then + InitConstantTables(); + end + local totalCharacterXP = g_TotalCharacterXPPerLevel[level]; + if( totalCharacterXP == nil or g_TotalCharacterXPPerLevel[level] == nil ) then + return; + end + g_AccumulatorXPTotal = g_AccumulatorXPTotal + totalCharacterXP; + g_AccumulatorCount = g_AccumulatorCount + 1; +end + +---------------------------------------------------------------------------------- +-- +-- Reset the above accumulator +-- +--------------------------------------------------------------------------------- +function CensusPlus_ResetAccumulator() + g_AccumulatorCount = 0; + g_AccumulatorXPTotal = 0; +end + + +---------------------------------------------------------------------------------- +-- +-- Search the character database using the search criteria and update display +-- +--------------------------------------------------------------------------------- +function CensusPlus_UpdateView() + + -- + -- No need to do anything if the window is not open + -- + if( not CensusPlus:IsVisible() ) then + return; + end + + if( g_CensusPlusLocale == "N/A" ) then + return; + end + + -- + -- Get realm and faction + -- + local realmName = g_CensusPlusLocale .. GetCVar("realmName"); + if( realmName == nil ) then + return; + end + CensusPlusRealmName:SetText(format(CENSUSPlus_REALMNAME, realmName)); + + local factionGroup = UnitFactionGroup("player"); + if( factionGroup == nil ) then + return; + end + + CensusPlusFactionName:SetText(format(CENSUSPlus_FACTION, factionGroup)); + + if( CensusPlus_Database["Info"]["Locale"] ~= nil ) then + CensusPlusLocaleName:SetText(format(CENSUSPlus_LOCALE, CensusPlus_Database["Info"]["Locale"])); + end + + local guildKey = nil; + local raceKey = nil; + local classKey = nil; + local levelKey = nil; + g_TotalCharacterXP = 0; + g_TotalCount = 0; + + -- + -- Has the user selected a guild? + -- + if (g_GuildSelected ~= nil ) then + guildKey = g_GuildSelected; + end + if (g_RaceSelected > 0) then + local thisFactionRaces = CensusPlus_GetFactionRaces(factionGroup); + raceKey = thisFactionRaces[g_RaceSelected]; + end + if (g_ClassSelected > 0) then + local thisFactionClasses = CensusPlus_GetFactionClasses(factionGroup); + classKey = thisFactionClasses[g_ClassSelected]; + end + if (g_LevelSelected > 0 or g_LevelSelected < 0) then + levelKey = g_LevelSelected; + end + + debugprofilestart(); + + -- + -- Has the user added any search criteria? + -- + if ((guildKey ~= nil) or (raceKey ~= nil) or (classKey ~= nil) or (levelKey ~= nil)) then + -- + -- Get totals for this criteria + -- + CensusPlus_Guilds = {}; + g_AccumulateGuildTotals = true; + CensusPlus_ForAllCharacters(realmName, factionGroup, raceKey, classKey, guildKey, levelKey, TotalsAccumulator); + + if( CensusPlus_EnableProfiling ) then + CensusPlus_Msg( "PROFILE: Time to do calcs 1 " .. debugprofilestop() / 1000000000 ); + debugprofilestart(); + end + + else + -- + -- Get the overall totals and find guild information + -- + CensusPlus_Guilds = {}; + g_AccumulateGuildTotals = true; + CensusPlus_ForAllCharacters(realmName, factionGroup, nil, nil, nil, nil, TotalsAccumulator); + + if( CensusPlus_EnableProfiling ) then + CensusPlus_Msg( "PROFILE: Time to do calcs 1 " .. debugprofilestop() / 1000000000 ); + debugprofilestart(); + end + + local size = table.getn(CensusPlus_Guilds); + if (size) then + table.sort(CensusPlus_Guilds, GuildPredicate); + end + + if( CensusPlus_EnableProfiling ) then + CensusPlus_Msg( "PROFILE: Time to sort guilds " .. debugprofilestop() / 1000000000 ); + debugprofilestart(); + end + end + + local levelSearch = nil; + if (levelKey ~= nil) then + levelSearch = " ("..CENSUSPlus_LEVEL..": "; + local level = levelKey; + if (levelKey < 0) then + levelSearch = levelSearch.."!"; + level = 0 - levelKey; + end + levelSearch = levelSearch..level..")"; + end + + local totalCharactersText = nil; + if (levelSearch ~= nil) then + totalCharactersText = format(CENSUSPlus_TOTALCHAR, g_TotalCount)..levelSearch; + else + totalCharactersText = format(CENSUSPlus_TOTALCHAR, g_TotalCount); + end + CensusPlusTotalCharacters:SetText(totalCharactersText); + CensusPlusTotalCharacterXP:SetText(format(CENSUSPlus_TOTALCHARXP, g_TotalCharacterXP)); + CensusPlus_UpdateGuildButtons(); + + if( CensusPlus_EnableProfiling ) then + CensusPlus_Msg( "PROFILE: Update Guilds " .. debugprofilestop() / 1000000000 ); + debugprofilestart(); + end + + -- + -- Accumulate totals for each race + -- + local maxCount = 0; + local thisFactionRaces = CensusPlus_GetFactionRaces(factionGroup); + local numRaces = table.getn(thisFactionRaces); + for i = 1, numRaces, 1 do + local race = thisFactionRaces[i]; + CensusPlus_ResetAccumulator(); + if ((raceKey == nil) or (raceKey == race)) then + CensusPlus_ForAllCharacters(realmName, factionGroup, race, classKey, guildKey, levelKey, CensusPlus_Accumulator); + end + if (g_AccumulatorCount > maxCount) then + maxCount = g_AccumulatorCount; + end + g_RaceCount[i] = g_AccumulatorCount; + end + + -- + -- Update race bars + -- + for i = 1, numRaces, 1 do + local race = thisFactionRaces[i]; + local buttonName = "CensusPlusRaceBar"..i; + local button = getglobal(buttonName); + local thisCount = g_RaceCount[i]; + if ((thisCount ~= nil) and (thisCount > 0) and (maxCount > 0)) then + local height = floor((thisCount * CensusPlus_MAXBARHEIGHT / maxCount) ); + if (height < 2 or height == nil ) then height = 2; end + button:SetHeight(height); + button:Show(); + else + button:Hide(); + end + local normalTextureName="Interface\\AddOns\\CensusPlus\\Skin\\CensusPlus_"..g_RaceClassList[race]; + local legendName = "CensusPlusRaceLegend"..i; + local legend = getglobal(legendName); + legend:SetNormalTexture(normalTextureName); + if (g_RaceSelected == i) then + legend:LockHighlight(); + else + legend:UnlockHighlight(); + end + end + + if( CensusPlus_EnableProfiling ) then + CensusPlus_Msg( "PROFILE: Update Races " .. debugprofilestop() / 1000000000 ); + debugprofilestart(); + end + + -- + -- Accumulate totals for each class + -- + local maxCount = 0; + local thisFactionClasss = CensusPlus_GetFactionClasses(factionGroup); + local numClasses = table.getn(thisFactionClasss); + for i = 1, numClasses, 1 do + local class = thisFactionClasss[i]; + CensusPlus_ResetAccumulator(); + if ((classKey == nil) or (classKey == class)) then + CensusPlus_ForAllCharacters(realmName, factionGroup, raceKey, class, guildKey, levelKey, CensusPlus_Accumulator); + end + if (g_AccumulatorCount > maxCount) then + maxCount = g_AccumulatorCount; + end + g_ClassCount[i] = g_AccumulatorCount; + end + + -- + -- Update class bars + -- + for i = 1, numClasses, 1 do + local class = thisFactionClasss[i]; + + local buttonName = "CensusPlusClassBar"..i; + local button = getglobal(buttonName); + local thisCount = g_ClassCount[i]; + if ((thisCount ~= nil) and (thisCount > 0) and (maxCount > 0)) then + local height = floor((thisCount * CensusPlus_MAXBARHEIGHT / maxCount) ); + if (height < 2 or height == nil ) then height = 2; end + button:SetHeight(height); + button:Show(); + else + button:Hide(); + end + + local normalTextureName="Interface\\AddOns\\CensusPlus\\Skin\\CensusPlus_"..g_RaceClassList[class]; + local legendName = "CensusPlusClassLegend"..i; + local legend = getglobal(legendName); + legend:SetNormalTexture(normalTextureName); + if (g_ClassSelected == i) then + legend:LockHighlight(); + else + legend:UnlockHighlight(); + end + end + + if( CensusPlus_EnableProfiling ) then + CensusPlus_Msg( "PROFILE: Update Classes " .. debugprofilestop() / 1000000000 ); + debugprofilestart(); + end + + -- + -- Accumulate totals for each level + -- + local maxCount = 0; + for i = 1, MAX_CHARACTER_LEVEL, 1 do + if ((levelKey == nil) or (levelKey == i) or (levelKey < 0 and levelKey + i ~= 0)) then + CensusPlus_ResetAccumulator(); + CensusPlus_ForAllCharacters(realmName, factionGroup, raceKey, classKey, guildKey, i, CensusPlus_Accumulator); + if (g_AccumulatorCount > maxCount) then + maxCount = g_AccumulatorCount; + end + g_LevelCount[i] = g_AccumulatorCount; + else + g_LevelCount[i] = 0; + end + end + local logMaxCount = math.log( maxCount / 3 + 1 ); + + -- + -- To make the data easier to use, we need to massage it a bit for levels + -- + + + -- + -- Update level bars + -- + for i = 1, MAX_CHARACTER_LEVEL, 1 do + local buttonName = "CensusPlusLevelBar"..i; + local buttonEmptyName = "CensusPlusLevelBarEmpty"..i; + local button = getglobal(buttonName); + local emptyButton = getglobal(buttonEmptyName); + local thisCount = g_LevelCount[i]; + if ((thisCount ~= nil) and (thisCount > 0) and (maxCount > 0)) then + local height = floor(( math.log(thisCount / 3 + 1) * CensusPlus_MAXBARHEIGHT / logMaxCount) ); + if( CensusPlus_Database["Info"]["UseLogBars"] == 0 ) then + height = floor(( CensusPlus_MAXBARHEIGHT * (thisCount) / maxCount) ); + end + + if (height < 2 or height == nil ) then height = 2; end + button:SetHeight(height); + button:Show(); + if (emptyButton ~= nil) then + emptyButton:Hide(); + end + else + button:Hide(); + if (emptyButton ~= nil) then + emptyButton:SetHeight(CensusPlus_MAXBARHEIGHT); + emptyButton:Show(); + end + end + end + + if( CensusPlus_EnableProfiling ) then + CensusPlus_Msg( "PROFILE: Update Levels " .. debugprofilestop() / 1000000000 ); + debugprofilestart(); + end + + if( CP_PlayerListWindow:IsVisible() ) then + CensusPlus_PlayerListOnShow(); + end + + + debugprofilestop(); + +end + +---------------------------------------------------------------------------------- +-- +-- Walk the character database and call the callback function for every entry that matches the search criteria +-- +--------------------------------------------------------------------------------- +function CensusPlus_ForAllCharacters(realmKey, factionKey, raceKey, classKey, guildKey, levelKey, callback) + for realmName, realmDatabase in pairs(CensusPlus_Database["Servers"]) do + if ((realmKey == nil) or (realmKey == realmName)) then + for factionName, factionDatabase in pairs(realmDatabase) do + if ((factionKey == nil) or (factionKey == factionName)) then + for raceName, raceDatabase in pairs(factionDatabase) do + if ((raceKey == nil) or (raceKey == raceName)) then + for className, classDatabase in pairs(raceDatabase) do + if ((classKey == nil) or (classKey == className)) then + for characterName, character in pairs(classDatabase) do + local characterGuild = character[2]; + if ((guildKey == nil) or (guildKey == characterGuild)) then + local characterLevel = character[1]; + if( characterLevel == nil ) then + characterLevel = 0; + end + if ((levelKey == nil) or (levelKey == characterLevel) or (levelKey < 0 and levelKey + characterLevel ~= 0)) then + callback(characterName, characterLevel, characterGuild, raceName, className, character[3] ); + end + end + end + end + end + end + end + end + end + end + end +end + +---------------------------------------------------------------------------------- +-- +-- Race legend clicked +-- +--------------------------------------------------------------------------------- +function CensusPlus_OnClickRace() + local id = this:GetID(); + if (id == g_RaceSelected) then + g_RaceSelected = 0; + else + g_RaceSelected = id; + end + CensusPlus_UpdateView(); +end + +---------------------------------------------------------------------------------- +-- +-- Class legend clicked +-- +--------------------------------------------------------------------------------- +function CensusPlus_OnClickClass() + local id = this:GetID(); + if (id == g_ClassSelected) then + g_ClassSelected = 0; + else + g_ClassSelected = id; + end + CensusPlus_UpdateView(); +end + + +---------------------------------------------------------------------------------- +-- +-- Level bar loaded +-- +--------------------------------------------------------------------------------- +function CensusPlus_OnLoadLevel() + this:RegisterForClicks("LeftButtonUp","RightButtonUp"); +end + +---------------------------------------------------------------------------------- +-- +-- Level bar clicked +-- +--------------------------------------------------------------------------------- +function CensusPlus_OnClickLevel(button) + local id = this:GetID(); + if (((button == "LeftButton") and (id == g_LevelSelected)) or ((button == "RightButton") and (id + g_LevelSelected == 0))) then + g_LevelSelected = 0; + elseif (button == "RightButton") then + g_LevelSelected = 0 - id; + else + g_LevelSelected = id; + end + CensusPlus_UpdateView(); +end + +---------------------------------------------------------------------------------- +-- +-- Race tooltip +-- +--------------------------------------------------------------------------------- +function CensusPlus_OnEnterRace() + local factionGroup = UnitFactionGroup("player"); + local thisFactionRaces = CensusPlus_GetFactionRaces(factionGroup); + local id = this:GetID(); + local raceName = thisFactionRaces[id]; + local count = g_RaceCount[id]; + if (count ~= nil) then + local percent = floor((count / g_TotalCount) * 100); + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(raceName.."\n"..count.."\n"..percent.."%", 1.0, 1.0, 1.0); + GameTooltip:Show(); + end +end + +---------------------------------------------------------------------------------- +-- +-- Class tooltip +-- +--------------------------------------------------------------------------------- +function CensusPlus_OnEnterClass() + local factionGroup = UnitFactionGroup("player"); + local thisFactionClasses = CensusPlus_GetFactionClasses(factionGroup); + local id = this:GetID(); + local className = thisFactionClasses[id]; + local count = g_ClassCount[id]; + if (count ~= nil) then + local percent = floor((count / g_TotalCount) * 100); + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(className.."\n"..count.."\n"..percent.."%", 1.0, 1.0, 1.0); + GameTooltip:Show(); + end +end + +---------------------------------------------------------------------------------- +-- +-- Level tooltip +-- +--------------------------------------------------------------------------------- +function CensusPlus_OnEnterLevel() + local id = this:GetID(); + local count = g_LevelCount[id]; + if (count ~= nil) then + local percent = floor(count * 100 / g_TotalCount); + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText("Level "..id.."\n"..count.."\n"..percent.."%", 1.0, 1.0, 1.0); + GameTooltip:Show(); + end +end + +---------------------------------------------------------------------------------- +-- +-- Clicked a guild button +-- +--------------------------------------------------------------------------------- +function CensusPlus_GuildButton_OnClick() + local id = this:GetID(); + local offset = FauxScrollFrame_GetOffset(CensusPlusGuildScrollFrame); + local newSelection = id + offset; + local guildKey = CensusPlus_Guilds[newSelection].m_Name; + if (g_GuildSelected ~= guildKey) then + g_GuildSelected = guildKey; + else + g_GuildSelected = nil; + end + CensusPlus_UpdateView(); +end + +---------------------------------------------------------------------------------- +-- +-- Update the guild button contents +-- +--------------------------------------------------------------------------------- +function CensusPlus_UpdateGuildButtons() + -- + -- Determine where the scroll bar is + -- + local offset = FauxScrollFrame_GetOffset(CensusPlusGuildScrollFrame); + -- + -- Walk through all the rows in the frame + -- + local size = table.getn(CensusPlus_Guilds); + local i = 1; + while (i <= CensusPlus_NUMGUILDBUTTONS) do + -- + -- Get the index to the ad displayed in this row + -- + local iGuild = i + offset; + -- + -- Get the button on this row + -- + local button = getglobal("CensusPlusGuildButton"..i); + -- + -- Is there a valid guild on this row? + -- + if (iGuild <= size) then + local guild = CensusPlus_Guilds[iGuild]; + -- + -- Update the button text + -- + button:Show(); + local textField = "CensusPlusGuildButton"..i.."Text"; + if (guild.m_Name == "") then + getglobal(textField):SetText(CENSUSPlus_UNGUILDED); + else + getglobal(textField):SetText(guild.m_Name); + end + -- + -- If this is the guild, highlight it + -- + local guildName = CensusPlus_Guilds[iGuild].m_Name + if (g_GuildSelected == guildName) then + button:LockHighlight(); + else + button:UnlockHighlight(); + end + else + -- + -- Hide the button + -- + button:Hide(); + end + -- + -- Next row + -- + i = i + 1; + end + -- + -- Update the scroll bar + -- + FauxScrollFrame_Update(CensusPlusGuildScrollFrame, size, CensusPlus_NUMGUILDBUTTONS, CensusPlus_GUILDBUTTONSIZEY); +end + + +---------------------------------------------------------------------------------- +-- +-- Census_AutoStartOnLoad +-- +--------------------------------------------------------------------------------- +function Census_AutoStartOnLoad( ) + CP_OptionAutoStartButton:SetChecked(g_MiniOnStart); + if( g_MiniOnStart == 1 ) then + MiniCensusPlus:Show(); + else + MiniCensusPlus:Hide(); + end + MiniCensusPlus:Hide(); +end + +---------------------------------------------------------------------------------- +-- +-- CensusPlus_AutoStart - Set the auto-start option +-- +--------------------------------------------------------------------------------- +function CensusPlus_AutoStart( check ) + g_MiniOnStart = check; + CensusPlus_Database["Info"]["MiniStart"] = g_MiniOnStart; + Census_AutoStartOnLoad(); +end + + +---------------------------------------------------------------------------------- +-- +-- CensusPlus_VerifyLocale - Set the locale (US or EU) +-- +--------------------------------------------------------------------------------- +function CensusPlus_VerifyLocale( locale ) + if( CensusPlus_Database["Info"]["Locale"] ~= locale ) then + -- + -- Purge + -- + CensusPlus_DoPurge() + end +end + +---------------------------------------------------------------------------------- +-- +-- CensusPlus_SelectLocale - Set the locale (US or EU) +-- +--------------------------------------------------------------------------------- +function CensusPlus_SelectLocale( locale, auto ) + + if( not auto ) then + CensusPlus_Msg( "You have set your locale to " .. locale .. " from " .. g_CensusPlusLocale ); + end + + g_CensusPlusLocale = locale; + if( g_CensusPlusLocale == "EU" ) then + g_CensusPlusLocale = g_CensusPlusLocale .. "-"; + else + g_CensusPlusLocale = ""; + end + + + if( CensusPlus_Database["Info"]["Locale"] ~= locale ) then + if( not ( CensusPlus_Database["Info"]["Locale"] == nil and locale == "US" ) ) then + CensusPlus_Msg( "Locale differs from previous setting, purging database." ); + CensusPlus_DoPurge(); + CensusPlus_Database["Info"]["Locale"] = locale; + end + end + CensusPlus_Database["Info"]["Locale"] = locale; + + textLine = getglobal("CensusPlusText"); + textLine:SetText("Census+ EmSpe\195\167ial v"..CensusPlus_VERSION .. " " .. g_CensusPlusLocale ); + + if(( CENSUSPlus_DWARF == "Nain" or CENSUSPlus_DWARF == "Zwerg" ) and GetLocale() == "usEN") then + CensusPlus_Msg( "You appear to have a US Census version, yet your localization is set to French or German." ); + CensusPlus_Msg( "Please do not upload stats to WarcraftRealms until this has been resolved." ); + CensusPlus_Msg( "If this is incorrect, please let Rollie know at www.WarcraftRealms.com about your situation so he can make corrections." ); + end + + CP_EU_US_Version:Hide(); + +end + +---------------------------------------------------------------------------------- +-- +-- Walk the character database prune all characters entries that are older than 30 days +-- +--------------------------------------------------------------------------------- +function CensusPlus_PruneData( nDays, sServer ) + + if( g_CensusPlusLocale == "N/A" ) then + return; + end + + + local thisRealmName = g_CensusPlusLocale .. GetCVar("realmName"); + + if( sServer == 1 ) then + nDays = 0; + end + + local pruneTime = 24 * 60 * 60 * nDays; + + for realmName, realmDatabase in pairs(CensusPlus_Database["Servers"]) do + if ((realmKey == nil) or (realmKey == realmName)) then + for factionName, factionDatabase in pairs(realmDatabase) do + if ((factionKey == nil) or (factionKey == factionName)) then + for raceName, raceDatabase in pairs(factionDatabase) do + if ((raceKey == nil) or (raceKey == raceName)) then + for className, classDatabase in pairs(raceDatabase) do + if ((classKey == nil) or (classKey == className)) then + for characterName, character in pairs(classDatabase) do + if( characterName ~= nil ) then + if( sServer == 1 ) then + if( realmName ~= thisRealmName ) then + CensusPlus_AccumulatePruneData( realmName, factionName, raceName, className, characterName ); + end + else + local lastSeen = character[3]; -- 2005-05-02 + + local tYear, tMonth, tDay; + tYear = string.sub( lastSeen, 1, 4 ); + tMonth = string.sub( lastSeen, 6, 7 ); + tDay = string.sub( lastSeen, 9 ); + + local lastSeenTime = time( {year=tYear, month=tMonth, day=tDay, hour=0} ); + + if( time() - lastSeenTime > pruneTime ) then + CensusPlus_AccumulatePruneData( realmName, factionName, raceName, className, characterName ); + end + end + end + end + end + end + end + end + end + end + end + end + + CensusPlus_PruneTimes(); + CensusPlus_UpdateView(); + CensusPlus_PruneTheData(); +end + +----------------------------------------------------------------------------------- +-- +-- Prune the accumulation +-- +----------------------------------------------------------------------------------- +function CensusPlus_AccumulatePruneData( realm, faction, race, class, name ) + local pruneData = {}; + pruneData.realm = realm; + pruneData.faction = faction; + pruneData.race = race; + pruneData.class = class; + pruneData.name = name; + + table.insert(g_AccumulatedPruneData, pruneData); +end +----------------------------------------------------------------------------------- +-- +-- Prune the accumulation +-- +----------------------------------------------------------------------------------- +function CensusPlus_PruneTheData() + local num = table.getn(g_AccumulatedPruneData); + CensusPlus_Msg( format(CENSUSPlus_PRUNEINFO, num ) ); + while( num > 0 )do + -- + -- Remove the top job from the queue and send it + -- + local pruneData = g_AccumulatedPruneData[num]; + + CensusPlus_Database["Servers"][pruneData.realm][pruneData.faction][pruneData.race][pruneData.class][pruneData.name] = {}; + CensusPlus_Database["Servers"][pruneData.realm][pruneData.faction][pruneData.race][pruneData.class][pruneData.name] = nil; + + table.remove(g_AccumulatedPruneData); + num = table.getn(g_AccumulatedPruneData); + end +end + +----------------------------------------------------------------------------------- +-- +-- Prune time entries +-- +----------------------------------------------------------------------------------- +function CensusPlus_PruneTimes() + local pruneDays = 60*60*24*21; -- num seconds + + local accumTimesData = {}; + for realmName, realmDatabase in pairs(CensusPlus_Database["TimesPlus"]) do + if (realmName ~= nil ) then + for factionName, factionDatabase in pairs(realmDatabase) do + if ( factionName ~= nil) then + for moment, count in pairs( factionDatabase ) do + -- Moment is in format of YYYY-MM-DD&HH:MM + local test = string.sub( moment, 1, 2 ); + local tYear, tMonth, tDay; + tYear = string.sub( moment, 1, 4 ); + tMonth = string.sub( moment, 6, 7 ); + tDay = string.sub( moment, 9, 10 ); + local momentTime = time( {year=tYear, month=tMonth, day=tDay, hour=0} ); + + if( time() - momentTime > pruneDays ) then + -- cull entry + local pruneData = {}; + pruneData.realm = realmName; + pruneData.faction = factionName; + pruneData.entry = moment; + table.insert(accumTimesData, pruneData); + end + end + end + end + end + end + + local num = table.getn(accumTimesData); + while( num > 0 )do + local pruneData = accumTimesData[num]; + + CensusPlus_Database["TimesPlus"][pruneData.realm][pruneData.faction][pruneData.entry] = {}; + CensusPlus_Database["TimesPlus"][pruneData.realm][pruneData.faction][pruneData.entry] = nil; + + table.remove(accumTimesData); + num = table.getn(accumTimesData); + end +end + + +function CensusPlus_CheckForBattleground() + + +-- CensusPlus_Msg( "Checking for BG" ); + g_CurrentlyInBG_Msg = false; + + local battlefieldTime = GetBattlefieldInstanceRunTime(); + if( battlefieldTime > 0 ) then + -- + -- We are in a battleground so cancel the current take + -- + g_CurrentlyInBG = true; + else + if( GetBattlefieldStatInfo(1) ~= nil ) then + g_CurrentlyInBG = true; + else + g_CurrentlyInBG = false; + end + end + +end + +function CensusPlus_IsInspectLoaded() + if (IsAddOnLoaded("Blizzard_InspectUI")) then + --ChatFrame1:AddMessage("Inspect Loaded"); + return true; + end + + if (CensusPlus_Database["Info"]["LoadInspect"] ~= nil and CensusPlus_Database["Info"]["LoadInspect"] == true) then + --ChatFrame1:AddMessage("Loading Inspect Frame"); + LoadAddOn("Blizzard_InspectUI"); + end + + --ChatFrame1:AddMessage("Inspect Not Loaded"); + return false; +end + +function CensusPlus_IsTalentLoaded() + if (IsAddOnLoaded("Blizzard_TalentUI")) then + --ChatFrame1:AddMessage("Talent Loaded"); + return true; + end + + if (CensusPlus_Database["Info"]["LoadTalent"] ~= nil and CensusPlus_Database["Info"]["LoadTalent"] == true) then + --ChatFrame1:AddMessage("Loading Talent Frame"); + LoadAddOn("Blizzard_TalentUI"); + end + + --ChatFrame1:AddMessage("Talent Not Loaded"); + return false; +end + + + +function showAllUnitBuffs(sUnitname) + local iIterator = 1 + DEFAULT_CHAT_FRAME:AddMessage(format("[%s] Buffs", sUnitname)) + while (UnitBuff(sUnitname, iIterator)) do + DEFAULT_CHAT_FRAME:AddMessage(UnitBuff(sUnitname, iIterator), 1, 1, 0) + iIterator = iIterator + 1 + end + DEFAULT_CHAT_FRAME:AddMessage("---", 1, 1, 0) +end + +function CensusPlus_GetUTCDateTimeStr() + return date( "!%Y-%m-%d %H:%M", time() ); +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus_DetermineServerDate +-- +----------------------------------------------------------------------------------- +function CensusPlus_DetermineServerDate() + + CensusPlus_CheckTZ(); + + local strDate; + local TZOffset = g_CensusPlusTZOffset; + + -- + -- Timezone offsets should fall into distinct numbers for now + -- And now that we know if they are playing on US or EU servers + -- we can be even better estimates + -- + + -- + -- For US servers, the offset should be either -9 to -5 or 16/19 depending on DST for NA times + -- and for oceana it is +11/-13 + -- EU servers are either +1 or 0 or -23 depending on DST + -- + + if( CensusPlus_Database["Info"]["Locale"] == "US" ) then + if( TZOffset > 12 ) then + -- NA server times but wrong day + TZOffset = TZOffset - 24; + elseif( TZOffset < -11 ) then + -- Oceana times but wrong day + TZOffset = 24 - TZOffset; + end + else + if( TZOffset == -23 ) then + TZOffset = 1; + end + end + + -- Now, take the TZOffset and modify our time to give us server date + strDate = date( "!%Y-%m-%d", time() + (TZOffset * 3600 ) ); + +-- local strDate2 = date( "%Y-%m-%d : %H:%M", time() ); +-- CensusPlus_Msg("Server date = " .. strDate .. " for TZOffset : " .. TZOffset .. " curr local: " .. strDate2 ); + + return strDate; +end + +----------------------------------------------------------------------------------- +-- +-- Check time zone +-- +----------------------------------------------------------------------------------- +function CensusPlus_CheckTZ() + + local UTCTimeHour = date( "!%H", time() ); + local LocTimeHour = date( "%H", time() ); + local hour, minute = GetGameTime(); + + local locDiff = LocTimeHour - UTCTimeHour; + local servDiff = hour - UTCTimeHour; + g_CensusPlusTZOffset = servDiff; +end + + +function CensusPlus_UpdateBattleGroundInfo() + local status, mapName, instanceID, lowestLevel, highestLevel; + local numberQueues = 0; + local waitTime, timeInQueue; + local map = {}; + + if( g_CensusPlusLocale == "N/A" ) then + return; + end + + for i=1, MAX_BATTLEFIELD_QUEUES do + map = {}; + status, mapName, instanceID, lowestLevel, highestLevel = GetBattlefieldStatus(i); + + if ( status ~= "none" ) then + numberQueues = numberQueues+1; + + if ( status == "queued" ) then + -- Update queue info + waitTime = GetBattlefieldEstimatedWaitTime(i)/1000; + timeInQueue = GetBattlefieldTimeWaited(i)/1000; + + map[0] = waitTime; + map[1] = timeInQueue; + map[2] = mapName; + map[3] = "Inactive"; + +-- CensusPlus_Msg( "INSERT " .. mapName .. " : " .. map[2] .. " to " .. i ); + CENSUSPLUS_CURRENT_BATTLEFIELD_QUEUES[i] = map; + + elseif ( status == "confirm" ) then + -- In the battleground + -- Check to see if we know we've already entered, and if so, add info to + -- our database + map = CENSUSPLUS_CURRENT_BATTLEFIELD_QUEUES[i]; + +-- CensusPlus_Msg( "ACTIVE " .. mapName ); +-- CensusPlus_Msg( map[2] ); + if( map ~= nil and map[3] == "Inactive" ) then + map[3] = "Active"; + + CENSUSPLUS_CURRENT_BATTLEFIELD_QUEUES[i] = map; + + -- Make an entry in our database + + -- + -- Get the portion of the database for this server + -- + local realmName = g_CensusPlusLocale .. GetCVar("realmName"); + if (CensusPlus_BGInfo[realmName] == nil) then + CensusPlus_BGInfo[realmName] = {}; + end + + -- + -- Get the portion of the database for this faction + -- + local factionGroup = UnitFactionGroup("player"); + if( factionGroup ~= nil ) then + if (CensusPlus_BGInfo[realmName][factionGroup] == nil) then + CensusPlus_BGInfo[realmName][factionGroup] = {}; + end + + local playerLevel = UnitLevel( "player" ); + if( playerLevel ~= nil ) then + if (CensusPlus_BGInfo[realmName][factionGroup][playerLevel] == nil) then + CensusPlus_BGInfo[realmName][factionGroup][playerLevel] = {}; + end + + local hour, minute = GetGameTime(); + CensusPlus_BGInfo[realmName][factionGroup][playerLevel][CensusPlus_DetermineServerDate() .. "&" .. hour .. ":" .. minute .. ":00"] = + map[2] .. "&" .. map[0] .. "&" .. map[1] .. "&" .. lowestLevel .. "&" .. highestLevel; + end + end + end + end + end + end +end + +function CensusPlus_PruneBGInfo() + local pruneDays = 60*60*24*21; -- num seconds + + local accumData = {}; + for realmName, realmDatabase in pairs(CensusPlus_BGInfo) do + if (realmName ~= nil and table.getn( realmDatabase ) > 0 ) then + for factionName, factionDatabase in pairs(realmDatabase) do + if ( factionName ~= nil and table.getn( factionDatabase ) > 0 ) then + for level, levelDatabase in pairs( factionDatabase ) do + if( level ~= nil and table.getn( levelDatabase ) > 0 ) then + for moment, data in pairs( levelDatabase ) do + -- Moment is in format of YYYY-MM-DD&HH:MM + local test = string.sub( moment, 1, 2 ); + local tYear, tMonth, tDay; + tYear = string.sub( moment, 1, 4 ); + tMonth = string.sub( moment, 6, 7 ); + tDay = string.sub( moment, 9, 10 ); + local momentTime = time( {year=tYear, month=tMonth, day=tDay, hour=0} ); + + if( time() - momentTime > pruneDays ) then + -- cull entry + local pruneData = {}; + pruneData.realm = realmName; + pruneData.faction = factionName; + pruneData.level = level; + pruneData.entry = moment; + table.insert(accumData, pruneData); + end + end + end + end + end + end + end + end + + local num = table.getn(accumData); + while( num > 0 )do + local pruneData = accumData[num]; + + CensusPlus_BGInfo[pruneData.realm][pruneData.faction][pruneData.level][pruneData.entry] = {}; + CensusPlus_BGInfo[pruneData.realm][pruneData.faction][pruneData.level][pruneData.entry] = nil; + + table.remove(accumData); + num = table.getn(accumData); + end +end + +----------------------------------------------------------------------------------- +-- +-- My Test function +-- +----------------------------------------------------------------------------------- +function CensusPlus_Test( val ) + + +-- local file = "Interface\\AddOns\\CensusPlus\\Sounds\\CensusComplete.ogg"; +-- CensusPlus_Msg( "Play sound " .. file ); +-- PlaySoundFile( file ); + +local test = {}; +test[1] = "|Hplayer:Cdrom|h[Cdrom]|h: Level 60 Tauren Warrior <CSM AND NOVA SUX> - Hellfire Peninsula"; +test[2] = "|Hplayer:Cdrom|h[Cdrom]|h: Level 60 Tauren Warrior - Hellfire Peninsula"; +test[3] = "|Hplayer:Cdrom|h[Cdrom]|h: Level 60 Troll Death Knight <CSM AND NOVA SUX> - Hellfire Peninsula"; +test[4] = "|Hplayer:Cdrom|h[Cdrom]|h: Level 60 Troll Death Knight - Hellfire Peninsula"; +test[5] = "|Hplayer:Frostbiite|h[Frostbiite]|h: Level 61 Troll Death Knight - Hellfire Peninsula"; +test[6] = "|Hplayer:Dynanite|h[Dynanite]|h: Level 60 Troll Death Knight - Hellfire Peninsula"; +test[7] = "|Hplayer:Physco|h[Physco]|h: Level 61 Troll Death Knight - Hellfire Peninsula"; +test[8] = "|Hplayer:Gordoom|h[Gordoom]|h: Level 60 Troll Death Knight <Hellfire Club> - Hellfire Peninsula"; +test[9] = "|Hplayer:Seroa|h[Seroa]|h: Level 67 Blood Elf Death Knight <Carnage> - Nagrand"; +test[10] = "|Hplayer:Seroa|h[Seroa]|h: Level 67 Night Elf Death Knight <Carnage> - Nagrand"; +test[11] = "|Hplayer:Seroa|h[Seroa]|h: Level 67 Blood Elf Death Knight - Nagrand"; +test[12] = "|Hplayer:Seroa|h[Seroa]|h: Level 67 Night Elf Death Knight - Nagrand"; +test[13] = "|Hplayer:Seroa|h[Seroa]|h: Level 67 Blood Elf Paladin <Carnage> - Nagrand"; +test[14] = "|Hplayer:Seroa|h[Seroa]|h: Level 67 Night Elf Paladin <Carnage> - Nagrand"; +test[15] = "|Hplayer:Seroa|h[Seroa]|h: Level 67 Blood Elf Paladin - Nagrand"; +test[16] = "|Hplayer:Seroa|h[Seroa]|h: Level 67 Night Elf Paladin - Nagrand"; + + + for index, case in pairs(test) do + CensusPlus_Msg( "Checking : " .. case ); + local t = CensusPlus_GatherSingleReturn( case ); + if( t ~= nil ) then + CensusPlus_Msg( index .. " Name : " .. t["NAME"] + .. " L: " .. t["LEVEL"] + .. " R: " .. t["RACE"] + .. " C: " .. t["CLASS"] + .. " G: " .. t["GUILD"] + .. " Z: " .. t["ZONE"] ); + end + end + + +--[[ + local pattern = "[0-9\| ]"; + + local name = "11:58]|r |Hplayer:Azide|h[Azide"; + if( string.find( name, pattern ) ~= nil ) then + CensusPlus_Msg( "This name is problematic => " .. name ); + end + + name = "Rollie"; + if( string.find( name, pattern ) ~= nil ) then + CensusPlus_Msg( "This name is problematic => " .. name ); + else + CensusPlus_Msg( "This name is NOT problematic => " .. name ); + end +]]-- + +end + +function CensusPlus_GatherSingleReturn( line ) + local t = {}; + local s, e, name, level_text, level, rcg, zone, junk; + local RCG = {}; + local presults = {}; + local RCG_Pattern = "(.+) <(.+)>"; + local possibles = {}; + possibles[1] = "(" .. CENSUSPlus_NIGHTELF .. ")" .. " ([%a%s]+)"; + possibles[2] = "(" .. CENSUSPlus_BLOODELF .. ")" .. " ([%a%s]+)"; + possibles[3] = "(%a+) " .. "(" .. CENSUSPlus_DEATHKNIGHT .. ")"; + possibles[4] = "(%a+) (%a+)"; + +--CensusPlus_Msg2( " CHECKING " .. line ); + + if( g_PratLoaded ) then + s, e, junk, junk, junk, name, junk, junk, level_text, level, rcg, zone = string.find(line, CENSUS_SINGLE_MATCH_PATTERN_PRAT ); + else + s, e, junk, junk, name, level_text, level, rcg, zone = string.find(line, CENSUS_SINGLE_MATCH_PATTERN); + end + if( name ~= nil ) then + -- + -- Now let's break out our race, class & guild + -- + local race_class = rcg; + t["GUILD"] = ''; + t["NAME"] = name; + t["LEVEL"] = level; + t["ZONE"] = zone; + s, e, RCG[0], RCG[1] = string.find(rcg, RCG_Pattern); + if( RCG[0] ~= nil ) then + race_class = RCG[0]; + t["GUILD"] = RCG[1]; + end + + -- + -- Now we need to figure out race/class + -- + for pi, poss in pairs(possibles) do + s, e, presults[0], presults[1] = string.find(race_class, poss); + if( presults[0] ~= nil ) then +-- CensusPlus_Msg( pi .. " 0: " .. presults[0] .. " 1: " .. presults[1]); + t["RACE"] = presults[0]; + t["CLASS"] = presults[1]; + break; + end + end + +-- CensusPlus_Msg2( " IN Fn Name : " .. t["NAME"] .. " L: " .. t["LEVEL"] .. " R: " .. t["RACE"] .. " C: " .. t["CLASS"].. " G: " .. t["GUILD"] .. " Z: " .. t["ZONE"] ); + end + + return t; +end + + +function CensusPlus_SetItemRef(link, text, button) + -- + -- We only care about if they are sending a who, otherwise send on through + -- + if ( g_IsCensusPlusInProgress and strsub(link, 1, 6) == "player" ) then + if ( strsub(link, 1, 6) == "player" ) then + local namelink = strsub(link, 8); + local name, lineid = strsplit(":", namelink); + if ( name and (strlen(name) > 0) ) then + name = gsub(name, "([^%s]*)%s+([^%s]*)%s+([^%s]*)", "%3"); + name = gsub(name, "([^%s]*)%s+([^%s]*)", "%2"); + if ( IsShiftKeyDown() ) then + if ( not ChatFrameEditBox:IsVisible() ) then + -- + -- This is the part we need to snag + -- + + -- + -- Queue up the command to run next + -- + g_CensusWhoOverrideMsg = "n-"..name; + CensusPlus_Msg( CENSUSPlus_OVERRIDE ); + +-- CensusPlus_SendWho("n-"..name); + return; + end + end + end + end + end + + g_SetItemRef_Override( link, text, button ); +end + +function CensusPlus_CleanChars() + + local pattern = "[0-9\| -]"; + local count = 0; + + for realmName, realmDatabase in pairs(CensusPlus_Database["Servers"]) do + if ((realmKey == nil) or (realmKey == realmName)) then + for factionName, factionDatabase in pairs(realmDatabase) do + if ((factionKey == nil) or (factionKey == factionName)) then + for raceName, raceDatabase in pairs(factionDatabase) do + if ((raceKey == nil) or (raceKey == raceName)) then + for className, classDatabase in pairs(raceDatabase) do + if ((classKey == nil) or (classKey == className)) then + for characterName, character in pairs(classDatabase) do + if( characterName ~= nil ) then + if( string.find( characterName, pattern ) ~= nil ) then + CensusPlus_AccumulatePruneData( realmName, factionName, raceName, className, characterName ); + count = count + 1; + end + end + end + end + end + end + end + end + end + end + end + + CensusPlus_PruneTheData(); + CensusPlus_Msg( "Found " .. count .. " entries to remove" ); +end + +function CensusPlus_SendWho( msg ) + + if( CensusPlus_PerCharInfo["Verbose"] == true ) then + CensusPlus_Msg(format(CENSUSPlus_SENDING, msg)); + end + + if wholib then + wholib:AskWho({query = msg, queue = wholib.WHOLIB_QUEUE_QUIET, callback = CP_ProcessWhoEvent }) + else + SendWho( msg ); + end +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CensusPlus.toc Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,14 @@ +## Interface: 30300 +## Version: 4.2.2 +## Title: CensusPlus EmSpeçial +## Notes: Collects and displays census information. This AddOn is licenced under the GNU GPL, see GPL.txt for details. +## Original Author: Ian Pieragostini +## Modified By: Cooper Sellers - www.warcraftrealms.com +## Modified By: Em +## SavedVariables: CensusPlus_Database,CensusPlus_BGInfo,CensusPlus_Unhandled +## SavedVariablesPerCharacter: CensusPlus_DoThisCharacter,CensusPlus_PerCharInfo +## X-Website: http://www.warcraftrealms.com + +CensusPlus.xml +CensusButton.xml +CensusPlayerList.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CensusPlus.wuuver Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,1 @@ +20100204 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CensusPlus.xml Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,2976 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.blizzard.com/wow/ui/ + ..\FrameXML\UI.xsd"> + <Script file="localization.lua" /> + <Script file="CensusPlus.lua" /> + <Script file="CensusPlusPVP.lua" /> + <Button name="CensusPlusLegendTemplate" virtual="true"> + <Size> + <AbsDimension x="32" y="32" /> + </Size> + <NormalTexture file="Interface\AddOns\CensusPlus\Skin\CensusPlus_Unknown" /> + <HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"> + <Size> + <AbsDimension x="32" y="32" /> + </Size> + <Anchors> + <Anchor point="TOP"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </HighlightTexture> + <Scripts> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="CensusPlusRaceLegendTemplate" virtual="true" inherits="CensusPlusLegendTemplate"> + <Scripts> + <OnEnter> + CensusPlus_OnEnterRace(); + </OnEnter> + <OnClick> + CensusPlus_OnClickRace(); + </OnClick> + </Scripts> + </Button> + <Button name="CensusPlusClassLegendTemplate" virtual="true" inherits="CensusPlusLegendTemplate"> + <Scripts> + <OnEnter> + CensusPlus_OnEnterClass(); + </OnEnter> + <OnClick> + CensusPlus_OnClickClass(); + </OnClick> + </Scripts> + </Button> + <Button name="CensusPlusBarTemplate" virtual="true"> + <Size> + <AbsDimension x="32" y="128" /> + </Size> + <NormalTexture file="Interface\AddOns\CensusPlus\Skin\CensusPlus_Bar" /> + <Scripts> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="CensusPlusRaceBarTemplate" virtual="true" inherits="CensusPlusBarTemplate"> + <Scripts> + <OnEnter> + CensusPlus_OnEnterRace(); + </OnEnter> + </Scripts> + </Button> + <Button name="CensusPlusClassBarTemplate" virtual="true" inherits="CensusPlusBarTemplate"> + <Scripts> + <OnEnter> + CensusPlus_OnEnterClass(); + </OnEnter> + </Scripts> + </Button> + <Button name="CensusPlusLevelBarTemplate" virtual="true"> + <Size> + <AbsDimension x="7" y="128" /> + </Size> + <NormalTexture file="Interface\AddOns\CensusPlus\Skin\CensusPlus_LevelBar" /> + <Scripts> + <OnClick> + CensusPlus_OnClickLevel(arg1); + </OnClick> + <OnLoad> + CensusPlus_OnLoadLevel(); + </OnLoad> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + <OnEnter> + CensusPlus_OnEnterLevel(); + </OnEnter> + </Scripts> + </Button> + <Button name="CensusPlusLevelBarEmptyTemplate" virtual="true"> + <Size> + <AbsDimension x="7" y="128" /> + </Size> + <Scripts> + <OnClick> + CensusPlus_OnClickLevel(arg1); + </OnClick> + <OnLoad> + CensusPlus_OnLoadLevel(); + </OnLoad> + </Scripts> + </Button> + <Button name="CensusPlusGuildButtonTemplate" virtual="true"> + <Size> + <AbsDimension x="160" y="16" /> + </Size> + <Layers> + <Layer level="BORDER"> + <FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="LEFT"> + <Size> + <AbsDimension x="160" y="14" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="2" y="-1" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <HighlightTexture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"> + <Size> + <AbsDimension x="160" y="16" /> + </Size> + <Anchors> + <Anchor point="TOP"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </HighlightTexture> + <Scripts> + <OnClick> + CensusPlus_GuildButton_OnClick(); + </OnClick> + </Scripts> + </Button> + <Frame name="MiniCensusPlus" parent="UIParent" hidden="true" enableMouse="true" movable="true" + resizable="true" toplevel="true"> + <Size> + <AbsDimension x="130" y="30" /> + </Size> + <Anchors> + <Anchor point="TOPRIGHT"> + <Offset> + <AbsDimension x="-350" y="-2" /> + </Offset> + </Anchor> + </Anchors> + <Frames> + <Button name="CensusPlusMaximizeButton" inherits="UIPanelButtonTemplate" text="Mini-Census+"> + <Size> + <AbsDimension x="100" y="21" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="MiniCensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="5" y="-4" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + CensusPlus_OnClickMaximize(); + </OnClick> + <OnEnter> + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_MAXIMIZE, 1.0, 1.0, 1.0); + GameTooltip:Show(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="MiniCensusPlusCloseButton" inherits="UIPanelCloseButton"> + <Anchors> + <Anchor point="TOPRIGHT"> + <Offset> + <AbsDimension x="1" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + </Frames> + <Scripts> + <OnMouseUp> + if ( this.isMoving ) then + this:StopMovingOrSizing(); + this.isMoving = false; + end + </OnMouseUp> + <OnMouseDown> + if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then + this:StartMoving(); + this.isMoving = true; + end + </OnMouseDown> + <OnHide> + if ( this.isMoving ) then + this:StopMovingOrSizing(); + this.isMoving = false; + end + </OnHide> + </Scripts> + </Frame> + + + <Frame name="CensusPlus" parent="UIParent" hidden="true" enableMouse="true" toplevel="true" movable="true"> + <Size> + <AbsDimension x="846" y="512" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="16" y="-44" /> + </Offset> + </Anchor> + </Anchors> + <Layers> + <Layer level="BACKGROUND"> + <Texture file="Interface\AddOns\CensusPlus\Skin\CensusPlus_Window_Left"> + <Size> + <AbsDimension x="592" y="512" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Texture> + <Texture file="Interface\AddOns\CensusPlus\Skin\CensusPlus_Window_Right"> + <Size> + <AbsDimension x="334" y="512" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="592" y="0" /> + </Offset> + </Anchor> + </Anchors> + <TexCoords left="0" right="0.65" top="0" bottom="1.0"> + </TexCoords> + </Texture> + </Layer> + <Layer level="ARTWORK"> + <FontString name="CensusPlusText" inherits="GameFontHighlight" text="CENSUSPlus_BUTTON_TEXT"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="16" y="-12" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusText2" inherits="GameFontHighlight" text="WarcraftRealms.com"> + <Color r="0.4" g="0.8" b="1.0" /> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="240" y="-12" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusRealmName" inherits="GameFontHighlight" text="CENSUSPlus_BUTTON_REALMUNK"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="16" y="-32" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusFactionName" inherits="GameFontHighlight" text="CENSUSPlus_FACTIONUNKNOWN"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="16" y="-48" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusLocaleName" inherits="GameFontHighlight" text="CENSUSPlus_LOCALEUNKNOWN"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="16" y="-64" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusTotalCharacters" inherits="GameFontHighlight" text="CENSUSPlus_TOTALCHAR_0"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="256" y="-32" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusTotalCharacterXP" inherits="GameFontHighlight" text="CENSUSPlus_TOTALCHARXP_0"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="256" y="-48" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusScanProgress" inherits="GameFontHighlight" text="CENSUSPlus_SCAN_PROGRESS_0"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="256" y="-64" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusTopGuildsTitle" inherits="GameFontHighlight" text="CENSUSPlus_TOPGUILD"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="732" y="-90" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusRacesTitle" inherits="GameFontHighlight" text="CENSUSPlus_RACE"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="76" y="-90" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusClassesTitle" inherits="GameFontHighlight" text="CENSUSPlus_CLASS"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="384" y="-90" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + <FontString name="CensusPlusLevelsTitle" inherits="GameFontHighlight" text="CENSUSPlus_LEVEL"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="384" y="-300" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Frames> + <Button name="CP_DisplayOptionsButton" inherits="UIPanelButtonTemplate" text="CENSUSPlus_BUTTON_OPTIONS"> + <Size> + <AbsDimension x="128" y="21" /> + </Size> + <Anchors> + <Anchor point="TOPRIGHT" relativeTo="CensusPlus" relativePoint="TOPRIGHT"> + <Offset> + <AbsDimension x="50" y="-40" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + PlaySound("igMainMenuOptionCheckBoxOn"); + CensusPlus_ToggleOptions(); + </OnClick> + </Scripts> + </Button> + <Button name="CensusPlusCloseButton" inherits="UIPanelCloseButton"> + <Anchors> + <Anchor point="TOPRIGHT" relativeTo="CensusPlus" relativePoint="TOPRIGHT"> + <Offset> + <AbsDimension x="84" y="1" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusMinimizeButton" inherits="UIPanelButtonTemplate" text="CENSUSPlus_BUTTON_MINIMIZE" hidden="true"> + <Size> + <AbsDimension x="128" y="21" /> + </Size> + <Anchors> + <Anchor point="TOPRIGHT" relativeTo="CensusPlus" relativePoint="TOPLEFT"> + <Offset> + <AbsDimension x="600" y="-8" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + CensusPlus_OnClickMinimize(); + </OnClick> + <OnEnter> + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_MINIMIZE, 1.0, 1.0, 1.0); + GameTooltip:Show(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="CensusPlusTakeButton" inherits="UIPanelButtonTemplate" text="CENSUSPlus_TAKE"> + <Size> + <AbsDimension x="128" y="21" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="20" y="-470" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + CensusPlus_Take_OnClick(); + </OnClick> + <OnEnter> + CensusPlus_Take_OnEnter(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="CensusPlusStopButton" inherits="UIPanelButtonTemplate" text="CENSUSPlus_STOP"> + <Size> + <AbsDimension x="128" y="21" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="170" y="-470" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + CensusPlus_StopCensus( ); + </OnClick> + <OnEnter> + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_STOPCENSUS, 1.0, 1.0, 1.0); + GameTooltip:Show(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="CensusPlusPruneButton" inherits="UIPanelButtonTemplate" text="CENSUSPlus_PRUNE"> + <Size> + <AbsDimension x="128" y="21" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="320" y="-470" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + CensusPlus_PruneData(30); + </OnClick> + <OnEnter> + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_PRUNECENSUS, 1.0, 1.0, 1.0); + GameTooltip:Show(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="CensusPlusPurgeButton" inherits="UIPanelButtonTemplate" text="CENSUSPlus_PURGE"> + <Size> + <AbsDimension x="128" y="21" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="470" y="-470" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + CensusPlus_Purge(); + </OnClick> + <OnEnter> + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_PURGEDATABASE, 1.0, 1.0, 1.0); + GameTooltip:Show(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="CensusPlusTakeGuildButton" inherits="UIPanelButtonTemplate" text="CENSUSPlus_TAKEGUILD"> + <Size> + <AbsDimension x="256" y="21" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="620" y="-470" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + CensusPlus_TakeGuild_OnClick(); + </OnClick> + <OnEnter> + CensusPlus_TakeGuild_OnEnter(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="CensusPlusGuildButton1" inherits="CensusPlusGuildButtonTemplate" id="1"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlus"> + <Offset> + <AbsDimension x="729" y="-120" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusGuildButton2" inherits="CensusPlusGuildButtonTemplate" id="2"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton1" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusGuildButton3" inherits="CensusPlusGuildButtonTemplate" id="3"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton2" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusGuildButton4" inherits="CensusPlusGuildButtonTemplate" id="4"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton3" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusGuildButton5" inherits="CensusPlusGuildButtonTemplate" id="5"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton4" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusGuildButton6" inherits="CensusPlusGuildButtonTemplate" id="6"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton5" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusGuildButton7" inherits="CensusPlusGuildButtonTemplate" id="7"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton6" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusGuildButton8" inherits="CensusPlusGuildButtonTemplate" id="8"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton7" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusGuildButton9" inherits="CensusPlusGuildButtonTemplate" id="9"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton8" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusGuildButton10" inherits="CensusPlusGuildButtonTemplate" id="10"> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton9" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <ScrollFrame name="CensusPlusGuildScrollFrame" inherits="FauxScrollFrameTemplate"> + <Size> + <AbsDimension x="160" y="160" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton1" relativePoint="TOPLEFT"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnVerticalScroll> + FauxScrollFrame_OnVerticalScroll(self, offset, CensusPlus_GUILDBUTTONSIZEY, CensusPlus_UpdateGuildButtons); + </OnVerticalScroll> + </Scripts> + </ScrollFrame> + <Button name="CP_DisplayCharactersButton" inherits="UIPanelButtonTemplate" text="CENSUSPlus_BUTTON_CHARACTERS"> + <Size> + <AbsDimension x="128" y="21" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT" relativeTo="CensusPlusGuildButton10" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="20" y="-10" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + PlaySound("igMainMenuOptionCheckBoxOn"); + if( CP_PlayerListWindow:IsVisible() ) then + HideUIPanel( CP_PlayerListWindow ); + else + CensusPlus_ShowPlayerList(); + end + </OnClick> + </Scripts> + </Button> + <Button name="CensusPlusRaceLegend1" inherits="CensusPlusRaceLegendTemplate" id="1"> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="32" y="-256" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusRaceBar1" inherits="CensusPlusRaceBarTemplate" id="1"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusRaceLegend1" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusRaceLegend2" inherits="CensusPlusRaceLegendTemplate" id="2"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusRaceLegend1" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusRaceBar2" inherits="CensusPlusRaceBarTemplate" id="2"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusRaceLegend2" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusRaceLegend3" inherits="CensusPlusRaceLegendTemplate" id="3"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusRaceLegend2" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusRaceBar3" inherits="CensusPlusRaceBarTemplate" id="3"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusRaceLegend3" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusRaceLegend4" inherits="CensusPlusRaceLegendTemplate" id="4"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusRaceLegend3" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusRaceBar4" inherits="CensusPlusRaceBarTemplate" id="4"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusRaceLegend4" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusRaceLegend5" inherits="CensusPlusRaceLegendTemplate" id="5"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusRaceLegend4" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusRaceBar5" inherits="CensusPlusRaceBarTemplate" id="5"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusRaceLegend5" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassLegend1" inherits="CensusPlusClassLegendTemplate" id="1"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusRaceLegend5" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="49" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassBar1" inherits="CensusPlusClassBarTemplate" id="1"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusClassLegend1" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassLegend2" inherits="CensusPlusClassLegendTemplate" id="2"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusClassLegend1" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassBar2" inherits="CensusPlusClassBarTemplate" id="2"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusClassLegend2" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassLegend3" inherits="CensusPlusClassLegendTemplate" id="3"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusClassLegend2" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassBar3" inherits="CensusPlusClassBarTemplate" id="3"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusClassLegend3" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassLegend4" inherits="CensusPlusClassLegendTemplate" id="4"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusClassLegend3" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassBar4" inherits="CensusPlusClassBarTemplate" id="4"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusClassLegend4" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassLegend5" inherits="CensusPlusClassLegendTemplate" id="5"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusClassLegend4" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassBar5" inherits="CensusPlusClassBarTemplate" id="5"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusClassLegend5" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassLegend6" inherits="CensusPlusClassLegendTemplate" id="6"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusClassLegend5" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassBar6" inherits="CensusPlusClassBarTemplate" id="6"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusClassLegend6" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassLegend7" inherits="CensusPlusClassLegendTemplate" id="7"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusClassLegend6" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassBar7" inherits="CensusPlusClassBarTemplate" id="7"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusClassLegend7" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassLegend8" inherits="CensusPlusClassLegendTemplate" id="8"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusClassLegend7" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassBar8" inherits="CensusPlusClassBarTemplate" id="8"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusClassLegend8" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassLegend9" inherits="CensusPlusClassLegendTemplate" id="9"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusClassLegend8" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassBar9" inherits="CensusPlusClassBarTemplate" id="9"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusClassLegend9" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassLegend10" inherits="CensusPlusClassLegendTemplate" id="10"> + <Anchors> + <Anchor point="LEFT" relativeTo="CensusPlusClassLegend9" relativePoint="RIGHT"> + <Offset> + <AbsDimension x="8" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusClassBar10" inherits="CensusPlusClassBarTemplate" id="10"> + <Anchors> + <Anchor point="BOTTOM" relativeTo="CensusPlusClassLegend10" relativePoint="TOP"> + <Offset> + <AbsDimension x="0" y="8" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar1" inherits="CensusPlusLevelBarTemplate" id="1"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"> + <Offset> + <AbsDimension x="32" y="-450" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar2" inherits="CensusPlusLevelBarTemplate" id="2"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar1" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar3" inherits="CensusPlusLevelBarTemplate" id="3"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar2" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar4" inherits="CensusPlusLevelBarTemplate" id="4"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar3" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar5" inherits="CensusPlusLevelBarTemplate" id="5"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar4" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar6" inherits="CensusPlusLevelBarTemplate" id="6"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar5" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar7" inherits="CensusPlusLevelBarTemplate" id="7"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar6" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar8" inherits="CensusPlusLevelBarTemplate" id="8"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar7" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar9" inherits="CensusPlusLevelBarTemplate" id="9"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar8" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar10" inherits="CensusPlusLevelBarTemplate" id="10"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar9" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar11" inherits="CensusPlusLevelBarTemplate" id="11"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar10" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar12" inherits="CensusPlusLevelBarTemplate" id="12"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar11" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar13" inherits="CensusPlusLevelBarTemplate" id="13"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar12" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar14" inherits="CensusPlusLevelBarTemplate" id="14"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar13" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar15" inherits="CensusPlusLevelBarTemplate" id="15"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar14" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar16" inherits="CensusPlusLevelBarTemplate" id="16"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar15" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar17" inherits="CensusPlusLevelBarTemplate" id="17"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar16" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar18" inherits="CensusPlusLevelBarTemplate" id="18"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar17" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar19" inherits="CensusPlusLevelBarTemplate" id="19"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar18" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar20" inherits="CensusPlusLevelBarTemplate" id="20"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar19" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar21" inherits="CensusPlusLevelBarTemplate" id="21"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar20" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar22" inherits="CensusPlusLevelBarTemplate" id="22"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar21" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar23" inherits="CensusPlusLevelBarTemplate" id="23"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar22" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar24" inherits="CensusPlusLevelBarTemplate" id="24"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar23" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar25" inherits="CensusPlusLevelBarTemplate" id="25"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar24" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar26" inherits="CensusPlusLevelBarTemplate" id="26"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar25" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar27" inherits="CensusPlusLevelBarTemplate" id="27"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar26" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar28" inherits="CensusPlusLevelBarTemplate" id="28"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar27" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar29" inherits="CensusPlusLevelBarTemplate" id="29"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar28" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar30" inherits="CensusPlusLevelBarTemplate" id="30"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar29" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar31" inherits="CensusPlusLevelBarTemplate" id="31"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar30" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar32" inherits="CensusPlusLevelBarTemplate" id="32"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar31" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar33" inherits="CensusPlusLevelBarTemplate" id="33"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar32" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar34" inherits="CensusPlusLevelBarTemplate" id="34"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar33" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar35" inherits="CensusPlusLevelBarTemplate" id="35"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar34" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar36" inherits="CensusPlusLevelBarTemplate" id="36"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar35" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar37" inherits="CensusPlusLevelBarTemplate" id="37"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar36" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar38" inherits="CensusPlusLevelBarTemplate" id="38"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar37" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar39" inherits="CensusPlusLevelBarTemplate" id="39"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar38" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar40" inherits="CensusPlusLevelBarTemplate" id="40"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar39" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar41" inherits="CensusPlusLevelBarTemplate" id="41"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar40" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar42" inherits="CensusPlusLevelBarTemplate" id="42"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar41" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar43" inherits="CensusPlusLevelBarTemplate" id="43"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar42" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar44" inherits="CensusPlusLevelBarTemplate" id="44"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar43" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar45" inherits="CensusPlusLevelBarTemplate" id="45"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar44" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar46" inherits="CensusPlusLevelBarTemplate" id="46"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar45" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar47" inherits="CensusPlusLevelBarTemplate" id="47"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar46" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar48" inherits="CensusPlusLevelBarTemplate" id="48"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar47" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar49" inherits="CensusPlusLevelBarTemplate" id="49"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar48" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar50" inherits="CensusPlusLevelBarTemplate" id="50"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar49" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar51" inherits="CensusPlusLevelBarTemplate" id="51"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar50" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar52" inherits="CensusPlusLevelBarTemplate" id="52"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar51" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar53" inherits="CensusPlusLevelBarTemplate" id="53"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar52" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar54" inherits="CensusPlusLevelBarTemplate" id="54"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar53" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar55" inherits="CensusPlusLevelBarTemplate" id="55"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar54" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar56" inherits="CensusPlusLevelBarTemplate" id="56"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar55" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar57" inherits="CensusPlusLevelBarTemplate" id="57"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar56" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar58" inherits="CensusPlusLevelBarTemplate" id="58"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar57" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar59" inherits="CensusPlusLevelBarTemplate" id="59"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar58" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar60" inherits="CensusPlusLevelBarTemplate" id="60"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar59" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar61" inherits="CensusPlusLevelBarTemplate" id="61"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar60" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar62" inherits="CensusPlusLevelBarTemplate" id="62"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar61" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar63" inherits="CensusPlusLevelBarTemplate" id="63"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar62" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar64" inherits="CensusPlusLevelBarTemplate" id="64"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar63" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar65" inherits="CensusPlusLevelBarTemplate" id="65"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar64" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar66" inherits="CensusPlusLevelBarTemplate" id="66"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar65" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar67" inherits="CensusPlusLevelBarTemplate" id="67"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar66" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar68" inherits="CensusPlusLevelBarTemplate" id="68"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar67" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar69" inherits="CensusPlusLevelBarTemplate" id="69"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar68" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar70" inherits="CensusPlusLevelBarTemplate" id="70"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar69" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar71" inherits="CensusPlusLevelBarTemplate" id="71"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar70" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar72" inherits="CensusPlusLevelBarTemplate" id="72"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar71" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar73" inherits="CensusPlusLevelBarTemplate" id="73"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar72" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar74" inherits="CensusPlusLevelBarTemplate" id="74"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar73" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar75" inherits="CensusPlusLevelBarTemplate" id="75"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar74" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar76" inherits="CensusPlusLevelBarTemplate" id="76"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar75" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar77" inherits="CensusPlusLevelBarTemplate" id="77"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar76" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar78" inherits="CensusPlusLevelBarTemplate" id="78"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar77" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar79" inherits="CensusPlusLevelBarTemplate" id="79"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar78" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBar80" inherits="CensusPlusLevelBarTemplate" id="80"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBar79" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty1" inherits="CensusPlusLevelBarEmptyTemplate" id="1"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT"> + <Offset> + <AbsDimension x="32" y="-450" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty2" inherits="CensusPlusLevelBarEmptyTemplate" id="2"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty1" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty3" inherits="CensusPlusLevelBarEmptyTemplate" id="3"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty2" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty4" inherits="CensusPlusLevelBarEmptyTemplate" id="4"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty3" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty5" inherits="CensusPlusLevelBarEmptyTemplate" id="5"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty4" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty6" inherits="CensusPlusLevelBarEmptyTemplate" id="6"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty5" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty7" inherits="CensusPlusLevelBarEmptyTemplate" id="7"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty6" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty8" inherits="CensusPlusLevelBarEmptyTemplate" id="8"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty7" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty9" inherits="CensusPlusLevelBarEmptyTemplate" id="9"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty8" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty10" inherits="CensusPlusLevelBarEmptyTemplate" id="10"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty9" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty11" inherits="CensusPlusLevelBarEmptyTemplate" id="11"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty10" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty12" inherits="CensusPlusLevelBarEmptyTemplate" id="12"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty11" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty13" inherits="CensusPlusLevelBarEmptyTemplate" id="13"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty12" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty14" inherits="CensusPlusLevelBarEmptyTemplate" id="14"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty13" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty15" inherits="CensusPlusLevelBarEmptyTemplate" id="15"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty14" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty16" inherits="CensusPlusLevelBarEmptyTemplate" id="16"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty15" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty17" inherits="CensusPlusLevelBarEmptyTemplate" id="17"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty16" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty18" inherits="CensusPlusLevelBarEmptyTemplate" id="18"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty17" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty19" inherits="CensusPlusLevelBarEmptyTemplate" id="19"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty18" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty20" inherits="CensusPlusLevelBarEmptyTemplate" id="20"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty19" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty21" inherits="CensusPlusLevelBarEmptyTemplate" id="21"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty20" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty22" inherits="CensusPlusLevelBarEmptyTemplate" id="22"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty21" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty23" inherits="CensusPlusLevelBarEmptyTemplate" id="23"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty22" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty24" inherits="CensusPlusLevelBarEmptyTemplate" id="24"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty23" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty25" inherits="CensusPlusLevelBarEmptyTemplate" id="25"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty24" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty26" inherits="CensusPlusLevelBarEmptyTemplate" id="26"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty25" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty27" inherits="CensusPlusLevelBarEmptyTemplate" id="27"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty26" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty28" inherits="CensusPlusLevelBarEmptyTemplate" id="28"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty27" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty29" inherits="CensusPlusLevelBarEmptyTemplate" id="29"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty28" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty30" inherits="CensusPlusLevelBarEmptyTemplate" id="30"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty29" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty31" inherits="CensusPlusLevelBarEmptyTemplate" id="31"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty30" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty32" inherits="CensusPlusLevelBarEmptyTemplate" id="32"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty31" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty33" inherits="CensusPlusLevelBarEmptyTemplate" id="33"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty32" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty34" inherits="CensusPlusLevelBarEmptyTemplate" id="34"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty33" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty35" inherits="CensusPlusLevelBarEmptyTemplate" id="35"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty34" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty36" inherits="CensusPlusLevelBarEmptyTemplate" id="36"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty35" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty37" inherits="CensusPlusLevelBarEmptyTemplate" id="37"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty36" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty38" inherits="CensusPlusLevelBarEmptyTemplate" id="38"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty37" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty39" inherits="CensusPlusLevelBarEmptyTemplate" id="39"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty38" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty40" inherits="CensusPlusLevelBarEmptyTemplate" id="40"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty39" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty41" inherits="CensusPlusLevelBarEmptyTemplate" id="41"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty40" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty42" inherits="CensusPlusLevelBarEmptyTemplate" id="42"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty41" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty43" inherits="CensusPlusLevelBarEmptyTemplate" id="43"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty42" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty44" inherits="CensusPlusLevelBarEmptyTemplate" id="44"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty43" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty45" inherits="CensusPlusLevelBarEmptyTemplate" id="45"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty44" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty46" inherits="CensusPlusLevelBarEmptyTemplate" id="46"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty45" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty47" inherits="CensusPlusLevelBarEmptyTemplate" id="47"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty46" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty48" inherits="CensusPlusLevelBarEmptyTemplate" id="48"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty47" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty49" inherits="CensusPlusLevelBarEmptyTemplate" id="49"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty48" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty50" inherits="CensusPlusLevelBarEmptyTemplate" id="50"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty49" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty51" inherits="CensusPlusLevelBarEmptyTemplate" id="51"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty50" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty52" inherits="CensusPlusLevelBarEmptyTemplate" id="52"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty51" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty53" inherits="CensusPlusLevelBarEmptyTemplate" id="53"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty52" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty54" inherits="CensusPlusLevelBarEmptyTemplate" id="54"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty53" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty55" inherits="CensusPlusLevelBarEmptyTemplate" id="55"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty54" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty56" inherits="CensusPlusLevelBarEmptyTemplate" id="56"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty55" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty57" inherits="CensusPlusLevelBarEmptyTemplate" id="57"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty56" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty58" inherits="CensusPlusLevelBarEmptyTemplate" id="58"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty57" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty59" inherits="CensusPlusLevelBarEmptyTemplate" id="59"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty58" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty60" inherits="CensusPlusLevelBarEmptyTemplate" id="60"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty59" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty61" inherits="CensusPlusLevelBarEmptyTemplate" id="61"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty60" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty62" inherits="CensusPlusLevelBarEmptyTemplate" id="62"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty61" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty63" inherits="CensusPlusLevelBarEmptyTemplate" id="63"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty62" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty64" inherits="CensusPlusLevelBarEmptyTemplate" id="64"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty63" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty65" inherits="CensusPlusLevelBarEmptyTemplate" id="65"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty64" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty66" inherits="CensusPlusLevelBarEmptyTemplate" id="66"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty65" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty67" inherits="CensusPlusLevelBarEmptyTemplate" id="67"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty66" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty68" inherits="CensusPlusLevelBarEmptyTemplate" id="68"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty67" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty69" inherits="CensusPlusLevelBarEmptyTemplate" id="69"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty68" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty70" inherits="CensusPlusLevelBarEmptyTemplate" id="70"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty69" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty71" inherits="CensusPlusLevelBarEmptyTemplate" id="71"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty70" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty72" inherits="CensusPlusLevelBarEmptyTemplate" id="72"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty71" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty73" inherits="CensusPlusLevelBarEmptyTemplate" id="73"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty72" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty74" inherits="CensusPlusLevelBarEmptyTemplate" id="74"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty73" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty75" inherits="CensusPlusLevelBarEmptyTemplate" id="75"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty74" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty76" inherits="CensusPlusLevelBarEmptyTemplate" id="76"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty75" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty77" inherits="CensusPlusLevelBarEmptyTemplate" id="77"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty76" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty78" inherits="CensusPlusLevelBarEmptyTemplate" id="78"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty77" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty79" inherits="CensusPlusLevelBarEmptyTemplate" id="79"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty78" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + <Button name="CensusPlusLevelBarEmpty80" inherits="CensusPlusLevelBarEmptyTemplate" id="80"> + <Anchors> + <Anchor point="BOTTOMLEFT" relativeTo="CensusPlusLevelBarEmpty79" relativePoint="BOTTOMRIGHT"> + <Offset> + <AbsDimension x="4" y="0" /> + </Offset> + </Anchor> + </Anchors> + </Button> + </Frames> + <Scripts> + <OnLoad> + CensusPlus_OnLoad(); + </OnLoad> + <OnShow> + CensusPlus_OnShow(); + </OnShow> + <OnUpdate> + CensusPlus_OnUpdate(); + </OnUpdate> + <OnEvent> + CensusPlus_OnEvent(event,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9); + </OnEvent> + <OnMouseUp> + if ( this.isMoving ) then + this:StopMovingOrSizing(); + this.isMoving = false; + end + </OnMouseUp> + <OnMouseDown> + if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then + this:StartMoving(); + this.isMoving = true; + end + </OnMouseDown> + <OnHide> + if ( this.isMoving ) then + this:StopMovingOrSizing(); + this.isMoving = false; + end + </OnHide> + </Scripts> + </Frame> + <Frame name="CP_EU_US_Version" toplevel="true" enableMouse="true" movable="true" parent="UIParent" + hidden="true"> + <Size> + <AbsDimension x="300" y="100" /> + </Size> + <Anchors> + <Anchor point="CENTER" /> + </Anchors> + <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" + tile="true"> + <BackgroundInsets> + <AbsInset left="11" right="12" top="12" bottom="11" /> + </BackgroundInsets> + <TileSize> + <AbsValue val="32" /> + </TileSize> + <EdgeSize> + <AbsValue val="32" /> + </EdgeSize> + </Backdrop> + <Layers> + <Layer level="ARTWORK"> + <FontString name="CP_Title" inherits="GameFontHighlight" text="CENSUSPLUS_LOCALE_SELECT"> + <Size> + <AbsDimension x="300" y="15" /> + </Size> + <Anchors> + <Anchor point="TOP" relativeTo="CP_EU_US_Version"> + <Offset> + <AbsDimension x="0" y="-15" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Frames> + <Button name="CP_US" inherits="UIPanelButtonTemplate" text="US SERVERS"> + <Size> + <AbsDimension x="125" y="21" /> + </Size> + <Anchors> + <Anchor point="TOP" relativeTo="CP_EU_US_Version" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="-75" y="-45" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + CensusPlus_SelectLocale("US"); + </OnClick> + <OnEnter> + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPLUS_US_LOCALE, 1.0, 1.0, 1.0); + GameTooltip:Show(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + <Button name="CP_EU" inherits="UIPanelButtonTemplate" text="EURO SERVERS"> + <Size> + <AbsDimension x="125" y="21" /> + </Size> + <Anchors> + <Anchor point="TOP" relativeTo="CP_EU_US_Version" relativeFrom="TOPLEFT"> + <Offset> + <AbsDimension x="75" y="-45" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + CensusPlus_SelectLocale("EU"); + </OnClick> + <OnEnter> + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPLUS_EU_LOCALE, 1.0, 1.0, 1.0); + GameTooltip:Show(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + </Button> + </Frames> + </Frame> + <Frame name="CP_OptionsWindow" toplevel="true" enableMouse="true" movable="true" parent="UIParent" + hidden="true"> + <Size> + <AbsDimension x="250" y="300" /> + </Size> + <Anchors> + <Anchor point="CENTER"> + <Offset> + <AbsDimension x="0" y="0" /> + </Offset> + </Anchor> + </Anchors> + <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" + tile="true"> + <BackgroundInsets> + <AbsInset left="11" right="12" top="12" bottom="11" /> + </BackgroundInsets> + <TileSize> + <AbsValue val="32" /> + </TileSize> + <EdgeSize> + <AbsValue val="32" /> + </EdgeSize> + </Backdrop> + <Layers> + <Layer level="ARTWORK"> + <Texture name="CensusOptionsFrameHeader" file="Interface\DialogFrame\UI-DialogBox-Header"> + <Size> + <AbsDimension x="256" y="64"/> + </Size> + <Anchors> + <Anchor point="TOP"> + <Offset> + <AbsDimension x="0" y="12"/> + </Offset> + </Anchor> + </Anchors> + </Texture> + <FontString inherits="GameFontNormal" text="CENSUSPlus_OPTIONS_HEADER"> + <Anchors> + <Anchor point="TOP" relativeTo="CensusOptionsFrameHeader"> + <Offset> + <AbsDimension x="0" y="-14"/> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Frames> + <CheckButton name="CP_OptionAutoClose" id="0"> + <Size> + <AbsDimension x="20" y="20" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="200" y="-40" /> + </Offset> + </Anchor> + </Anchors> + <Layers> + <Layer name="CP_AutoCloseLabel"> + <FontString name="CP_OptionAutoCloseTitle" inherits="GameFontHighlight" text="CENSUSPlus_AUTOCLOSEWHO"> + <Anchors> + <Anchor point="RIGHT" relativePoint="LEFT"> + <Offset> + <AbsDimension x="-5" y="2" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Scripts> + <OnLoad> + this:SetFrameLevel(10); + </OnLoad> + <OnClick> + if ( this:GetChecked() ) then + PlaySound("igMainMenuOptionCheckBoxOff"); + CensusPlus_AutoCloseWho(1); + else + PlaySound("igMainMenuOptionCheckBoxOn"); + CensusPlus_AutoCloseWho(0); + end + </OnClick> + </Scripts> + <NormalTexture file="Interface\Buttons\UI-CheckBox-Up" /> + <PushedTexture file="Interface\Buttons\UI-CheckBox-Down" /> + <HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD" /> + <CheckedTexture file="Interface\Buttons\UI-CheckBox-Check" /> + <DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled" /> + </CheckButton> + <CheckButton name="CP_OptionAutoStartButton" id="1"> + <Size> + <AbsDimension x="20" y="20" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="200" y="-60" /> + </Offset> + </Anchor> + </Anchors> + <Layers> + <Layer name="CP_OptionAutoStartLayer"> + <FontString name="CP_OptionAutoStartText" inherits="GameFontHighlight" text="CENSUS_OPTIONS_AUTOSTART"> + <Size> + <AbsDimension x="100" y="15" /> + </Size> + <Anchors> + <Anchor point="RIGHT" relativePoint="LEFT"> + <Offset> + <AbsDimension x="-5" y="2" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Scripts> + <OnLoad> + this:SetFrameLevel(10); + </OnLoad> + <OnClick> + if ( this:GetChecked() ) then + PlaySound("igMainMenuOptionCheckBoxOff"); + CensusPlus_AutoStart(1); + else + PlaySound("igMainMenuOptionCheckBoxOn"); + CensusPlus_AutoStart(0); + end + </OnClick> + <OnEnter> + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_AUTOSTART_TOOLTIP, 1.0, 1.0, 1.0); + GameTooltip:Show(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + <NormalTexture file="Interface\Buttons\UI-CheckBox-Up" /> + <PushedTexture file="Interface\Buttons\UI-CheckBox-Down" /> + <HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD" /> + <CheckedTexture file="Interface\Buttons\UI-CheckBox-Check" /> + <DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled" /> + </CheckButton> + <CheckButton name="CP_OptionVerboseButton" id="2"> + <Size> + <AbsDimension x="20" y="20" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="200" y="-80" /> + </Offset> + </Anchor> + </Anchors> + <Layers> + <Layer name="CP_OptionVerboseLayer"> + <FontString name="CP_OptionVerboseText" inherits="GameFontHighlight" text="CENSUS_OPTIONS_VERBOSE"> + <Size> + <AbsDimension x="100" y="15" /> + </Size> + <Anchors> + <Anchor point="RIGHT" relativePoint="LEFT"> + <Offset> + <AbsDimension x="-5" y="2" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Scripts> + <OnLoad> + this:SetFrameLevel(10); + </OnLoad> + <OnClick> + if ( this:GetChecked() ) then + PlaySound("igMainMenuOptionCheckBoxOff"); + CensusPlus_Verbose(); + else + PlaySound("igMainMenuOptionCheckBoxOn"); + CensusPlus_Verbose(); + end + </OnClick> + <OnEnter> + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_VERBOSE_TOOLTIP, 1.0, 1.0, 1.0); + GameTooltip:Show(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + <NormalTexture file="Interface\Buttons\UI-CheckBox-Up" /> + <PushedTexture file="Interface\Buttons\UI-CheckBox-Down" /> + <HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD" /> + <CheckedTexture file="Interface\Buttons\UI-CheckBox-Check" /> + <DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled" /> + </CheckButton> + <CheckButton name="CP_OptionAutoCensusButton" id="2"> + <Size> + <AbsDimension x="20" y="20" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="200" y="-100" /> + </Offset> + </Anchor> + </Anchors> + <Layers> + <Layer name="CP_OptionAutoCensusLayer"> + <FontString name="CP_OptionAutoCensusText" inherits="GameFontHighlight" text="CENSUS_OPTIONS_AUTOCENSUS"> + <Size> + <AbsDimension x="100" y="15" /> + </Size> + <Anchors> + <Anchor point="RIGHT" relativePoint="LEFT"> + <Offset> + <AbsDimension x="-5" y="2" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Scripts> + <OnLoad> + this:SetFrameLevel(10); + </OnLoad> + <OnClick> + if ( this:GetChecked() ) then + PlaySound("igMainMenuOptionCheckBoxOff"); + CensusPlus_SetAutoCensus(1); + else + PlaySound("igMainMenuOptionCheckBoxOn"); + CensusPlus_SetAutoCensus(0); + end + </OnClick> + <OnEnter> + GameTooltip:SetOwner(this, "ANCHOR_RIGHT"); + GameTooltip:SetText(CENSUSPlus_AUTOCENSUS_TOOLTIP, 1.0, 1.0, 1.0); + GameTooltip:Show(); + </OnEnter> + <OnLeave> + GameTooltip:Hide(); + </OnLeave> + </Scripts> + <NormalTexture file="Interface\Buttons\UI-CheckBox-Up" /> + <PushedTexture file="Interface\Buttons\UI-CheckBox-Down" /> + <HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD" /> + <CheckedTexture file="Interface\Buttons\UI-CheckBox-Check" /> + <DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled" /> + </CheckButton> + <CheckButton name="CP_OptionAutoShowMinimapButton" id="1"> + <Size> + <AbsDimension x="20" y="20" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="200" y="-140" /> + </Offset> + </Anchor> + </Anchors> + <Layers> + <Layer name="CP_OptionAutoShowMinimapButtonLayer"> + <FontString name="CP_OptionAutoShowMinimapButtonText" inherits="GameFontHighlight" > + <Size> + <AbsDimension x="150" y="15" /> + </Size> + <Anchors> + <Anchor point="RIGHT" relativePoint="LEFT"> + <Offset> + <AbsDimension x="-5" y="2" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Scripts> + <OnLoad> + this:SetFrameLevel(10); + </OnLoad> + <OnClick> + if ( this:GetChecked() ) then + PlaySound("igMainMenuOptionCheckBoxOff"); + CensusPlus_Database["Info"]["CensusButtonShown"] = 1; + CensusButtonFrame:Show(); + else + PlaySound("igMainMenuOptionCheckBoxOn"); + CensusPlus_Database["Info"]["CensusButtonShown"] = 0; + CensusButtonFrame:Hide(); + end + </OnClick> + <OnLoad> + getglobal(this:GetName().."Text"):SetText(CENSUS_OPTIONS_BUTSHOW); + </OnLoad> + </Scripts> + <NormalTexture file="Interface\Buttons\UI-CheckBox-Up" /> + <PushedTexture file="Interface\Buttons\UI-CheckBox-Down" /> + <HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD" /> + <CheckedTexture file="Interface\Buttons\UI-CheckBox-Check" /> + <DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled" /> + </CheckButton> + <CheckButton name="CP_OptionPlaySoundOnCompleteButton" id="1"> + <Size> + <AbsDimension x="20" y="20" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="200" y="-160" /> + </Offset> + </Anchor> + </Anchors> + <Layers> + <Layer name="CP_OptionPlaySoundOnCompleteButtonLayer"> + <FontString name="CP_OptionPlaySoundOnCompleteButtonText" inherits="GameFontHighlight" > + <Size> + <AbsDimension x="150" y="15" /> + </Size> + <Anchors> + <Anchor point="RIGHT" relativePoint="LEFT"> + <Offset> + <AbsDimension x="-5" y="2" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Scripts> + <OnLoad> + this:SetFrameLevel(10); + getglobal(this:GetName().."Text"):SetText(CENSUS_OPTIONS_SOUND_ON_COMPLETE); + </OnLoad> + <OnClick> + if ( this:GetChecked() ) then + PlaySound("igMainMenuOptionCheckBoxOff"); + CensusPlus_PerCharInfo["PlayFinishSound"] = true; + else + PlaySound("igMainMenuOptionCheckBoxOn"); + CensusPlus_PerCharInfo["PlayFinishSound"] = false; + end + </OnClick> + </Scripts> + <NormalTexture file="Interface\Buttons\UI-CheckBox-Up" /> + <PushedTexture file="Interface\Buttons\UI-CheckBox-Down" /> + <HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD" /> + <CheckedTexture file="Interface\Buttons\UI-CheckBox-Check" /> + <DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled" /> + </CheckButton> + + <CheckButton name="CP_OptionUseLogarithmicBars" id="1"> + <Size> + <AbsDimension x="20" y="20" /> + </Size> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset> + <AbsDimension x="200" y="-180" /> + </Offset> + </Anchor> + </Anchors> + <Layers> + <Layer name="CP_OptionUseLogarithmicBarsLayer"> + <FontString name="CP_OptionUseLogarithmicBarsText" inherits="GameFontHighlight" > + <Size> + <AbsDimension x="150" y="15" /> + </Size> + <Anchors> + <Anchor point="RIGHT" relativePoint="LEFT"> + <Offset> + <AbsDimension x="-5" y="2" /> + </Offset> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Scripts> + <OnLoad> + this:SetFrameLevel(10); + </OnLoad> + <OnClick> + if ( this:GetChecked() ) then + PlaySound("igMainMenuOptionCheckBoxOff"); + CensusPlus_Database["Info"]["UseLogBars"] = 1; + CensusPlus_UpdateView(); + else + PlaySound("igMainMenuOptionCheckBoxOn"); + CensusPlus_Database["Info"]["UseLogBars"] = 0; + CensusPlus_UpdateView(); + end + </OnClick> + <OnLoad> + getglobal(this:GetName().."Text"):SetText(CENSUS_OPTIONS_LOG_BARS); + </OnLoad> + </Scripts> + <NormalTexture file="Interface\Buttons\UI-CheckBox-Up" /> + <PushedTexture file="Interface\Buttons\UI-CheckBox-Down" /> + <HighlightTexture file="Interface\Buttons\UI-CheckBox-Highlight" alphaMode="ADD" /> + <CheckedTexture file="Interface\Buttons\UI-CheckBox-Check" /> + <DisabledCheckedTexture file="Interface\Buttons\UI-CheckBox-Check-Disabled" /> + </CheckButton> + + <Button name="CP_OptionCloseButton" inherits="UIPanelCloseButton"> + <Anchors> + <Anchor point="TOPRIGHT"> + <Offset> + <AbsDimension x="-5" y="-5" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + PlaySound("igMainMenuOptionCheckBoxOn"); + HideUIPanel(CP_OptionsWindow); + </OnClick> + </Scripts> + </Button> + <Button name="CP_OptionExitButton" inherits="UIPanelButtonTemplate" text="Exit"> + <Size> + <AbsDimension x="77" y="21" /> + </Size> + <Anchors> + <Anchor point="LEFT" relativePoint="BOTTOMLEFT"> + <Offset> + <AbsDimension x="86" y="25" /> + </Offset> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + PlaySound("igMainMenuOptionCheckBoxOn"); + HideUIPanel(CP_OptionsWindow); + </OnClick> + </Scripts> + </Button> + </Frames> + <Scripts> + <OnShow> + CP_OptionsOnShow(); + </OnShow> + <OnMouseUp> + if ( this.isMoving ) then + this:StopMovingOrSizing(); + this.isMoving = false; + end + </OnMouseUp> + <OnMouseDown> + if ( ( ( not this.isLocked ) or ( this.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then + this:StartMoving(); + this.isMoving = true; + end + </OnMouseDown> + <OnHide> + if ( this.isMoving ) then + this:StopMovingOrSizing(); + this.isMoving = false; + end + </OnHide> + </Scripts> + </Frame> +</Ui>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CensusPlusPVP.lua Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,171 @@ +--[[ + CensusPlus for World of Warcraft(tm). + + Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com + + License: + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program(see GLP.txt); if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]] + + +------------------------------------------------------------------------------------ +-- +-- CensusPlus - PVP section +-- A WoW UI customization by Cooper Sellers +-- +-- +------------------------------------------------------------------------------------ + +local damagedTable = { }; + +----------------------------------------------------------------------------------- +-- +-- CensusPlus_PVPDeath -- Someone dies +-- +----------------------------------------------------------------------------------- +function CensusPlus_PVPDeath( msg ) + + +-- CensusPlus_Msg( "Msg = " .. msg ); +-- local value = string.sub( msg, 0, index-1 ); +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus_PVPDamage -- Damage is done +-- +----------------------------------------------------------------------------------- +function CensusPlus_PVPDamage( victim, dmg ) + local dealer = "player"; + local vict = "target"; + if( victim == "player" ) then + -- Hit us instead + end +end + + +----------------------------------------------------------------------------------- +-- +-- CensusPlus_ProcefssHonorInpsect -- Process honor inspect +-- +----------------------------------------------------------------------------------- +function CensusPlus_ProcessHonorInpsect() + local todayHK, todayDK, + yesterdayHK, yesterdayDK, + thisweekHK, thisweekHonor, + lastweekHK, lastweekHonor, lastweekStanding, + lifetimeHK, lifetimeDK, lifetimeHighestRank = GetInspectHonorData() + + if( g_CensusPlusLastTarget ~= nil ) then + g_CensusPlusLastTarget[4] = lifetimeHK; + g_CensusPlusLastTarget[5] = CensusPlus_DetermineServerDate() .. "&" .. lastweekHonor .. "&" .. lastweekStanding; + g_CensusPlusLastTarget[6] = lifetimeHighestRank; + + g_CensusPlusLastTarget[7] = CensusPlus_DetermineServerDate() .. ""; + end + + local unit = InspectFrame.unit; + +-- ClearInspectPlayer(); + g_CensusPlusLastTargetName = nil; + g_CensusPlusLastTarget = nil; +-- InspectFrame.unit = nil; +end + +----------------------------------------------------------------------------------- +-- +-- CensusPlus_ProcessMyHonor -- Process player honor +-- +----------------------------------------------------------------------------------- +function CensusPlus_ProcessMyHonor() + -- + -- Get the portion of the database for this server + -- + local realmName = g_CensusPlusLocale .. GetCVar("realmName"); + local realmDatabase = CensusPlus_Database["Servers"][realmName]; + if (realmDatabase == nil) then + CensusPlus_Database["Servers"][realmName] = {}; + realmDatabase = CensusPlus_Database["Servers"][realmName]; + end + + -- + -- Get the portion of the database for this faction + -- + local factionGroup = UnitFactionGroup("player"); + local factionDatabase = realmDatabase[factionGroup]; + if (factionDatabase == nil) then + realmDatabase[factionGroup] = {}; + factionDatabase = realmDatabase[factionGroup]; + end + + -- + -- Get racial database + -- + local raceGroup = UnitRace("player"); + local raceDatabase = factionDatabase[raceGroup]; + if (raceDatabase == nil) then + factionDatabase[raceGroup] = {}; + raceDatabase = factionDatabase[raceGroup]; + end + + -- + -- Get class database + -- + local classGroup = UnitClass( "player" ); + local classDatabase = raceDatabase[classGroup]; + if (classDatabase == nil) then + raceDatabase[classGroup] = {}; + classDatabase = raceDatabase[classGroup]; + end + + -- + -- Get this player's entry + -- + local playerName = UnitName( "player" ); + local entry = classDatabase[playerName]; + if (entry == nil) then + classDatabase[playerName] = {}; + entry = classDatabase[playerName]; + end + + local honorableKills, dishonorableKills, highestRank = GetPVPLifetimeStats(); + local lwhk, lwdk, lwcontribution, lwrank = GetPVPLastWeekStats() + + -- + -- Update the information + -- + + entry[1] = UnitLevel("player"); + entry[2], rank, index = GetGuildInfo("player"); + entry[3] = CensusPlus_DetermineServerDate() .. ""; + entry[4] = honorableKills; + + + entry[5] = CensusPlus_DetermineServerDate() .. "&" .. lwcontribution .. "&" .. lwrank; +-- entry[5] = dishonorableKills; + entry[6] = highestRank; + + entry[7] = CensusPlus_DetermineServerDate() .. ""; + + if( entry ~= nil ) then + rankNumber = UnitPVPRank("player"); + if( rankNumber ~= 0 ) then +-- rankName= GetPVPRankInfo( rankNumber ) + entry[8] = rankNumber; -- slot 8 will be current rank + else + entry[8] = 0; -- slot 8 will be current rank + end + end +end
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CensusPlusProfiler.lua Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,1068 @@ +--[[ + CensusPlus for World of Warcraft(tm). + + Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com + + License: + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version 2 + of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program(see GLP.txt); if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]] + + +CensusPlus_DoThisCharacter = false; +CensusPlus_Profile = {}; +CensusPlus_Profile[GetCVar("realmName")] = {} ; +local myCPProfile_LOADED = nil; -- Successful load of the script + +-- ////////////////////////////////////////////// +-- Configuration Variables +-- ////////////////////////////////////////////// +-- set to nil to disable any of the following + + myCPProfile_ENABLED = 0; -- Enable the profiler? + +local myCPProfile_DoScanInventory = 0; -- get inventory? +local myCPProfile_DoScanBank = 0; -- get bank? +local myCPProfile_DoScanEquipment = 0; -- get equipment? +local myCPProfile_DoScanSkills = 0; -- get skills? +local myCPProfile_DoScanTalents = 0; -- get talents? +local myCPProfile_DoScanProfessions = 0; -- output known tradeskill recipies +local myCPProfile_DoScanReputation = 0; -- get reputation? +local myCPProfile_DoScanQuestLog = 0; -- get quests? +local myCPProfile_DoScanHonor = 0; -- get honor? + +local myCPProfile_HTML_Tooltips = 1; -- make html tooltips (non-array format) - separate lines with <br> +local myCPProfile_TALENTS_Full = 1; -- output all talents and tooltips + + +local myCPProfile_DEBUG = 1; -- enable debugging? unused at this time +local myCPProfile_ALLEVENTS = nil; -- enable all event catching? for debugging only + +-- ////////////////////////////////////////////// + +local TradeSkillDifficultyCode = {}; +TradeSkillDifficultyCode['optimal'] = 4; +TradeSkillDifficultyCode['medium'] = 3; +TradeSkillDifficultyCode['easy'] = 2; +TradeSkillDifficultyCode['trivial'] = 1; +TradeSkillDifficultyCode['header'] = 0; + +local myCPProfile_VERSION = "1.0.0"; -- this only changes when a new variable is added to the output + +local timePlayed = -1; +local timeLevelPlayed = -1; + +-- array of inventory slot names +local Profile_slots = { + "Head", -- 1 + "Neck", -- 2 + "Shoulder", -- 3 + "Shirt", -- 4 + "Chest", -- 5 + "Waist", -- 6 + "Legs", -- 7 + "Feet", -- 8 + "Wrist", -- 9 + "Hands", -- 10 + "Finger0", -- 11 + "Finger1", -- 12 + "Trinket0", -- 13 + "Trinket1", -- 14 + "Back", -- 15 + "MainHand", -- 16 + "SecondaryHand", -- 17 + "Ranged", -- 18 + "Tabard", -- 19 +}; + +function CP_ProfileFrame_OnLoad() + + -- Shut it down for now + if( true ) then + return; + end + this:RegisterEvent("VARIABLES_LOADED"); + if ( myCPProfile_ALLEVENTS ) then -- unused, but keep for testing + this:RegisterEvent("PLAYER_GUILD_UPDATE"); + this:RegisterEvent("UNIT_INVENTORY_CHANGED"); + this:RegisterEvent("VARIABLES_LOADED"); + this:RegisterEvent("TRAINER_CLOSED"); + this:RegisterEvent("PLAYER_LEVEL_UP"); + end + this:RegisterEvent("TIME_PLAYED_MSG"); + this:RegisterEvent("BANKFRAME_CLOSED"); -- 12/17, was OPENED, will it work with closed only? + + this:RegisterEvent("TRADE_SKILL_SHOW"); + this:RegisterEvent("CRAFT_SHOW"); +end + +-- since PLAYER_QUITTING and PLAYER_CAMPING events don't work, hook the functions +-- NOTE: Due to server lag, this could be a cause of the client not actually logging the character out until the server catches up +--[[ +oldLogout = Logout; +oldQuit = Quit; +function Quit() + RequestTimePlayed(); + oldQuit(); +end +function Logout() + RequestTimePlayed(); + oldLogout(); +end +]]-- + +function CP_ProfileFrame_OnEvent(event, arg1, arg2) + + -- crapout if we're not ready to process, or if not enabled + 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 + return; + end + +-- CensusPlus_Msg( "PROF TEST : " .. event ); + + -- Got a unit name, now we're loaded + if (event == "VARIABLES_LOADED" and not myCPProfile_LOADED) then + myCPProfile_LOADED = 1; + PaperDollFrame_SetDamage(); + PaperDollFrame_SetRangedDamage(); + elseif (event == "VARIABLES_LOADED" and myCPProfile_LOADED) then + return; + end + + if (event == "TIME_PLAYED_MSG") then + timePlayed = arg1; + timeLevelPlayed = arg2; + end + + -- Event hit, process profile + if (myCPProfile_LOADED) then + Profile_InitProfile(); -- Always do this first, creates a profile is it doesn't exist + + if( ( event == "BANKFRAME_CLOSED" or event == "BANKFRAME_OPENED" or event == "PLAYERBANKSLOTS_CHANGED" ) and myCPProfile_DoScanBank ) then + Profile_ScanBank(); + CP_ProfHidden:ClearLines(); + CP_ProfHidden:Hide(); + return; + end + if ( not myCPProfile_DoScanBank and CensusPlus_Profile[GetCVar("realmName")][UnitName("player")] ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"] = nil; + end + if ( myCPProfile_DoScanProfessions ) then + if ( event == "TRADE_SKILL_SHOW" ) then + Profile_ScanTradeSkill(); + CP_ProfHidden:ClearLines(); + CP_ProfHidden:Hide(); + return; + end + + if ( event == "CRAFT_SHOW" ) then + Profile_ScanCraft(); + CP_ProfHidden:ClearLines(); + CP_ProfHidden:Hide(); + return; + end + elseif ( CensusPlus_Profile[GetCVar("realmName")][UnitName("player")] ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] = nil; + end + + CP_ProfHidden:ClearLines(); + CP_ProfHidden:Hide(); + end +end + +function Profile_InitProfile() + if ( not CensusPlus_Profile ) then + CensusPlus_Profile = {}; + end + + if ( not CensusPlus_Profile[GetCVar("realmName")] ) then + CensusPlus_Profile[GetCVar("realmName")] = {}; + end + + if ( not CensusPlus_Profile[GetCVar("realmName")][UnitName("player")] ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")] = {}; + else + local tmpBank = CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]; + local tmpProfessions = CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"]; + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")] = { }; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"] = tmpBank; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] = tmpProfessions; + end + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["ProfilerVersion"] = myCPProfile_VERSION; -- keep track of version and don't work with old data + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Name"] = playerName; + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["DateUpdated"] = date(); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["TimePlayed"] = timePlayed; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["TimeLevelPlayed"] = timeLevelPlayed; + + local sex = ""; + if (UnitSex("player") == 0) then + sex = "Male"; + else + sex = "Female"; + end + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Sex"] = sex; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Race"] = UnitRace("player"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Class"] = UnitClass("player"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Level"] = UnitLevel("player"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Guild"] = {} ; + 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"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Server"] = GetCVar("realmName"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["TalentPoints"] = UnitCharacterPoints("player"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Zone"] = GetZoneText(); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["SubZone"] = GetSubZoneText(); + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Experience"] = UnitXP("player") .. ":" .. UnitXPMax("player"); + + local money = GetMoney(); + local gold = floor(money / (COPPER_PER_SILVER * SILVER_PER_GOLD)); + local silver = floor((money - (gold * COPPER_PER_SILVER * SILVER_PER_GOLD)) / COPPER_PER_SILVER); + local copper = mod(money, COPPER_PER_SILVER); + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Money"] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Money"]["Gold"] = gold; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Money"]["Silver"] = silver; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Money"]["Copper"] = copper; + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"] = {}; + + -- "stat" is the same as effectiveStat... + -- problem here is if they have a debuff spell on, the values saved will be wrong + local stat, effectiveStat, posBuff, negBuff = UnitStat("player", 1); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"]["Strength"] = (stat - posBuff - negBuff) .. ":" .. effectiveStat .. ":" .. posBuff .. ":" .. negBuff; + stat, effectiveStat, posBuff, negBuff = UnitStat("player", 2); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"]["Agility"] = (stat - posBuff - negBuff) .. ":" .. effectiveStat .. ":" .. posBuff .. ":" .. negBuff; + stat, effectiveStat, posBuff, negBuff = UnitStat("player", 3); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"]["Stamina"] = (stat - posBuff - negBuff) .. ":" .. effectiveStat .. ":" .. posBuff .. ":" .. negBuff; + stat, effectiveStat, posBuff, negBuff = UnitStat("player", 4); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"]["Intellect"] = (stat - posBuff - negBuff) .. ":" .. effectiveStat .. ":" .. posBuff .. ":" .. negBuff; + stat, effectiveStat, posBuff, negBuff = UnitStat("player", 5); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Stats"]["Spirit"] = (stat - posBuff - negBuff) .. ":" .. effectiveStat .. ":" .. posBuff .. ":" .. negBuff; + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"] = {}; + local base, resistance, positive, negative = UnitResistance("player", 6); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"]["Arcane"] = base .. ":" .. resistance .. ":" .. positive .. ":" .. negative; + base, resistance, positive, negative = UnitResistance("player", 2); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"]["Fire"] = base .. ":" .. resistance .. ":" .. positive .. ":" .. negative; + base, resistance, positive, negative = UnitResistance("player", 3); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"]["Nature"] = base .. ":" .. resistance .. ":" .. positive .. ":" .. negative; + base, resistance, positive, negative = UnitResistance("player", 4); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"]["Frost"] = base .. ":" .. resistance .. ":" .. positive .. ":" .. negative; + base, resistance, positive, negative = UnitResistance("player", 5); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Resists"]["Shadow"] = base .. ":" .. resistance .. ":" .. positive .. ":" .. negative; + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Mana"] = UnitManaMax("player"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Health"] = UnitHealthMax("player"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Defense"] = UnitDefense("player"); + + local baseArm, effectiveArmor, armor, positiveArm, negativeArm = UnitArmor("player"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Armor"] = baseArm .. ":" .. (baseArm + positiveArm) .. ":" .. positiveArm .. ":" .. negativeArm; -- if they have a debuf on, don't save it + + local minDamage, maxDamage, physicalBonusPos, physicalBonusNeg, percent = UnitDamage("player"); +-- local baseDamage = (minDamage + maxDamage) * 0.5; +-- local fullDamage = (baseDamage + physicalBonusPos + physicalBonusNeg) * percent; +-- local totalBonus = (fullDamage - baseDamage); +-- local displayMin = floor(minDamage + totalBonus); +-- local displayMax = ceil(maxDamage + totalBonus); + + CP_ProfHidden:SetOwner(CensusPlus_ProfileFrame, "ANCHOR_CURSOR"); + + CP_ProfHidden:SetText(INVTYPE_WEAPONMAINHAND, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b); + 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); + 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); + 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); + -- Check for offhand weapon + if ( CharacterDamageFrame.offhandAttackSpeed ) then + CP_ProfHidden:AddLine("<br>"); + CP_ProfHidden:AddLine(INVTYPE_WEAPONOFFHAND, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b); + 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); + 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); + 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); + end + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["AttackRating"] = UnitAttackBothHands("player"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["DamageRange"] = floor(minDamage) .. ":" .. ceil(maxDamage); + local base, posBuff, negBuff = UnitAttackPower("player"); + local effective = base + posBuff + negBuff; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["AttackPower"] = base .. ":" .. effective .. ":" .. posBuff .. ":" .. negBuff; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["DamageRangeTooltip"] = CP_Tooltipscan(); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["AttackPowerTooltip"] = CharacterAttackPowerFrame.tooltipSubtext; + + -- Ranged not saved if there is no ranged weapon equipped + if ( PaperDollFrame.noRanged ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"] = nil; + else + CP_ProfHidden:SetText(INVTYPE_RANGED, HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b); + 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); + 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); + 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); + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["AttackPowerTooltip"] = CharacterRangedAttackPowerFrame.tooltipSubtext; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["DamageRangeTooltip"] = CP_Tooltipscan(); + + local RangeSpeeed, RangeMinDMG,RangeMaxDMG = UnitRangedDamage("player"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["DamageRange"] = max(floor(RangeMinDMG),1) .. ":" .. max(ceil(RangeMaxDMG),1); + local base, pos, neg = UnitRangedAttackPower("player"); + local effective = base + pos + neg; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["AttackPower"] = base .. ":" .. effective .. ":" .. pos .. ":" .. neg; + local base, pos, neg = UnitRangedAttack("player"); + if (not neg) then neg = 0; end; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["AttackRating"] = base; + end + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["DodgePercent"] = strsub(GetDodgeChance(), 0, 5); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["ParryPercent"] = strsub(GetParryChance(), 0, 5); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["BlockPercent"] = strsub(GetBlockChance(), 0, 5); + + local MainAC, EffAC, AC, PosAC, NegAC = UnitArmor("player"); + local Level = UnitLevel("player"); + local Mitigation = (EffAC)/((85 * Level)+400); + Mitigation = 100 * (Mitigation/(Mitigation + 1)); + Mitigation = strsub(Mitigation, 0, 5); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["MitigationPercent"] = Mitigation; + + local spellIndex = 1; + local spellName, subSpellName = GetSpellName(spellIndex,BOOKTYPE_SPELL); + local tmpStr = nil; + while spellName do + if (spellName == "Attack") then + CP_ProfHidden:SetSpell(spellIndex, BOOKTYPE_SPELL); + if( CP_Tooltipscan() ~= nil ) then + tmpStr = string.gsub(CP_Tooltipscan(), ".*<br/?>(%d?%d?%d%.%d%d?)%%.*", "%1"); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["CritPercent"] = tmpStr; + end + end + spellIndex = spellIndex + 1; + spellName,subSpellName = nil; + spellName,subSpellName = GetSpellName(spellIndex,BOOKTYPE_SPELL); + end +--[[ + local speed, offhandSpeed = UnitAttackSpeed("player"); + local minDamage, maxDamage, minOffHandDamage, maxOffHandDamage, physicalBonusPos, physicalBonusNeg, percent = UnitDamage("player"); + local baseDamage = (minDamage + maxDamage) * 0.5; + local fullDamage = (baseDamage + physicalBonusPos + physicalBonusNeg) * percent; + local damagePerSecond = max( fullDamage, 1 ) / speed; + minDamage = max( floor( minDamage ), 1 ); + maxDamage = max( ceil( maxDamage ),1 ); + speed = string.format( "%.2f", speed ); + damagePerSecond = string.format( "%.1f", damagePerSecond ); + local damagerange = minDamage.." - "..maxDamage; + local output = INVTYPE_WEAPONMAINHAND .. "<br>" + .. ATTACK_SPEED_COLON .. speed .. "<br>" + .. DAMAGE_COLON .. damagerange .. "<br>" + .. DAMAGE_PER_SECOND .. damagePerSecond + if ( offhandSpeed ) then + local offhandBaseDamage = (minOffHandDamage + maxOffHandDamage) * 0.5; + local offhandFullDamage = (offhandBaseDamage + physicalBonusPos + physicalBonusNeg) * percent; + local offhandDamagePerSecond = (max(offhandFullDamage,1) / offhandSpeed); + minOffHandDamage=max(floor(minOffHandDamage),1); + maxOffHandDamage=max(ceil(maxOffHandDamage),1); + local damagerange = minOffHandDamage.." - "..maxOffHandDamage; + offhandDamagePerSecond = string.format( "%.1f", offhandDamagePerSecond ); + offhandSpeed=string.format("%.2f", offhandSpeed); + output = output .. INVTYPE_WEAPONOFFHAND .. "<br>" + .. ATTACK_SPEED_COLON .. offhandSpeed .. "<br>" + .. DAMAGE_COLON .. damagerange .. "<br>" + .. DAMAGE_PER_SECOND .. offhandDamagePerSecond; + end + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Melee Attack"]["DamageRangeTooltip"] = output; + + local speed, minDamage, maxDamage = UnitRangedDamage("player"); + minDamage = (minDamage / percent) - physicalBonusPos - physicalBonusNeg; + maxDamage = (maxDamage / percent) - physicalBonusPos - physicalBonusNeg; + local baseDamage = (minDamage + maxDamage) * 0.5; + local fullDamage = (baseDamage + physicalBonusPos + physicalBonusNeg) * percent; + local damagePerSecond = (max(fullDamage,1) / speed); + minDamage = max(floor(minDamage),1); + maxDamage = max(ceil(maxDamage),1); + speed=string.format("%.2f", speed); + damagePerSecond=string.format("%.1f", damagePerSecond); + local damagerange = max(floor(minDamage),1).." - "..max(ceil(maxDamage),1); + output = INVTYPE_RANGED .. "<br>" + .. ATTACK_SPEED_COLON .. speed .. "<br>" + .. DAMAGE_COLON .. damagerange .. "<br>" + .. DAMAGE_PER_SECOND .. damagePerSecond; + local base,pos,neg=UnitRangedAttack( "player" ); + if(base==0) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["DamageRangeTooltip"] = ""; + else + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Ranged Attack"]["DamageRangeTooltip"] = output; + end +]]-- +-- put in dps? + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Locale"] = GetLocale(); + Profile_DoBuffs(); + + if ( myCPProfile_DoScanSkills ) then + Profile_GetSkills(); + end + if ( myCPProfile_DoScanEquipment) then + Profile_UpdateInventory(); + end + if ( myCPProfile_DoScanInventory ) then + Profile_ScanInventory(); + end + if ( myCPProfile_DoScanTalents and UnitLevel("player") > 9 ) then + Profile_GetTalents(); + end + if ( myCPProfile_DoScanReputation ) then + Profile_ScanReputation(); + end + if ( myCPProfile_DoScanQuestLog ) then + Profile_ScanQuests(); + end + if ( myCPProfile_DoScanHonor ) then + Profile_ScanHonor(); + end +end + +function Profile_ScanQuests() + local header = "Unknown"; + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"] = {}; + local slot = 1; + for i=1, GetNumQuestLogEntries(), 1 do + local text, level, questtag, isHeader, isCollapsed = GetQuestLogTitle(i); + if ( isHeader ) then + header = text; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"][header] = {} + else + if ( text ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"][header][slot] = {} + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"][header][slot]["Title"] = text; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"][header][slot]["Level"] = level; + if ( questtag ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Quests"][header][slot]["Tag"] = questtag; + end + end + slot = slot + 1; + end + end +end + +function Profile_ScanHonor() + -- save the honor data + local lastweekHK, lastweekDK, lastweekContribution, lastweekRank = GetPVPLastWeekStats(); + local lifetimeHK, lifetimeDK, lifetimeHighestRank = GetPVPLifetimeStats(); + local sessionHK, sessionDK = GetPVPSessionStats(); + local yesterdayHK, yesterdayDK, yesterdayContribution = GetPVPYesterdayStats(); + local lifetimeRankName, lifetimeRankNumber = GetPVPRankInfo(lifetimeHighestRank); + if ( not lifetimeRankName ) then + lifetimeRankName = NONE; + end + + local rankName, rankNumber = GetPVPRankInfo(UnitPVPRank("player")); + if ( not rankName ) then + rankName = NONE; + end + local rankInfo = "("..RANK.." "..rankNumber..")"; + + -- set icon + local rankIcon = ""; + if ( rankNumber > 0 ) then + rankIcon = string.format("%s%02d","Interface\\PvPRankBadges\\PvPRank", rankNumber); + end + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"] = {} ; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LifetimeHighestRank"] = lifetimeHighestRank; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LifetimeRankName"] = lifetimeRankName; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LifetimeHK"] = lifetimeHK; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LifetimeDK"] = lifetimeDK; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["SessionHK"] = sessionHK; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["SessionDK"] = sessionDK; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["YesterdayHK"] = yesterdayHK; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["YesterdayDK"] = yesterdayDK; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["YesterdayContribution"] = yesterdayContribution; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LastWeekHK"] = lastweekHK; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LastWeekDK"] = lastweekDK; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LastWeekContribution"] = lastweekContribution; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["LastWeekRank"] = lastweekRank; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["RankName"] = rankName; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["RankInfo"] = rankInfo; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Honor"]["RankIcon"] = rankIcon; +end + + +function Profile_ScanReputation() -- Originally by Leronflon, modified to fit my style =) + local count; + local name, standing, rep, atWar, canToggle, foo2, foo3, thisHeader, isHeader; + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"] = {}; + + count = GetNumFactions(); + + if( count == nil ) then + return; + end + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"]["Count"] = count; + + local Units = { }; + Units[1] = 36000; -- Hated + Units[2] = 3000; -- Hostile + Units[3] = 3000; -- Unfriendly + Units[4] = 3000; -- Neutral + Units[5] = 6000; -- Friendly + Units[6] = 12000; -- Honored + Units[7] = 21000; -- Revered + Units[8] = 1000; -- Exaulted + + local ReputationKey = { [0] = "Unknown", [1] = "Hated", [2] = "Hostile", [3] = "Unfriendly", [4] = "Neutral", [5] = "Friendly", [6] = "Honored", [7] = "Revered", [8] = "Exaulted" }; + + + thisHeader = "none"; + for i = 1, count do + name, description, standing, barValue, atWar, canToggle, isHeader, isCollapsed = GetFactionInfo(i); + + if( name ~= nil ) then + if (atWar == nil) then + atWar = 0; + end + if (rep == nil) then + rep = 0; + end + if (standing == nil) then + standing = 0; + end + if (isHeader == nil ) then + thisHeader = name; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader] = {}; + else + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name]["Standing"] = ReputationKey[standing]; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name]["AtWar"] = atWar; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name]["Value"] = round(barValue*Units[standing]).."/"..Units[standing]; + -- CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name]["canToggle"] = canToggle; + -- CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Reputation"][thisHeader][name]["Order"] = i; + end + end + end +end + +function Profile_GetTalents() + local numTabs = GetNumTalentTabs(); + local name, iconTexture, tier, column, rank, maxRank; + local numTalents; + local tabname, texture, points, fileName; + + -- Make sure the right frame is loaded + if( not CensusPlus_IsTalentLoaded() ) then + return; + end + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"] = {}; + + for x=1, numTabs do + PanelTemplates_SetTab(TalentFrame, x); + numTalents = GetNumTalents(PanelTemplates_GetSelectedTab(TalentFrame)); + tabname, texture, points, fileName = GetTalentTabInfo(PanelTemplates_GetSelectedTab(TalentFrame)); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname]["PointsSpent"] = points; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname]["Background"] = "Interface\\TalentFrame\\" .. fileName; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname]["Order"] = x; + for i=1, numTalents do + name, iconTexture, tier, column, rank, maxRank = GetTalentInfo(PanelTemplates_GetSelectedTab(TalentFrame), i); + if (rank > 0 or myCPProfile_TALENTS_Full) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name] = { }; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name]["Rank"] = rank .. ":" .. maxRank; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name]["Location"] = tier .. ":" .. column; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name]["Texture"] = iconTexture; + end + + if ( myCPProfile_TALENTS_Full ) then + -- double check + if ( not CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name] ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name] = {}; + end + CP_ProfHidden:SetTalent(PanelTemplates_GetSelectedTab(TalentFrame), i) + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Talents"][tabname][name]["Tooltip"] = CP_Tooltipscan(); + end + end + end +end + +function Profile_DoBuffs() + local iIterator = 0; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Buffs"] = {}; + while( GetPlayerBuffTexture( iIterator ) ) do + buffText = GetPlayerBuffTexture( iIterator); + iIterator = iIterator + 1 + CP_ProfHidden:SetUnitBuff( "player", iIterator ); + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Buffs"][iIterator] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Buffs"][iIterator]["Tooltip"] = CP_Tooltipscan(); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Buffs"][iIterator]["Texture"] = buffText; + end +--[[ + iIterator = 1; + while( UnitDebuff( "player", iIterator ) ) do + debuffTexture, debuffApplications = UnitDebuff(unitName, debuffIndex); + CP_ProfHidden:SetUnitDebuff( "player", iIterator-1 ); + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Debuffs"][iIterator] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Debuffs"][iIterator]["Tooltip"] = CP_Tooltipscan(); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Debuffs"][iIterator]["Texture"] = debuffTexture; + iIterator = iIterator + 1 + end +]]-- +end + +function Profile_GetSkills() + -- Reset/Initialize + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Skills"] = {}; + local skillheader = ''; + local skillinfo = nil; + local rank, maxRank = 0; + local order = 1; -- order in which the headers appear + for i=1, GetNumSkillLines(), 1 do + skillinfo = fixnilempty(GetSkillLineInfo(i)); + rank = skillinfo[4]; + maxRank = skillinfo[7]; + if(skillinfo[2] == 1) then -- if it is a header + skillheader = skillinfo[1]; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Skills"][skillheader] = { }; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Skills"][skillheader]["Order"] = order; + order = order + 1; + else + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Skills"][skillheader][skillinfo[1]] = rank .. ":" .. maxRank; + end + end +end + + +--------------------------------------------- +-- Process Inventory +--------------------------------------------- + +function Profile_UpdateInventory() + local link; + local texture; + + -- Reset/Initialize + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"] = {}; + + for index,slot in Profile_slots do + link = GetInventoryItemLink("player", index); + texture = GetInventoryItemTexture("player", index); + if( link ) then + for color, item, name in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do + if( color ~= nil and item ~= nil and name ~= nil ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot] = { }; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot]["Texture"] = texture; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot]["Color"] = color; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot]["Item"] = item; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot]["Name"] = name; + -- Build Tooltip + --CP_ProfHidden:SetHyperlink("item:" .. item); + CP_ProfHidden:SetInventoryItem("player", index); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Equipment"][slot]["Tooltip"] = CP_Tooltipscan(); + + end + end + end + end +end + +function Profile_ScanInventory() + local bag, bagname, link, texture, color, item, strings, str; + + -- Reset/Initialize + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"] = {} + + for bag = 0,4 do + if (bag == 0) then + bagname = "Backpack"; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag] = { }; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Name"] = "Backpack"; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Item"] = "Backpack"; + if ( myCPProfile_HTML_Tooltips ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Tooltip"] = "Backpack"; + else + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Tooltip"] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Tooltip"][1] = "Backpack"; + end + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Color"] = "ffffffff"; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Slots"] = 16; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Texture"] = "Interface\\Buttons\\Button-Backpack-Up"; + ProcessBagItems(bag, bagname); + else + link = GetInventoryItemLink("player", (bag+19)); + texture = GetInventoryItemTexture("player", (bag+19)); + if( link ) then + for color, item, bagname in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do + if( color ~= nil and item ~= nil and bagname ~= nil ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag] = { }; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Item"] = item; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Color"] = color; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Texture"] = texture; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Name"] = bagname; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Slots"] = GetContainerNumSlots(bag); + CP_ProfHidden:SetInventoryItem("player", (bag+19)) + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Tooltip"] = CP_Tooltipscan(); + ProcessBagItems(bag); + end + end + end + end + end +end + +function ProcessBagItems(bag) + local slot, strings, str, texture, itemCount, locked, quality, link, color, item, name; + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"] = {}; + + for slot = 1,GetContainerNumSlots(bag) do -- loop through all slots in this bag and get items + + CP_ProfHidden:SetBagItem(bag, slot); + + texture, itemCount, locked, quality = GetContainerItemInfo(bag,slot); + link = GetContainerItemLink(bag, slot); + if( link ) then + for color, item, name in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do + if( color ~= nil and item ~= nil and name ~= nil ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Tooltip"] = CP_Tooltipscan(); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Texture"] = texture; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Quantity"] = itemCount; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Name"] = name; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Color"] = color; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Inventory"]["Bag" .. bag]["Contents"][slot]["Item"] = item; + end + end + end + end +end + + +-- From CosmosCommonFunctions.lua +-- Clears a tooltip for usage. +function ClearTooltip(TooltipNameBase) + for i=1, 15, 1 do + getglobal(TooltipNameBase.."TextLeft"..i):SetText(""); + getglobal(TooltipNameBase.."TextRight"..i):SetText(""); + end +end + + +function Profile_ScanBank() +-- Borrowed from Telo's LootLink and restructured to fit my data + local oldBank = nil; + if (CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]) then + oldBank = CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]; + end + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"] = {} + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"] = {} + + local bag, size, slot, link; + + -- First the bank container itself + size = GetContainerNumSlots(BANK_CONTAINER); + for slot = size, 1, -1 do + link = GetContainerItemLink(BANK_CONTAINER, slot); + local texture, itemCount, locked = GetContainerItemInfo(BANK_CONTAINER, slot); + if( link ) then + for color, item, name in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do + if( color ~= nil and item ~= nil and name ~= nil ) then + oldBank = nil; -- When we find items, remove the oldBank variable + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Texture"] = texture; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Quantity"] = itemCount; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Name"] = name; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Color"] = color; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Item"] = item; + CP_ProfHidden:SetHyperlink("item:" .. item); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Contents"][slot]["Tooltip"] = CP_Tooltipscan(); + end + end + end + end + + -- Now the bank bags + for bag = 5, 10 do + link = GetContainerItemLink(BANK_CONTAINER, (bag+20)); + texture, itemCount, locked, quality = GetContainerItemInfo(BANK_CONTAINER, (bag+20)); + if( link ) then + for color, item, bagname in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do + if( color ~= nil and item ~= nil and bagname ~= nil ) then + oldBank = nil; -- When we find items, remove the oldBank variable + bagnum = bag-4; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Name"] = bagname; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Slots"] = GetContainerNumSlots(bag); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Texture"] = texture; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Color"] = color; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Item"] = item; + CP_ProfHidden:SetHyperlink("item:" .. item); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Tooltip"] = CP_Tooltipscan(); + + ProcessBankBagItems(bag, bagnum); + end + end + end + end + + if ( oldBank ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"] = oldBank; + end +end + +function ProcessBankBagItems(bag, bagnum) + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"] = {}; + + for slot = 1,GetContainerNumSlots(bag) do -- loop through all slots in this bag and get items +-- CP_ProfHidden:SetBagItem(bag, slot); + texture, itemCount, locked, quality = GetContainerItemInfo(bag,slot); + link = GetContainerItemLink(bag, slot); + if( link ) then + for color, item, name in string.gfind(link, "|c(%x+)|Hitem:(%d+:%d+:%d+:%d+)|h%[(.-)%]|h|r") do + if( color ~= nil and item ~= nil and name ~= nil ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot] = {}; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Texture"] = texture; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Quantity"] = itemCount; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Name"] = name; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Color"] = color; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Item"] = item; + CP_ProfHidden:SetBagItem(bag, slot); +-- CP_ProfHidden:SetHyperlink("item:" .. item); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Bank"]["Bag" .. bagnum]["Contents"][slot]["Tooltip"] = CP_Tooltipscan(); + end + end + end + end +end + + +function Profile_ScanTradeSkill() + local skillLineName, skillLineRank, skillLineMaxRank = GetTradeSkillLine(); + + if( (not skillLineName) or (skillLineName == "") or (skillLineName == "UNKNOWN")) then + return; + end + -- we don't bother saving the following tradeskills + if( (skillLineName == "Fishing") or (skillLineName == "Mining") or (skillLineName == "Herbalism") or (skillLineName == "Skinning") ) then + return; + end + + if ( not CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] = {}; + end + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName] = {}; + + -- expand the tree so we can see all the recipes + ExpandTradeSkillSubClass(0); + + -- get the number of recipes and loop through each one + local numTradeSkills = GetNumTradeSkills(); + local skillHeader = skillLineName; + for itemIndex=1, numTradeSkills, 1 do + if( itemIndex == nil or skillLineName==nil or skillHeader==nil ) then + return; + end + local skillText = ""; + local skillName, skillDifficulty, numAvailable, isExpanded = GetTradeSkillInfo(itemIndex); + if( skillDifficulty ~= "header" and skillLineName ~= nil and skillLineName ~= "" and skillHeader ~= nil and skillHeader ~= "" and skillName ~= nil and skillName ~= "" ) then + if( not CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader] ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader] = {}; + end + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName] = {}; + local skillIcon = GetTradeSkillIcon(itemIndex); + if( not skillIcon ) then + skillIcon = ""; + end + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Texture"] = skillIcon; + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Difficulty"] = TradeSkillDifficultyCode[skillDifficulty]; + + CP_ProfHidden:SetTradeSkillItem(itemIndex); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Tooltip"] = CP_Tooltipscan(); + + + + local numReagents = GetTradeSkillNumReagents(itemIndex); + local reagents = ''; + for reagentIndex=1, numReagents, 1 do + local reagentName, reagentTexture, reagentCount, playerReagentCount = GetTradeSkillReagentInfo(itemIndex, reagentIndex); + if( not reagentTexture ) then + reagentTexture = ""; + end + if( not reagentName ) then + reagentName = "Unknown"; + end + + if (reagentIndex == numReagents) then + reagents = reagents .. reagentName .. " x" .. reagentCount; + else + reagents = reagents .. reagentName .. " x" .. reagentCount .. "<br>"; + end + end + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Reagents"] = reagents; + else + skillHeader = skillName; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader] = {}; + end + end +end + +-- is this ever called?! +function Profile_ScanCraft() + local skillLineName, skillLineRank, skillLineMaxRank = GetCraftDisplaySkillLine(); + + if( (not skillLineName) or (skillLineName == "") or (skillLineName == "UNKNOWN")) then + return; + end + + if ( not CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"] = {}; + end + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName] = {}; + + -- expand the tree so we can see all the recipes + -- ExpandCraftSubClass(0); + + -- get the number of recipes and loop through each one + local numCrafts = GetNumCrafts(); + local skillHeader = skillLineName; -- default it, enchanting doesn't have categories? + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader] = {}; + for itemIndex=1, numCrafts, 1 do + local skillText = ""; + local skillName, craftSubSpellName, skillDifficulty, numAvailable, isExpanded = GetCraftInfo(itemIndex); + --Debug(skillName .. ":" .. craftSubSpellName); + if( skillDifficulty ~= "header" and skillLineName and skillLineName ~= "" and skillHeader and skillHeader ~= "" and skillName and skillName ~= "" ) then + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName] = {}; + local skillIcon = GetCraftIcon(itemIndex); + if( not skillIcon ) then + skillIcon = ""; + end + local description = GetCraftDescription(itemIndex); + if (description == nil) then + description = ""; + end + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Texture"] = skillIcon; + + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Difficulty"] = TradeSkillDifficultyCode[skillDifficulty]; + + -- CP_ProfHidden:SetCraftItem(itemIndex); + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Tooltip"] = description; + --Debug(description); + + local numReagents = GetCraftNumReagents(itemIndex); + local reagents = ''; + for reagentIndex=1, numReagents, 1 do + local reagentName, reagentTexture, reagentCount, playerReagentCount = GetCraftReagentInfo(itemIndex, reagentIndex); + if( not reagentTexture ) then + reagentTexture = ""; + end + if( not reagentName ) then + reagentName = "Unknown"; + end + + if (reagentIndex == numReagents) then + reagents = reagents .. reagentName .. " x" .. reagentCount; + else + reagents = reagents .. reagentName .. " x" .. reagentCount .. "<br>"; + end + end + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader][skillName]["Reagents"] = reagents; + else + local skillHeader = skillName; + CensusPlus_Profile[GetCVar("realmName")][UnitName("player")]["Professions"][skillLineName][skillHeader] = {}; + end + end +end + + +-- Utilities go below +-- From CosmosCommonFunctions.lua +-- Gets all lines out of a tooltip. + +function CP_Tooltipscan() +--CP_ProfHidden:Show(); + + local TooltipNameBase = "CP_ProfHidden"; + local tooltipFrame = getglobal(TooltipNameBase); + local strings = {}; + local htmlstr = nil; + +-- CensusPlus_Msg( "NUM LINES: " .. CP_ProfHidden:NumLines() ); + + for idx = 1, CP_ProfHidden:NumLines() do + local textLeft = nil; + local textRight = nil; + ttext = getglobal(TooltipNameBase.."TextLeft"..idx); + + if(ttext and ttext:IsVisible() and ttext:GetText() ~= nil) then + textLeft = ttext:GetText(); + end + +--if( textLeft ~= nil ) then +-- CensusPlus_Msg( "LEFT TEXT: " .. textLeft ); +--end + + ttext = getglobal(TooltipNameBase.."TextRight"..idx); + if(ttext and ttext:IsVisible() and ttext:GetText() ~= nil) then + textRight = ttext:GetText(); + end +--if( textRight ~= nil ) then +-- CensusPlus_Msg( "RIGHT TEXT: " .. textRight ); +--end + + if (textLeft or textRight) then + if ( textRight) then + textRight = "\t"..textRight; + else + textRight = ""; + end + + if ( htmlstr ~= nil ) then + htmlstr = htmlstr .. "<br>" .. textLeft .. textRight; + else + htmlstr = textLeft .. textRight; + end + end + end + +-- CP_ProfHidden:ClearLines(); +-- ClearTooltip( "CP_ProfHidden" ); + + return htmlstr; +end + +function round(x) + if(x - math.floor(x) > 0.5) then + x = x + 0.5; + end + return math.floor(x); +end + +if (not fixnilempty) then + fixnilempty = function(...) + for i=1, arg.n, 1 do + if(not arg[i]) then + arg[i] = ""; + end + end + return arg; + end +end + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GPL.txt Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/UpdateUI.xml Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,12 @@ +<Addon name="Census+" author="Cooper Sellers" email="rollie@warcraftrealms.com" url="http://www.warcraftrealms.com"> + <Description> + Census is a World of Warcraft UI customization which allows you to keep track of your realm's population. Get a + complete breakdown of characters by race, class and level. Census also keeps track of the top guilds + on your realm. Guilds are ranked by the total amount of experience points + accumulated by its members. Clicking on a guild name will give a complete + breakdown of the guild by race, class and level. Mouse over the bars to display a tooltip + with the exact number of characters they represent. You can view compiled data at http://www.warcraftrealms.com + </Description> + <CurrentVersion ver="4.2" /> + <UpdateFile url="http://www.warcraftrealms.com/mods/UpdateUI.xml" /> +</Addon> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/localization.lua Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,675 @@ +--[[ +CensusPlus for World of Warcraft(tm). + +Copyright 2005 - 2006 Cooper Sellers and WarcraftRealms.com + +License: +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program(see GLP.txt); if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +]] +CENSUSPlusFemale = { }; + +CENSUSPlus_BUTTON_TEXT = "Census+"; +CENSUSPlus_BUTTON_SUBTEXT = "Realm Census"; +CENSUSPlus_BUTTON_TIP = "Click here to show or hide Census+."; +CENSUSPlus_HELP = " Use /censusplus to open and close the Census+ UI."; + +CENSUSPlus_MSG1 = " Loaded - type /censusplus or /census+ to open main window"; +CENSUSPlus_MSG2 = "Use /censusdate to set today's date in the format of MM-DD-YYYY, ie. 12-25-2004"; + +CENSUSPlus_UPLOAD = "Be sure to upload your CensusPlus data to www.WarcraftRealms.com!"; +CENSUSPlus_SETTINGDATE = "Setting date to => "; +CENSUSPlus_PAUSE = "Pause"; +CENSUSPlus_UNPAUSE = "Un-Pause"; +CENSUSPlus_STOP = "Stop"; +CENSUSPlus_PRUNE = "Prune"; + +CENSUSPlus_TAKECENSUS = "Take a census of players \ncurrently online on this server \nand in this faction"; +CENSUSPlus_TAKEGUILDCENSUS = "Take a census of players \ncurrently online on this server \nand in this guild"; +CENSUSPlus_PURGEDATABASE = "Purge the database of all data"; +CENSUSPlus_PAUSECENSUS = "Pause the current census"; +CENSUSPlus_UNPAUSECENSUS = "Un-Pause the current census"; +CENSUSPlus_STOPCENSUS = "Stop the currently active CensusPlus"; +CENSUSPlus_PRUNECENSUS = "Prune the database by removing characters not seen in 30 days."; + +CENSUSPlus_PRUNEINFO = "Pruned %d characters."; + +CENSUSPlus_PURGEMSG = "Purged character database."; +CENSUSPlus_ISINPROGRESS = "A CensusPlus is in progress, try again later"; +CENSUSPlus_TAKINGONLINE = "Taking census of characters online..."; +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"; +CENSUSPlus_NOCENSUS = "A Census is not currently in progress"; +CENSUSPlus_FINISHED = "Finished Taking data. Found %s new characters and saw %s. Took %s."; +CENSUSPlus_TOOMANY = "WARNING: Too many characters matching: %s"; +CENSUSPlus_WAITING = "Waiting to send who request..."; +CENSUSPlus_SENDING = "Sending /who %s"; +CENSUSPlus_PROCESSING = "Processing %s characters."; + +CENSUSPlus_REALMNAME = "Realm: %s"; +CENSUSPlus_REALMUNKNOWN = "Realm: Unknown"; +CENSUSPlus_FACTION = "Faction: %s"; +CENSUSPlus_FACTIONUNKNOWN = "Faction: Unknown"; +CENSUSPlus_LOCALE = "Locale : %s"; +CENSUSPlus_LOCALEUNKNOWN = "Locale : Unknown"; +CENSUSPlus_TOTALCHAR = "Total Characters: %d"; +CENSUSPlus_TOTALCHAR_0 = "Total Characters: 0"; +CENSUSPlus_TOTALCHARXP = "XP Factor: %d"; +CENSUSPlus_TOTALCHARXP_0 = "XP Factor: 0"; +CENSUSPlus_SCAN_PROGRESS = "Scan Progress: %d queries in the queue - %s"; +CENSUSPlus_SCAN_PROGRESS_0 = "No Scan In Progress"; +CENSUSPlus_AUTOCLOSEWHO = "Automatically Close Who"; +CENSUSPlus_SHOWMINI = "Show Mini On Start"; +CENSUSPlus_UNGUILDED = "(Unguilded)"; +CENSUSPlus_TAKE = "Take"; +CENSUSPlus_TAKEGUILD = "Take guild"; +CENSUSPlus_TAKINGGUILD = "Taking guild"; +CENSUSPlus_TOPGUILD = "Top Guilds By XP"; +CENSUSPlus_RACE = "Races"; +CENSUSPlus_CLASS = "Classes"; +CENSUSPlus_LEVEL = "Levels"; +CENSUSPlus_PURGE = "Purge"; +CENSUSPlus_MAXXED = "MAXXED!"; + +CENSUSPlus_MAXIMIZE = "Maximize the CensusPlus Window"; +CENSUSPlus_MINIMIZE = "Minimize the CensusPlus Window"; +CENSUSPlus_BUTTON_MINIMIZE = "Minimize"; + +CENSUSPlus_DRUID = "Druid"; +CENSUSPlus_HUNTER = "Hunter"; +CENSUSPlus_MAGE = "Mage"; +CENSUSPlus_PRIEST = "Priest"; +CENSUSPlus_ROGUE = "Rogue"; +CENSUSPlus_WARLOCK = "Warlock"; +CENSUSPlus_WARRIOR = "Warrior"; +CENSUSPlus_SHAMAN = "Shaman"; +CENSUSPlus_PALADIN = "Paladin"; +CENSUSPlus_DEATHKNIGHT = "Death Knight"; + +CENSUSPlus_DWARF = "Dwarf"; +CENSUSPlus_GNOME = "Gnome"; +CENSUSPlus_HUMAN = "Human"; +CENSUSPlus_NIGHTELF = "Night Elf"; +CENSUSPlus_ORC = "Orc"; +CENSUSPlus_TAUREN = "Tauren"; +CENSUSPlus_TROLL = "Troll"; +CENSUSPlus_UNDEAD = "Undead"; +CENSUSPlus_DRAENEI = "Draenei"; +CENSUSPlus_BLOODELF = "Blood Elf"; + +CENSUSPlus_WarsongGulch = "Warsong Gulch"; +CENSUSPlus_AlteracValley = "Alterac Valley"; +CENSUSPlus_ArathiBasin = "Arathi Basin"; +CENSUSPlus_EyeOfTheStorm = "Eye of the Storm"; + +CENSUSPLUS_US_LOCALE = "Select if you play on US Servers"; +CENSUSPLUS_EU_LOCALE = "Select if you play on EURO Servers"; +CENSUSPLUS_LOCALE_SELECT = "Select if you play on US or EURO servers"; + +CENSUSPlus_BUTTON_OPTIONS = "Options"; +CENSUSPlus_OPTIONS_HEADER = "Census+ Options"; +CENSUSPlus_ISINBG = "You are currently in a Battleground so a Census cannot be taken"; +CENSUS_OPTIONS_BUTPOS = "Button Position"; +CENSUS_OPTIONS_BUTSHOW = "Show Minimap Button"; +CENSUS_OPTIONS_AUTOCENSUS = "Auto-Census"; +CENSUS_OPTIONS_THISPROFILE = "Collect Profile for this Char"; +CENSUS_OPTIONS_AUTOSTART = "Auto-Start"; +CENSUS_OPTIONS_VERBOSE = "Verbose"; +CENSUS_OPTIONS_SOUND_ON_COMPLETE = "Play Sound When Done"; +CENSUS_OPTIONS_LOG_BARS = "Logarithmic Level Bars"; + +CENSUSPlus_AUTOSTART_TOOLTIP = "Enable Census+ to start automatically"; +CENSUSPlus_VERBOSE_TOOLTIP = "Deselect to stop the spam!"; +CENSUSPlus_AUTOCENSUS_TOOLTIP = "Enable Census+ to run automatically while playing"; +CENSUSPlus_THISPROFILE_TOOLTIP = "Collect profile data for this character to upload to WarcraftRealms.com"; + +CENSUSPlus_BUTTON_CHARACTERS = "Show Chars"; +CENSUSPlus_Characters = "Characters"; + +CENSUS_BUTTON_TOOLTIP = "Open CensusPlus"; + + +--|cff979797[11:19:12]|r|c00000000|r |cffd8d8d8[|r|Hplayer:Rollee:93|h|cffd8d83f1|r:|cfffff468Rollee|r|h|cffd8d8d8]|r: Level 1 Troll Rogue - Durotar +--|Hplayer:Rollee|h[Rollee]|h: Level 1 Troll Rogue - Durotar +CENSUS_SINGLE_MATCH_PATTERN = "(.+)%: (%a+) (%d+) (.+) %- (.+)"; + +CENSUS_LEVEL_NO_GUILD = "%[(.+)%: Level (%d+) (%a+) (%a+) %- (.+)"; +CENSUS_LEVEL_W_GUILD = "%[(.+)%: Level (%d+) (%a+) (%a+) %<(.+)%> %- (.+)"; +CENSUS_LEVEL_W_GUILD_2 = "%[(.+)%: Level (%d+) (%a+) (%a+) (%a+) %<(.+)%> %- (.+)"; +CENSUS_LEVEL_NO_GUILD_2 = "%[(.+)%: Level (%d+) (%a+) (%a+) (%a+) %- (.+)"; + +CENSUSPlus_CANCEL = "Cancel"; + +CENSUSPlus_OVERRIDE = "Census in progress, submitting override"; +CENSUSPlus_OVERRIDE_COMPLETE = "Override complete resuming census"; +CENSUSPlus_OVERRIDE_COMPLETE_BUT_PAUSED = "Override complete, but census has been paused"; + +CENSUSPlus_PURGE_LOCAL_CONFIRM = "Are you sure you wish to PURGE your local database?"; +CENSUSPlus_OVERRIDE_COMPLET_PAUSED = "Override complete but Census has been paused, Click to Continue"; + +CENSUSPlus_YES = "Yes"; +CENSUSPlus_NO = "No"; +CENSUSPlus_CONTINUE = "Continue"; + +if ( GetLocale() == "frFR" ) then +-- Traduit par Juki <Unskilled> + +CENSUSPlus_BUTTON_TEXT = "Census+"; +CENSUSPlus_BUTTON_SUBTEXT = "Stats serveur"; +CENSUSPlus_BUTTON_TIP = "Cliquez ici pour montrer ou masquer Census+."; +CENSUSPlus_HELP = " Utilisez /censusplus pour ouvrir et fermer Census+."; + +CENSUSPlus_MSG1 = " Chargée - Tapez /censusplus ou /census+ pour ouvrir la fenêtre principale"; +CENSUSPlus_MSG2 = "Utilisez /censusdate pour configurer la date du jour dans le format MM-DD-YYYY, ie.12-25-2004"; + +CENSUSPlus_UPLOAD = ""; +CENSUSPlus_UPLOAD2 = ""; +CENSUSPlus_SETTINGDATE = "Mise à jour de la date => "; +CENSUSPlus_PAUSE = "Pause"; +CENSUSPlus_UNPAUSE = "Reprendre"; +CENSUSPlus_STOP = "Stop"; + +CENSUSPlus_TAKECENSUS = "Faire un recensement des joueurs \nactuellement en ligne sur ce serveur \net dans cette faction"; +CENSUSPlus_TAKEGUILDCENSUS = "Take a census of players \ncurrently online on this server \nand in this guild"; +CENSUSPlus_PURGEDATABASE = "Supprime la base de donnée concernant."; +CENSUSPlus_PAUSECENSUS = "Mettre en pause le recensement en cours"; +CENSUSPlus_STOPCENSUS = "Arrêter le recensement en cours" + +CENSUSPlus_PURGEMSG = "Base de donnée supprimée."; +CENSUSPlus_ISINPROGRESS = "Un recensement est en cours, veuillez patienter"; +CENSUSPlus_TAKINGONLINE = "Recensement des joueurs en cours ..."; +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"; +CENSUSPlus_NOCENSUS = "Aucun recensement en cours"; +CENSUSPlus_FINISHED = "Recensement terminé. %s nouveaux personnages et %s mis à jour."; +CENSUSPlus_TOOMANY = "ERREUR: Trop de joueurs correspondants à : %s"; +CENSUSPlus_WAITING = "En attente de lancement de requête /who ..."; +CENSUSPlus_SENDING = "Envoi de requête /who %s"; +CENSUSPlus_PROCESSING = "Analyse de %s personnages."; + +CENSUSPlus_REALMNAME = "Serveur : %s"; +CENSUSPlus_REALMUNKNOWN = "Serveur : Inconnu"; +CENSUSPlus_FACTION = "Faction : %s"; +CENSUSPlus_FACTIONUNKNOWN = "Faction : Inconnu"; +CENSUSPlus_TOTALCHAR = "Nombre de personnages : %d"; +CENSUSPlus_TOTALCHAR_0 = "Nombre de personnages : 0"; +CENSUSPlus_AUTOCLOSEWHO = "Fermeture auto du /Who"; +CENSUSPlus_SHOWMINI = "Montrer Mini au démarrage"; +CENSUSPlus_UNGUILDED = "(Sans Guilde)"; +CENSUSPlus_TAKE = "Recenser"; +CENSUSPlus_TAKEGUILD = "Take guild"; +CENSUSPlus_TAKINGGUILD = "Taking guild"; +CENSUSPlus_TOPGUILD = "Meilleures guildes par XP"; +CENSUSPlus_RACE = "Races"; +CENSUSPlus_CLASS = "Classes"; +CENSUSPlus_LEVEL = "Niveaux"; +CENSUSPlus_PURGE = "Mettre à Zero"; + +CENSUSPlus_MAXIMIZE = "Agrandir la fenêtre CensusPlus"; +CENSUSPlus_MINIMIZE = "Réduire la fenêtre CensusPlus"; +CENSUSPlus_BUTTON_MINIMIZE = "Réduire"; + +CENSUSPlus_HORDE = "Horde"; +CENSUSPlus_ALLIANCE = "Alliance"; + +CENSUSPlus_DRUID = "Druide"; +CENSUSPlusFemale["Druidesse"] = "Druide"; +CENSUSPlus_HUNTER = "Chasseur"; +CENSUSPlusFemale["Chasseresse"] = "Chasseur"; +CENSUSPlus_MAGE = "Mage"; +CENSUSPlus_PRIEST = "Prêtre"; +CENSUSPlusFemale["Prêtresse"] = "Prêtre"; +CENSUSPlus_ROGUE = "Voleur"; +CENSUSPlusFemale["Voleuse"] = "Voleur"; +CENSUSPlus_WARLOCK = "Démoniste"; +CENSUSPlus_WARRIOR = "Guerrier"; +CENSUSPlusFemale["Guerrière"] = "Guerrier"; +CENSUSPlus_SHAMAN = "Chaman"; +CENSUSPlusFemale["Chamane"] = "Chaman"; +CENSUSPlus_PALADIN = "Paladin"; +CENSUSPlus_DEATHKNIGHT = "Chevalier de la mort"; + + +CENSUSPlus_DWARF = "Nain"; +CENSUSPlusFemale["Naine"] = "Nain"; +CENSUSPlus_GNOME = "Gnome"; +CENSUSPlus_HUMAN = "Humain"; +CENSUSPlus_NIGHTELF = "Elfe de la nuit"; +CENSUSPlus_ORC = "Orc"; +CENSUSPlusFemale["Orque"] = "Orc"; +CENSUSPlus_TAUREN = "Tauren"; +CENSUSPlusFemale["Taurène"] = "Tauren"; +CENSUSPlus_TROLL = "Troll"; +CENSUSPlusFemale["Trollesse"] = "Troll"; +CENSUSPlus_UNDEAD = "Mort-vivant"; +CENSUSPlusFemale["Morte-vivante"] = "Mort-vivant"; +CENSUSPlus_DRAENEI = "Draeneï"; +CENSUSPlus_BLOODELF = "Elfe de sang"; + +CENSUSPlus_WarsongGulch = "Goulet des Warsong"; +CENSUSPlus_AlteracValley = "Vallée d'Alterac"; +CENSUSPlus_ArathiBasin = "Bassin d'Arathi"; +CENSUSPlus_EyeOfTheStorm = "Oeil du cyclone"; + +CENSUSPLUS_US_LOCALE = "Choisissez si vous jouez sur un serveur US"; +CENSUSPLUS_EU_LOCALE = "Choisissez si vous jouez sur un serveur EURO"; +CENSUSPLUS_LOCALE_SELECT = "Choisissez la localité de votre serveur"; + +CENSUS_LEVEL_NO_GUILD = "%[(.+)%: Niveau (%d+) (%a+) (%a+) %- (.+)"; +CENSUS_LEVEL_W_GUILD = "%[(.+)%: Niveau (%d+) (%a+) (%a+) %<(.+)%> %- (.+)"; +CENSUS_LEVEL_W_GUILD_2 = "%[(.+)%: Niveau (%d+) (%a+) (%a+) (%a+) %<(.+)%> %- (.+)"; +CENSUS_LEVEL_NO_GUILD_2 = "%[(.+)%: Niveau (%d+) (%a+) (%a+) (%a+) %- (.+)"; + + + + +elseif ( GetLocale() == "deDE" ) then +-- Thanks to MadMax-X for this German translation +CENSUSPlus_BUTTON_TEXT = "Census+"; +CENSUSPlus_BUTTON_SUBTEXT = "Realm Census"; +CENSUSPlus_BUTTON_TIP = "Hier klicken um Census+ anzuzeigen oder zu verstecken."; +CENSUSPlus_HELP = " Benutze /censusplus um die Census+ Oberfläche zu öffnen."; + +CENSUSPlus_MSG1 = " Geladen - mit /censusplus or /census+ wird das Hauptfenster geöffnet"; +CENSUSPlus_MSG2 = "Mit /censusdate kann das aktuelle Datum im Format MM-DD-YYYY gesetzt werden, z.B. 12-25-2004"; + +CENSUSPlus_UPLOAD = "Lade deine CensusPlus Daten bei www.WarcraftRealms.com hoch!"; +CENSUSPlus_SETTINGDATE = "Datum wird gesetzt => "; +CENSUSPlus_PAUSE = "Pause"; +CENSUSPlus_UNPAUSE = "Weiter"; +CENSUSPlus_STOP = "Stop"; + +CENSUSPlus_TAKECENSUS = "Zähle alle aktiven \nSpieler deiner Fraktion \nauf diesem Server."; +CENSUSPlus_TAKEGUILDCENSUS = "Zähle alle aktiven \nSpieler der Gilde \nauf diesem Server."; +CENSUSPlus_PURGEDATABASE = "Lösche die Datenbank."; +CENSUSPlus_PAUSECENSUS = "Pausiere die laufende Zählung"; +CENSUSPlus_STOPCENSUS = "Stoppe die laufende Zählung"; + +CENSUSPlus_PURGEMSG = "Charakterdatenbank für Server %s und Fraktion %s gelöscht."; +CENSUSPlus_ISINPROGRESS = "Es läuft schon eine Zählung, versuch es später nochmal"; +CENSUSPlus_TAKINGONLINE = "Zählung der gerade aktiven Charaktere..."; +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"; +CENSUSPlus_NOCENSUS = "Es läuft gerade keine Zählung"; +CENSUSPlus_FINISHED = "Zählung beendet. %s neue Charactere gefunden und %s aktualisiert."; +CENSUSPlus_TOOMANY = "FEHLER: Zu viele passende Charaktere: %s"; +CENSUSPlus_WAITING = "Warte, um /who zu senden..."; +CENSUSPlus_SENDING = "Sende /who %s"; +CENSUSPlus_PROCESSING = "Verarbeite %s Charaktere."; + +CENSUSPlus_REALMNAME = "Server: %s"; +CENSUSPlus_REALMUNKNOWN = "Server: Unbekannt"; +CENSUSPlus_FACTION = "Fraktion: %s"; +CENSUSPlus_FACTIONUNKNOWN = "Fraktion: Unbekannt"; +CENSUSPlus_TOTALCHAR = "Gesamte Charaktere: %d"; +CENSUSPlus_TOTALCHAR_0 = "Gesamte Charaktere: 0"; +CENSUSPlus_AUTOCLOSEWHO = "Schließe Who automatisch"; +CENSUSPlus_SHOWMINI = "Mini-Button beim Start anzeigen"; +CENSUSPlus_UNGUILDED = "(Gildenlos)"; +CENSUSPlus_TAKE = "Zählen"; +CENSUSPlus_TAKEGUILD = "Gilde zählen"; +CENSUSPlus_TAKINGGUILD = "Zähle Gilde"; +CENSUSPlus_TOPGUILD = "Top Gilden nach XP"; +CENSUSPlus_RACE = "Rassen"; +CENSUSPlus_CLASS = "Klassen"; +CENSUSPlus_LEVEL = "Level"; +CENSUSPlus_PURGE = "Löschen"; + +CENSUSPlus_MAXIMIZE = "Maximiere das CensusPlus Fenster"; +CENSUSPlus_MINIMIZE = "Minimiere das CensusPlus Fenster"; +CENSUSPlus_BUTTON_MINIMIZE = "Minimieren"; + +CENSUSPlus_HORDE = "Horde"; +CENSUSPlus_ALLIANCE = "Alliance"; + +CENSUSPlus_DRUID = "Druide"; +CENSUSPlusFemale["Druidin"] = "Druide"; +CENSUSPlus_HUNTER = "Jäger"; +CENSUSPlusFemale["Jägerin"] = "Jäger"; +CENSUSPlus_MAGE = "Magier"; +CENSUSPlusFemale["Magierin"] = "Magier"; +CENSUSPlus_PRIEST = "Priester"; +CENSUSPlusFemale["Priesterin"] = "Priester"; +CENSUSPlus_ROGUE = "Schurke"; +CENSUSPlusFemale["Schurkin"] = "Schurke"; +CENSUSPlus_WARLOCK = "Hexenmeister"; +CENSUSPlusFemale["Hexenmeisterin"] = "Hexenmeister"; +CENSUSPlus_WARRIOR = "Krieger"; +CENSUSPlusFemale["Kriegerin"] = "Krieger"; +CENSUSPlus_SHAMAN = "Schamane"; +CENSUSPlusFemale["Schamanin"] = "Schamane"; +CENSUSPlus_PALADIN = "Paladin"; +CENSUSPlus_DEATHKNIGHT = "Todesritter"; + +CENSUSPlus_DWARF = "Zwerg"; +CENSUSPlus_GNOME = "Gnom"; +CENSUSPlus_HUMAN = "Mensch"; +CENSUSPlus_NIGHTELF = "Nachtelf"; +CENSUSPlusFemale["Nachtelfe"] = "Nachtelf"; +CENSUSPlus_ORC = "Orc"; +CENSUSPlus_TAUREN = "Tauren"; +CENSUSPlus_TROLL = "Troll"; +CENSUSPlus_UNDEAD = "Untoter"; +CENSUSPlusFemale["Untote"] = "Untoter"; +CENSUSPlus_DRAENEI = "Draenei"; +CENSUSPlus_BLOODELF = "Blutelf"; +CENSUSPlusFemale["Blutelfe"] = "Blutelf"; + +CENSUSPlus_WarsongGulch = "Kriegshymnenschlucht"; +CENSUSPlus_AlteracValley = "Alteractal"; +CENSUSPlus_ArathiBasin = "Arathibecken"; +CENSUSPlus_EyeOfTheStorm = "Auge des Sturms"; + +CENSUSPLUS_US_LOCALE= "Auswählen, wenn du auf US-Servern spielst"; +CENSUSPLUS_EU_LOCALE= "Auswählen, wenn du auf EURO-Servern spielst"; +CENSUSPLUS_LOCALE_SELECT= "Wähle, ob du auf US oder EURO-Servern spielst"; + +CENSUSPlus_BUTTON_OPTIONS = "Optionen"; +CENSUSPlus_OPTIONS_HEADER = "Census+ Optionen"; +CENSUSPlus_ISINBG = "Du befindest dich momentan auf einem Schlachtfeld und daher kann Census+ keine Abfrage duchführen."; +CENSUS_OPTIONS_BUTPOS = "Button Position"; +CENSUS_OPTIONS_BUTSHOW = "Minimap-Button"; +CENSUS_OPTIONS_AUTOSTART = "Autom. Starten"; +CENSUS_OPTIONS_VERBOSE = "Verbose"; +CENSUS_OPTIONS_AUTOCENSUS = "Autom. Zählen"; +CENSUS_OPTIONS_THISPROFILE = "Profil nur diesen Charakter"; +CENSUS_OPTIONS_EXIT = "Schließen"; + +CENSUS_BUTTON_TOOLTIP = "CensusPlus öffnen"; + +CENSUS_LEVEL_NO_GUILD = "(.+): Stufe (%d+) (.+) (.+) - (.+)"; +CENSUS_LEVEL_W_GUILD = "(.+): Stufe (%d+) (.+) (.+) <(.+)> - (.+)"; + +elseif ( GetLocale() == "esES" ) then +-- Thanks to NeKRoMaNT EU-Zul'jin < contacto@nekromant.com> for the Spanish Translation +CENSUSPlus_BUTTON_TEXT = "Census+"; +CENSUSPlus_BUTTON_SUBTEXT = "Estadísticas Servidor"; +CENSUSPlus_BUTTON_TIP = "Pulsa aquí para mostrar u ocultar Census+."; +CENSUSPlus_HELP = " Usa /censusplus para abrir y cerrar la interfaz Census+."; + +CENSUSPlus_MSG1 = " operativo - Escribe /censusplus o /census+ para abrir la ventana principal"; + +CENSUSPlus_UPLOAD = "¡Asegúrate de enviar tus datos a www.WarcraftRealms.com!"; +CENSUSPlus_PAUSE = "Pausa"; +CENSUSPlus_UNPAUSE = "Continuar"; +CENSUSPlus_STOP = "Detener"; +CENSUSPlus_PRUNE = "Resetear"; + +CENSUSPlus_TAKECENSUS = "Realizar un censo de jugadores \nconectados en este servidor \ny en esta facción"; +CENSUSPlus_TAKEGUILDCENSUS = "Take a census of players \ncurrently online on this server \nand in this guild"; +CENSUSPlus_PURGEDATABASE = "Purgar la base de datos."; +CENSUSPlus_PAUSECENSUS = "Pausar el censo actual"; +CENSUSPlus_UNPAUSECENSUS = "Continuar el censo actual"; +CENSUSPlus_STOPCENSUS = "Detener el censo actual"; +CENSUSPlus_PRUNECENSUS = "Optimiza la base de datos borrando personajes sin censar en los últimos 30 días"; + +CENSUSPlus_PURGEMSG = "Base de datos de personajes purgada."; +CENSUSPlus_ISINPROGRESS = "Censo en progreso, vuelve a intentarlo mas tarde"; +CENSUSPlus_TAKINGONLINE = "Realizando censo de personajes conectados..."; +CENSUSPlus_NOCENSUS = "No hay ningún censo activo"; +CENSUSPlus_FINISHED = "Se ha terminado de recoger datos. Encontrados %s nuevos personajes y %s actualizados. Duración %s."; +CENSUSPlus_TOOMANY = "AVISO: Demasiadas coincidencias: %s"; +CENSUSPlus_WAITING = "Esperando a enviar petición /quien..."; +CENSUSPlus_SENDING = "Enviando /quien %s"; +CENSUSPlus_PROCESSING = "Procesando %s personajes."; + +CENSUSPlus_REALMNAME = "Servidor: %s"; +CENSUSPlus_REALMUNKNOWN = "ServidorReino: Desconocido"; +CENSUSPlus_FACTION = "Facción: %s"; +CENSUSPlus_FACTIONUNKNOWN = "Facción: Desconocida"; +CENSUSPlus_LOCALE = "Región : %s"; +CENSUSPlus_LOCALEUNKNOWN = "Región : Desconocida"; +CENSUSPlus_TOTALCHAR = "Personajes Totales: %d"; +CENSUSPlus_TOTALCHAR_0 = "Personajes Totales: 0"; +CENSUSPlus_AUTOCLOSEWHO = "Cerrar Quien Automático"; +CENSUSPlus_SHOWMINI = "Minimizado al inicio"; +CENSUSPlus_UNGUILDED = "(Sin Hermandad)"; +CENSUSPlus_TAKE = "Comenzar"; +CENSUSPlus_TAKEGUILD = "Take guild"; +CENSUSPlus_TAKINGGUILD = "Taking guild"; +CENSUSPlus_TOPGUILD = "Clanes por Experiencia"; +CENSUSPlus_RACE = "Razas"; +CENSUSPlus_CLASS = "Clases"; +CENSUSPlus_LEVEL = "Niveles"; +CENSUSPlus_PURGE = "Purgar"; +CENSUSPlus_MAXXED = "MAXXED!"; + +CENSUSPlus_MAXIMIZE = "Maximizar la ventana de CensusPlus"; +CENSUSPlus_MINIMIZE = "Minimizar la ventana de CensusPlus"; +CENSUSPlus_BUTTON_MINIMIZE = "Minimizar"; + +CENSUSPlus_HORDE = "Horde"; +CENSUSPlus_ALLIANCE = "Alliance"; + +CENSUSPlus_DRUID = "Druida"; +CENSUSPlus_HUNTER = "Cazador"; +CENSUSPlus_MAGE = "Mago"; +CENSUSPlus_PRIEST = "Sacerdote"; +CENSUSPlus_ROGUE = "Pícaro"; +CENSUSPlus_WARLOCK = "Brujo"; +CENSUSPlus_WARRIOR = "Guerrero"; +CENSUSPlus_SHAMAN = "Chamán"; +CENSUSPlus_PALADIN = "Paladín"; +CENSUSPlus_DEATHKNIGHT = "Caballero de la Muerte"; + +CENSUSPlus_DWARF = "Enano"; +CENSUSPlus_GNOME = "Gnomo"; +CENSUSPlus_HUMAN = "Humano"; +CENSUSPlus_NIGHTELF = "Elfo de la noche"; +CENSUSPlus_ORC = "Orco"; +CENSUSPlus_TAUREN = "Tauren"; +CENSUSPlus_TROLL = "Trol"; +CENSUSPlus_UNDEAD = "No-muerto"; +CENSUSPlus_DRAENEI = "Draenei"; +CENSUSPlus_BLOODELF = "Elfo de sangre"; + +CENSUSPlus_DRUID = "Druida"; +CENSUSPlus_HUNTER = "Cazador"; +CENSUSPlusFemale["Cazadora"] = "Cazador"; +CENSUSPlus_MAGE = "Mago"; +CENSUSPlusFemale["Maga"] = "Mago"; +CENSUSPlus_PRIEST = "Sacerdote"; +CENSUSPlusFemale["Sacerdotisa"] = "Sacerdote"; +CENSUSPlus_ROGUE = "Pícaro"; +CENSUSPlusFemale["Pícara"] = "Pícaro"; +CENSUSPlus_WARLOCK = "Brujo"; +CENSUSPlusFemale["Bruja"] = "Brujo"; +CENSUSPlus_WARRIOR = "Guerrero"; +CENSUSPlusFemale["Guerrera"] = "Guerrero"; +CENSUSPlus_SHAMAN = "Chamán"; +CENSUSPlus_PALADIN = "Paladín"; + +CENSUSPlus_DWARF = "Enano"; +CENSUSPlusFemale["Enana"] = "Enano"; +CENSUSPlus_GNOME = "Gnomo"; +CENSUSPlusFemale["Gnoma"] = "Gnomo"; +CENSUSPlus_HUMAN = "Humano"; +CENSUSPlusFemale["Humana"] = "Humano"; +CENSUSPlus_NIGHTELF = "Elfo de la noche"; +CENSUSPlusFemale["Elfa de la noche"] = "Elfo de la noche"; +CENSUSPlus_ORC = "Orco"; +CENSUSPlus_TAUREN = "Tauren"; +CENSUSPlus_TROLL = "Trol"; +CENSUSPlus_UNDEAD = "No-muerto"; +CENSUSPlusFemale["No-muerta"] = "No-muerto"; +CENSUSPlus_DRAENEI = "Draenei"; +CENSUSPlus_BLOODELF = "Elfo de sangre"; +CENSUSPlusFemale["Elfa de sangre"] = "Elfo de sangre"; + + + +CENSUSPlus_WarsongGulch = "Garganta Grito de Guerra"; +CENSUSPlus_AlteracValley = "Valle de Alterac"; +CENSUSPlus_ArathiBasin = "Cuenca de Arathi"; +CENSUSPlus_EyeOfTheStorm = "Ojo de la Tormenta"; + +CENSUSPlus_BUTTON_OPTIONS = "Opciones"; +CENSUSPlus_OPTIONS_HEADER = "Opciones Census+"; +CENSUS_OPTIONS_BUTPOS = "Posición de botón"; +CENSUS_OPTIONS_BUTSHOW = "Mostrar botón"; + +CENSUSPlus_BUTTON_CHARACTERS = "Mostrar personajes"; +CENSUSPlus_Characters = "Personajes"; + +CENSUS_BUTTON_TOOLTIP = "Abrir CensusPlus"; + +CENSUS_LEVEL_NO_GUILD = "(.+): Nivel (%d+) (.+) (.+) - (.+)"; +CENSUS_LEVEL_W_GUILD = "(.+): Nivel (%d+) (.+) (.+) <(.+)> - (.+)"; + +CENSUSPlus_CANCEL = "Cancelar"; +elseif ( GetLocale() == "koKR" ) then +-- This is Korean Locale, Translated by crezol -- + +CENSUSPlusFemale = { }; + +CENSUSPlus_BUTTON_TEXT = "센서스+"; +CENSUSPlus_BUTTON_SUBTEXT = "서버 센서스"; +CENSUSPlus_BUTTON_TIP = "센서스+ 를 보이거나 숨기려면 클릭하십시오."; +CENSUSPlus_HELP = " /censusplus 를 사용해 센서스+ UI 를 열거나 닫을 수 있습니다."; + +CENSUSPlus_MSG1 = "센서스+ 로드됨 - /censusplus 나 /census+ 를 입력해 메인 창을 띄울 수 있습니다."; +CENSUSPlus_MSG2 = "/censusdate 를 사용해 오늘의 날짜를 설정하세요.(형식: MM-DD-YYYY, 예. 12-25-2004)"; + +CENSUSPlus_UPLOAD = "www.WarcraftRealms.com 에서 센서스+ 업데이트를 확인하세요!"; +CENSUSPlus_SETTINGDATE = "날짜 변경 => "; +CENSUSPlus_PAUSE = "일시중지"; +CENSUSPlus_UNPAUSE = "계속"; +CENSUSPlus_STOP = "중지"; +CENSUSPlus_PRUNE = "간략화"; + +CENSUSPlus_TAKECENSUS = "현재 이 서버와 이 진영에 속한 \n플레이어를 센서스로 가져옵니다."; +CENSUSPlus_TAKEGUILDCENSUS = "Take a census of players \ncurrently online on this server \nand in this guild"; +CENSUSPlus_PURGEDATABASE = "모든 데이터를 소거합니다."; +CENSUSPlus_PAUSECENSUS = "현재 센서스를 일시중지 합니다."; +CENSUSPlus_UNPAUSECENSUS = "일시중지된 센서스를 계속 진행합니다."; +CENSUSPlus_STOPCENSUS = "활동중인 센서스+를 중지합니다."; +CENSUSPlus_PRUNECENSUS = "30일동안 검색되지 않은 플레이어를 \n데이터베이스에서 제거해 간략화 합니다."; + +CENSUSPlus_PRUNEINFO = "%d 케릭터 간략화됨."; + +CENSUSPlus_PURGEMSG = "케릭터 데이터베이스가 소거되었습니다."; +CENSUSPlus_ISINPROGRESS = "센서스+가 진행중입니다, 나중에 다시 시도하십시오."; +CENSUSPlus_TAKINGONLINE = "온라인 상태의 케릭터를 센서스로 가져오는 중입니다..."; +CENSUSPlus_PLZUPDATEDATE = "좀더 정확한 데이터를 얻기 위해 /censusdate 를 사용해 오늘 날짜를 수정하십시오. (형식 /censusdate MM-DD-YYYY, 예, /censusdate 12-25-2004)"; +CENSUSPlus_NOCENSUS = "센서스가 현재 진행중이 아닙니다."; +CENSUSPlus_FINISHED = "데이터 수집 완료. %s 의 새 케릭터가 검색되어 총 %s 케릭터를 확인했습니다. 소요 시간 :%s "; +CENSUSPlus_TOOMANY = "경고: 너무 많은 케릭터 일치: %s"; +CENSUSPlus_WAITING = "누구 명령어를 보내기 위해 기다리는 중..."; +CENSUSPlus_SENDING = "검색중 : /누구 "; +CENSUSPlus_PROCESSING = "%s 케릭터를 수집함."; + +CENSUSPlus_REALMNAME = "서버: %s"; +CENSUSPlus_REALMUNKNOWN = "서버: 알수없음"; +CENSUSPlus_FACTION = "진영: %s"; +CENSUSPlus_FACTIONUNKNOWN = "진영: 알수없음"; +CENSUSPlus_LOCALE = "Locale : %s"; +CENSUSPlus_LOCALEUNKNOWN = "Locale : 알수없음"; +CENSUSPlus_TOTALCHAR = "모든 케릭터: %d"; +CENSUSPlus_TOTALCHAR_0 = "모든 케릭터: 0"; +CENSUSPlus_TOTALCHARXP = "XP 지수: %d"; +CENSUSPlus_TOTALCHARXP_0 = "XP 지수: 0"; +CENSUSPlus_SCAN_PROGRESS = "검색 진행중: %d 개의 질의 대기중 - %s"; +CENSUSPlus_SCAN_PROGRESS_0 = "진행중인 검색이 없습니다."; +CENSUSPlus_AUTOCLOSEWHO = "누구 창 자동으로 닫기"; +CENSUSPlus_SHOWMINI = "시작시 최소화 보기"; +CENSUSPlus_UNGUILDED = "(길드없음)"; +CENSUSPlus_TAKE = "가져오기"; +CENSUSPlus_TAKEGUILD = "Take guild"; +CENSUSPlus_TAKINGGUILD = "Taking guild"; +CENSUSPlus_TOPGUILD = "XP 에 의한 길드 순위"; +CENSUSPlus_RACE = "종족"; +CENSUSPlus_CLASS = "직업"; +CENSUSPlus_LEVEL = "레벨"; +CENSUSPlus_PURGE = "소거"; +CENSUSPlus_MAXXED = "MAXXED!"; + +CENSUSPlus_MAXIMIZE = "센서스+ 창 최대화"; +CENSUSPlus_MINIMIZE = "센서스+ 창 최소화"; +CENSUSPlus_BUTTON_MINIMIZE = "최소화"; + +CENSUSPlus_DRUID = "드루이드"; +CENSUSPlus_HUNTER = "사냥꾼"; +CENSUSPlus_MAGE = "마법사"; +CENSUSPlus_PRIEST = "사제"; +CENSUSPlus_ROGUE = "도적"; +CENSUSPlus_WARLOCK = "흑마법사"; +CENSUSPlus_WARRIOR = "전사"; +CENSUSPlus_SHAMAN = "주술사"; +CENSUSPlus_PALADIN = "성기사"; +CENSUSPlus_DEATHKNIGHT = "죽음의 기사"; + +CENSUSPlus_DWARF = "드워프"; +CENSUSPlus_GNOME = "노움"; +CENSUSPlus_HUMAN = "인간"; +CENSUSPlus_NIGHTELF = "나이트 엘프"; +CENSUSPlus_ORC = "오크"; +CENSUSPlus_TAUREN = "타우렌"; +CENSUSPlus_TROLL = "트롤"; +CENSUSPlus_UNDEAD = "언데드"; +CENSUSPlus_DRAENEI = "드레나이"; +CENSUSPlus_BLOODELF = "블러드 엘프"; + +CENSUSPlus_WarsongGulch = "전쟁노래 협곡"; +CENSUSPlus_AlteracValley = "알터렉 계곡"; +CENSUSPlus_ArathiBasin = "아라시 분지"; +CENSUSPlus_EyeOfTheStorm = "폭풍의 눈"; + +CENSUSPLUS_US_LOCALE = "Select if you play on US Servers"; +CENSUSPLUS_EU_LOCALE = "Select if you play on EURO Servers"; +CENSUSPLUS_LOCALE_SELECT = "Select if you play on US or EURO servers"; + +CENSUSPlus_BUTTON_OPTIONS = "설정"; +CENSUSPlus_OPTIONS_HEADER = "센서스+ 설정"; +CENSUSPlus_ISINBG = "현재 전장에 있기 때문에 센서스가 작동하지 않습니다."; +CENSUS_OPTIONS_BUTPOS = "버튼 위치"; +CENSUS_OPTIONS_BUTSHOW = "미니맵 버튼 보이기"; +CENSUS_OPTIONS_AUTOCENSUS = "자동-센서스"; +CENSUS_OPTIONS_THISPROFILE = "이 케릭터를 위해 프로필 모으기"; +CENSUS_OPTIONS_AUTOSTART = "자동-시작"; +CENSUS_OPTIONS_VERBOSE = "모두 알림"; +CENSUS_OPTIONS_SOUND_ON_COMPLETE = "종료시 소리 재생"; +CENSUS_OPTIONS_LOG_BARS = "로그마틱 레벨 그래프"; + +CENSUSPlus_AUTOSTART_TOOLTIP = "자동으로 센서스+ 활성화"; +CENSUSPlus_VERBOSE_TOOLTIP = "스팸 메시지를 멈추려면 해제하세요!"; +CENSUSPlus_AUTOCENSUS_TOOLTIP = "플레이 시 자동으로 센서스+ 검색 시작"; +CENSUSPlus_THISPROFILE_TOOLTIP = "WarcraftRealms.com 에 업로드 하기 위해 이 케릭터의 프로필 데이터를 모읍니다."; + +CENSUSPlus_BUTTON_CHARACTERS = "케릭터 보기"; +CENSUSPlus_Characters = "케릭터"; + +CENSUS_BUTTON_TOOLTIP = "센서스+ 열기"; + + +--|cff979797[11:19:12]|r|c00000000|r |cffd8d8d8[|r|Hplayer:Rollee:93|h|cffd8d83f1|r:|cfffff468Rollee|r|h|cffd8d8d8]|r: Level 1 Troll Rogue - Durotar +--|Hplayer:Rollee|h[Rollee]|h: Level 1 Troll Rogue - Durotar +CENSUS_SINGLE_MATCH_PATTERN = "(.+)%: (%a+) (%d+) (.+) %- (.+)"; + +CENSUS_LEVEL_NO_GUILD = "%[(.+)%: 레벨 (%d+) (%a+) (%a+) %- (.+)"; +CENSUS_LEVEL_W_GUILD = "%[(.+)%: 레벨 (%d+) (%a+) (%a+) %<(.+)%> %- (.+)"; +CENSUS_LEVEL_W_GUILD_2 = "%[(.+)%: 레벨 (%d+) (%a+) (%a+) (%a+) %<(.+)%> %- (.+)"; +CENSUS_LEVEL_NO_GUILD_2 = "%[(.+)%: 레벨 (%d+) (%a+) (%a+) (%a+) %- (.+)"; + +CENSUSPlus_CANCEL = "취소"; + +CENSUSPlus_OVERRIDE = "센서스가 작업중입니다, 우선적으로 해당 명령을 수행합니다. 잠시만 기다려주세요."; +CENSUSPlus_OVERRIDE_COMPLETE = "우선 시행 완료, 센서스 검색을 재개합니다."; +CENSUSPlus_OVERRIDE_COMPLETE_BUT_PAUSED = "우선 시행 완료, 센서스 일시중지됨."; + +CENSUSPlus_PURGE_LOCAL_CONFIRM = "정말로 로컬 데이터베이스의 모든 자료를 소거하겠습니까?"; +CENSUSPlus_OVERRIDE_COMPLET_PAUSED = "우선 시행이 완료되었지만 센서스가 일시중지 되었습니다. 계속 버튼을 클릭하세요."; + +CENSUSPlus_YES = "예"; +CENSUSPlus_NO = "아니오"; +CENSUSPlus_CONTINUE = "계속"; + +end +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/readme.txt Tue Mar 30 13:42:05 2010 +0200 @@ -0,0 +1,200 @@ +CensusPlus - by Rollie of Bloodscalp aka Cooper Sellers + + WEBSITE + + http://www.warcraftrealms.com/ + + VERSION + + 4.2.2 - 11/13/2007 - Update + - Further attempts at catching rogue who results + - Modified the minimap button to be dragable anywhere, also removed the slider bar + - Added an option to display the level bars logarithmically or not (on the options panel) + - Added support for tracking less than 3 results while running prat + - Added a simple scan progress tracker on the main UI screen/ + + 4.2.1 - 11/13/2007 - Update + - Attempt at updates to fix rogue who results + + 4.2.0 - 11/13/2007 - Update + - Updates for DK's and level 80! + + 4.1.4 - 06/03/2007 - Update + - Fixed bug when selecting guilds from the guild list + - Added the last seen date to the player list + + 4.1.3 - 5/30/2007 - Update + - Update for patch 2.1 + - Put in check for WhoLib and functionality to make CensusPlus work better with WhoLib + - Fixed shift+click player names for this patch + - Made it so that guild results will be filtered if you have any filter options selected + + 4.1 - 3/16/2007 - Update + - Fixed the less than 3 problem where those characters were not processed + - Removed the profiling information altogether, Arena does this for us now! + - Changed the tooltip on Purge + - Added the ability to shift click a name to do a /who on it while a Census + scan is in process + + 4.0 - 1/16/2007 - Update + - Updates for the Burning Crusade expansion, added Draenai and Blood Elves, allowed both + Shaman and Paladin classes to be displayed, and increased the level range to 70. + + + 3.6.0 - 12/05/2006 - Update + - Updates for the Burning Crusade expansion, added Draenai and Blood Elves, allowed both + Shaman and Paladin classes to be displayed, and increased the level range to 70. + + + 3.5.1 - 10/07/2006 - Update + - Finally put in place a way to do a normal /who while census is running + - If your /who returns more than 3 results, the friends frame window + will be displayed and the census will be paused + - Added an audible sound that can be played with the census is complete. In addition + an option has been added to the options panel to disable this feature. + - Moved the Verbose option to be a character specific option + - Added Spanish Translation, props to Nekormant of EU-Zul'jin for this translation + + 3.5 - 08/29/2006 - Update + - Updated TOC for patch 1.12 + - New commands: + /census take - allows you to start a census via command line + /census stop - allows you to stop a census via command line + - Added a right click menu to the mini-map button to allow you to do common + census functions like Take, Stop, and Pause + - Added a player list feature that will show you the list of players for currently + selected filters in the display. This list is capped at 1000 players. + - Modified the locale detection to hopefully clear up locale issues + - Added battleground wait time collection information which will soon start being reflected + on the site + - Removed the restriction on taking census snapshots while in battlegrounds + - Made efforts to removing the lag created when a census finishes. You will likely still + see the lag if you have the Census window open when a census completes, but if it + is closed, there should be no noticable lag. + + + 3.4 - 07/03/2006 - Update + - Updated TOC for patch 1.11 + - New commands: + /census timer ## - will set the timer for the autocensus function (in minutes) + - Added a confirmation box when you hit the Purge button + + + 3.3 - 03/30/2006 - Update + - Updated TOC for patch 1.10 + - Added a couple of new commands: + /census who XXXX - will return any local data you have where a character name or guild + matches (partially or fully) the given term + /census who unguilded ## - where ## is a level, will return all unguilded characters + of that level + - Attempt at removing the extra 3 or less spam for German clients + + 3.1 - 1/03/2006 - Update + - Many fixes pertaining to profile data gathering + - Added method to determine regional servers (EU vs US) + - Added fixes for searches and battlegrounds + - Added pruning options, can now do the following: + /census prune x - prunes data older than X days + /census serverprune - will prune all data other than the current server + - Several other minor fixes and tweaks + + 2.0 - 4/23/2005 - Update + -Friends panel will no longer even attempt to open if the auto-close who is selected. This + allows any other panels to be open during a census and they will not close or change your + view. + -Mini-Census button is now moveable. You'll have to click just around the button to move it + -Added PVP Honor tracking. This will be viewable on the site soon. + -Modified the time tracking, cool new stats on the site to follow soon. + -Added in some regional server detection. Please note if you get any error messages detailing + that the Mod thinks your locale should be set differently and let me know about them. + -Auto-census will no longer start as soon as you log in and will instead wait 5 minutes. + + 1.8 - 3/23/2005 - Update + -Silenced the Friends panel clicking when opening and closing during a census + -Implemented the new time() and date() APIs + -Removed /censusdate + -Added option to take auto-census + -Added option window + + 1.4 - 2/4/2005 - French and German localization + 1.3 - - Small bug fix for error in 1.2 + + 1.2 - 1/19/2005 - Update + -Fixed a bug with a current census that is paused becoming unpaused when you close certain windows. + -Added a /censusverbose command that will toggle the CensusPlus messages on/off. + -Modified the way a census is taken. Instead of the divide and conquer style used that started a census + with 1-60 and going from there, it will now start in 5 level increments and divide if necessary. + -Added guild support. The mod will now capture guild data when viewed on the guild panel. This data + is used to provide more comprehensive data on the site and is available through the guild exports. + -Added a tracking feature that will allow tracking of the number of characters seen during a census. + This data is displayed on the Activity Page + + 1.0 - 1/10/2005 + + INTRODUCTION + + CensusPlus came about due to requested changes and desired options + not present in the original Census UI Mod by Ian Pieragostini. + + I spoke with Ian and he has lost interest in World of Warcraft modding + and encouraged me to modify the Census Mod to my liking. Thus I + have done so. + + The original Census UI Mod basically took snapshots of your current + realm and faction. You could keep this data and combine it with + other snapshots to provide greater statistical analysis. + + CensusPlus offers many features above and beyond what the original Census + UI mod provided. Here follows a list of added features: + + - Abilty to minimize the main census window + which provides you the abilty to actually play while a census + is being taken + - Ability for the Friends panel not to be shown after + each /who is sent to the server. This keeps the UI open from + the main Census window + - Ability to pause and unpause the current census + - Ability to stop the current census in progress + - Added a date information which allows the user to place a + date timestamp on all characters that are found during census's + taken that day -- This helps facilitate greater accuracy in + results when census data is uploaded to www.warcraftrealms.com + - Data on number of characters seen during the census snapshot. + - Collection of Honor points data. + + USAGE + + Unzip the files into your %World of Warcraft/Interface/AddOns directory. It + should create a CensusPlus directory with the installed files. + + If you have Cosmos installed, CensusPlus will register itself with Cosmos + and you can invoke the Census window by selecting the CensusPlus option from + the Census menu. + + You can also invoke the CensusPlus window by typing /censusplus or /census+ + + You can select to not open the Friends panel when a /who is sent. + + You can select to automatically display the Mini-Census button which must be + visible in order for a Census to be taken while the main Census window is + minimized. + + By selecting the Take button from the main census panel, you will initiate a + Census snapshot. Depending on the population of your realm and faction, this could + take several minutes. + + Clicking the Purge button will purge all your collected data from your local Census + database. + + Clicking the Stop button will stop the current census if one is in progress. + + Clicking the Pause button will pause the current census if one is in progress. + + If you so choose, you can upload your collected census information to + http://www.warcraftrealms.com Doing so will greatly help in the tracking + of your realm and faction's population numbers and statistics. + + + + +
