PvPLog 
Author:           Brad Morgan
Based on Work by: Josh Estelle, Daniel S. Reichenbach, Andrzej Gorski, Matthew Musgrove
Version:          3.0.4
Last Modified:    2008-10-16

CHANGES

2008-10-16  * 3.0.4
    * Changed TOC to 30000.
    * Fixed missing fonts and adjusted positioning in the config frame.

2008-08-16  * 3.0.3
    * Added locale to PvPLogData (so I don't have to ask).

2008-07-25  * 3.0.2
    * Added "/pl chat kill|death|self" or "/pl chat <channel>" for debugging purposes.

2008-07-05  * 3.0.1
    * Fixed combat log event PARTY_KILL removal (it was falling through on an elseif).

2008-05-19  * 3.0.0
    * Updated TOC

2008-05-13  * 2.99.91
    * Conditionalized some debug messages.
    * Fixed finding the owner when killed by a pet.

2008-05-13  * 2.99.9
    * Initial beta code with 2.4 combat log changes.

2008-02-12  * 2.99.0
    * Initial alpha code with 2.4 combat log changes.

2008-01-29  * 2.5.1
    * Added code to use race, realm, class, and guild data from PvPLogData (if it exists).
    * Added code to copy race, realm, class, and guild from PurgeLogData to PvPLogData
      when statistics frame is displayed.
    * Added "/pl keep <n>" command to keep the most recent n PurgeLogData records.
    * Removed "/pl fixguild" command.

2008-01-09  * 2.5.0
    * Added cbxPvPLogConfig_NotifyDeathsSay

2008-01-06  * 2.4.9
    * Added PVPLOG.SAY -MattM
    * Added cbxPvPLogConfig_NotifyKillsSay -MattM

2007-12-12  * 2.4.8
    * Fixed displaying the message on a channel again. More than one "named" channel
      will lose messages. It will catch up eventually.
    * Added a Targets tab to the statistics frame containing the targetRecords in
      targetList order.
    * Added additional fields to the other statistics frames.

2007-12-03  * 2.4.7
    * Fixed displaying the message on a channel.

2007-11-17  * 2.4.6
    * Changed TOC to 20300.
    * Added more debugging.
    * Fixed the problem with displaying the message that caused a channel join.

2007-09-28  * 2.4.5
    * Changed TOC to 20200.
    
2007-05-29  * 2.4.4
    * Modified MyMinimapButton.lua to preserve the state of enabled.
    
2007-05-23  * 2.4.3
    * Changed TOC to 20100.
    * Changed the way channel names are used. This may or may not fix problems with 
      non-En clients.

2007-03-13  * 2.4.2
    * Modified MyMinimapButton.lua to allow the radius to be changed with Alt-Click-Drag.
    * Fixed the problem of dueling on the boat.

2007-03-12  * 2.4.1
    * Added PvPLog2 for the per character savedvariables (so the file has a different name).
    * Removed some unused code and variables.
    * Changed the removal of recentDamaged entries to be one every 3 seconds while 
      not in combat and at full health.

2007-03-12  * 2.4.0
    * Fixed tracking periodic damage (really).
    * Reduced the size of the recentDamager and recentDamaged lists.
    * Changed the removal of recentDamaged entries to be one at a time (may need some tweaking).

2007-03-09  * 2.3.9
    * Added more debugging.
    * Added check to recents cleared (healthy) to reduce the number of debug messages.
    * Modified targetRecord population to eliminate possible race condition if "target" changes while
      capturing data.
    * Added tracking of periodic damage. Pets need more research.

2007-03-07  * 2.3.8
    * Added per character savedvariables containing the most recent combat messages and debug messages
      captured when /pl debug on is active.
    * Added the command /pl debug save to save the current copy of these messages.
    * Note: No bugs were fixed with this release.

2007-02-02  * 2.3.7
    * All constants in pvplog.lua and localization.lua moved into a PVPLOG table to 
      fix a problem in the previous version and to reduce global namespace polution.

2007-02-01  * 2.3.6
    * Clear lastDamagerToMe if you just killed them.
    * Clear recentDamagers if you are not in combat and reach full health.
    * Move version number out of localization.lua (use the one in the TOC).
    * Changed TOC so that the current Author can be fetched with GetAddOnMetadata.

2007-01-27  * 2.3.5
    * Fixed notifyKill and notifyDeath being nil.

2007-01-26  * 2.3.4
    * Fixed error caused by notifySystem being nil. How it got that way is a different problem.

2007-01-17  * 2.3.3
    * Changed maximum level to 70.

2007-01-13  * 2.3.2
    * Changed TOC to 20003.
    * Players without a guild are now "" instead of "Unguilded".
    * Added /pl fixguild to convert existing data.

2007-01-05  * 2.3.1
    * Update level every time we see a target.
    * Update FR localization (by Exerladan).

2007-01-03  * 2.3.0
    * Added Statistics display (/pl pvp, /pl duel, /pl recent) to minimap button left-click.
    * Statistics display now has tabs (PvP, Duel, Recent).
    * Recent Statistics display shows all non-BG PvP activity in the last 24 hours for
      all characters on the current realm.
    * Fixed minimap button error for first time users.

2007-01-01  * 2.2.2
    * Fixed /pl pvp and /pl duel output.

2007-01-01  * 2.2.1
    * Added more debug.

2006-12-31  * 2.2.0
    * Added Record and Notify options.
    * Allow notifyKillText and notifyDeathText to be modified.
    * Rearranged localization.lua to group commands together (and fixed more errors).
    * Removed unused fields from PurgeLogData (new players only).
    * Removed slash commands for items set via the config frame.
    * Moved some functions from PvPLog.lua to PvPLogUI.lua

2006-12-30  * 2.1.1
    * Fixed dueling.
    * Fixed some localization errors (commands must be one word and string.lower).

2006-12-25  * 2.1.0
    * Added SELF to the list of destinations for notify messages.
    * Custom notify destination can now be a comma separated list and can include
      channel numbers (i.e. 3 = LocalDefense).
    * Cleaned up stats output.
    * Returned recentTargets and damagedTargets which are cleared at player death.
      (targetRecords was remembering too much about the state of recent combat).

2006-12-22  * 2.0.2
    * The targetRecords are retained across death and sessions (savedvariables).

2006-12-21  * 2.0.1
    * TargetByName replaced with targetRecords populated when PLAYER_TARGET_CHANGED.

2006-12-21  * 2.0.0
    * Massive changes necessary for WoW version 2.

2006-12-06  * 0.7.0
    * Changed TOC to 20000
    * Changes necessary for Lua 5.1

2006-10-23  * Released 0.6.1
    * Added a button to the Earth Features Menu (or the Khaos menu if the Earth Features Menu is disabled) in Cosmos (if installed).
    * Added PvPLog to the myaddons menu (if installed).
    * Added an option to disable the minimap button courtesy of Atolicus.
    * Added realm to the PvP UI window (and PurgeLogData table) courtesy of Atolicus.
    * Fixed a bug with the Minimap table after resetting the data.
    * Added UI_OPEN, UI_CLOSE, DESCRIPTION, UI_MINIMAP_BUTTON to localization.lua (translations needed).
    * Additional German translations by yamyam.
        
2006-10-05  * Released 0.6.0
    * The minimap position will now be saved.
    * Changed version from 0.5.3 to 0.6.0.

2006-10-03
    * Added TODO.txt.

2006-10-01
    * Corrected bug with the minimap button not always appearing due to a data issue.
    * Changed the event in which the minimap button is created.

2006-09-28  * Released 0.5.3 beta
    * Updated localization.lua with Spanish translations curtesy of NeKRoMaNT.
    * Added UI courtesy of Atolicus.
    * Added a mini-map button.
    * Corrected some nil errors.
    * Added back support for notifykills and notifydeath.
    * Updated README.TXT, PvPLog.xml to add email address for Matthew Musgrove and update URL to obtain updates.
        
2006-08-22  * Released 0.5.2
    * Correct TOC to 11200

2006-08-18  * Released 0.5.1
    * Correct TOC to 11100
    * Added display, ding, mouseover and nospam options.
    * Minor refactoring.

2006-03-30  * Released 0.5.0
        * Correct TOC to 11000
        * Removed the "Sadly the kill was not logged" message for Mobs
        * Fixed a nasty bug that re-targetting was causing

2006-01-20  * Released 0.4.8
        * Corrected .toc patch version (10900)
        * Fixed bugs where Duels were not recorded
        * Seperated Guild data from Player data (improved memory usage)
        * Over-hauled the array structure for PvPLogData and PurgeLogData
        * Added BattleGrounds Flag to PurgeLogData
        * Added Rank information about target (Duel and PvP)
        * Added Estimated Honor to PvP Kills
        * Fixed PvPLogInitialize routine
        * Added a Debug Channel - requires it's own Frame where the only
        *     Channel listened to is PvPDebug
        * Removed invalid save methods
        * Merged Localization to a single file
        * Added MarsMessageParser support to auto-localize string
        *     parsing and searching of Blizzard strings
        * Modified the coloring of all text to less bright colors
        * Removed unnecessary function that were written to perform
        *     functionality already available through WoW API
        * Major code cleanup
        * Better handling of OnEvent messages for a performance boost

2005-10-13  * Released 0.4.7f
            * Corrected .toc patch version (1800)
            * Added more data to the .toc file.
            * Fixed a bug in PvPLogInitialize, where addon initialization
              would fail on other locales than deDE.

2005-10-10  * Released 0.4.7e
            * By default PvPLog will not anymore output any kill or death
              message to the chat. You will have to set this manually via
              /pvplog notifykills <channel> and
              /pvplog notifydeath <channel>

2005-09-19  * Released 0.4.7d
            * Save PvPLogData and PurgeLogData into global SavedVariables.lua
              file
            * Corrected .toc patch version (1700)

2005-09-14  * Released 0.4.7c
            * Corrected .toc patch version (1600)

2005-08-25  * Released 0.4.7b
            * Fix minor typo on deDE localization preventing duel logging
              Thanks to Sphinx.

2005-08-24  * Released 0.4.7a
            * Moved localization to localization.LOCALE.lua
            * Added Patch Level to version string (VER_PL)

2005-07-29  * Released 0.4.7
            * Corrected .toc patch version (1600)
            * Localized UI strings for enUS and deDE locale
            * Added vendor string with "wowprofilers.com" as default
            * NOTE: This version and continuing versions will be maintained by
              Daniel S. Reichenbach (dsr@best-off.org) as Josh Estelle does not
              seem to provide updates anymore.

2005-06-21  * Released 0.4.6a
            * Corrected .toc patch version (1500)

2005-04-27  * Released 0.4.6
            * Fixed customizability of notification text

2005-04-13  * Released 0.4.5
            * Made chat notification text completely customizable
              see: /pvplog notifykillstext
                   and
                   /pvplog notifydeathtext
            * Fixed non-counting of high level players

2005-03-31  * Released 0.4.4
            * Corrected .toc patch version (1300)
            * Fixed double death problem introduced by patch.
              Thanks to Whizzer and MasterMike
            * Fixed annoucement of level -1 players introduced by patch.
            * Made PvP record that hovers near the target pane movable.

2005-03-13  * Released 0.4.3
            * Corrected .toc patch version
            * Fixed chat commands with no argument used to cause error
            * Shortened notify text so its usually one line
            * Fixed: allow for capital letters in notify chat rooms

2005-02-10  * Released 0.4.2
            * Added more configurability for dings
            * Made colors prettier
            * Fixed instance bug
            * Added visual feedback for chat commands
            * Doesn't ding for party members any more
            * Added ability to send notify messages to named chatrooms

2005-02-08  * Fix so updates target text when kills get recorded

2005-02-04  * Release 0.4.1
            * Small fix so changing notification chat settings work

2005-02-04  * Release 0.4.0
            * Changed from using RegisterForSave to SavedVariables, should fix data loss issues
            * Reworked variable initializtion
            * Made colors prettier
            * Reduced redundent code by making sub-functions
            * Changed text on record reports (target & mouseover)
            * Fixed rounding to avg level differences in stats
            * Added reporting of guild record
            * Added ability to reset data
            * Added ability to notify party guild or raid about deaths and kills

2005-02-01  * Released 0.3.4
            * Changed so all PvP logging is reported to chat
            * Warnings of people you have records with changed to be configurable by location command
            * Added color to target record display
            * changed text so should say different things on mouse over for people you dueled
            * fixed PvPLogFriends usage 
            * made it so /pl listall will fix .enemy

2005-01-31  * Released 0.3.3
            * Small changes again to fix average level different calc
            * Small changes that might help data loss problem
            * Fixes causing strange behavior in chat frame

2005-01-31  * Released 0.3.2
            * Small fix so that target record doesn't obstruct other things
            * Small fix to average level difference calculation

2005-01-28  * Released 0.3.1
            * Fixed "Unknown Untity" which may have caused appeared data loss
            * Put a timer on the warning ding, so it only dings every 30 seconds (configurable)
            * Seperated stats for PvP and duels
            * Added a ganker rating to stats

2005-01-27  * Released 0.3.0
            * Added basic statistics
            * Added a find command for finding records for arbitrary players
            * Fixed bug with other death events w/o "dies" in the message
            * Fixed so that knows about player level ups
            * Changed colors of messages

2005-01-26  * Added tracking of deaths, who kills you
            * Added damage tracking, so it will only track people
              who die to which you've done damage
            * Added tracking of duels

2005-01-24  * Released 0.2.0
            * Added record floating by target window
            * Added sound when mouseover someone who you've encountered before
            * Other small fixes

2005-01-24  * Release 0.1.0
2005-01-24  * Basics seem to be working saving data and adding it to tool tip
2005-01-22  * Reworked variables to support saving data on kills
2005-01-18  * Initial version - simply reports when someone kills you
