Sea/ChangeLog

v1.35 (1/9/06)

 * 1) Moved embedded libs to the Libs/ folder and added X-Embeds toc tag
 * 2) Added a lot of toc metadata
 * 3) Updated toc files to 20300
 * 4) Fixed a reagent typo
 * Sea.wow.questlog v 0.4
 * 1) stringToColor requires Sea.math

v1.34 (7/14/07)

 * 1) Updates for PartyQuests to return all quest data in one function call. It is less likely to have issues this way.  Also reformats quest data to make it easier to read and maintain.

v1.33 (6/1/07)

 * Sea.wow.questlog
 * 1) QUESTLOG_MAX bumped to 25 to match current actual number of max quests.
 * 2) Changes made to cut down on number of erroneously triggered QUEST_LOG_UPDATE events.
 * 3) Suggested group and daily changes.
 * 4) Tooltip when mousing over reward icon in quest log should now display.

v1.32 (2/22/07)

 * 1) Added Cooking Reagent - Crunchy Spider Leg

v1.31 (1/9/06)

 * 1) Updated toc files to 20003
 * Sea.wow.questlog
 * 1) Updated GetQuestLogTitle usage with additional 4th argument "suggestedGroup"

v1.30 (1/6/06)

 * 1) Added SeaTable (embeddable version of Sea.table - By Gryphon)
 * 2) Added SeaMath (embeddable version of Sea.math - By Gryphon)
 * Sea.util (SeaHooks v1.3)
 * 1) Due to complaints about memory usage, the hook handler has been rewritten back to the old 20 argument method, it now has zero memory overhead other than the stack variables deleted after execution. This was not a revert of code, so new features such as passReturnArgs should still work.
 * 2) Added an exceptional hook handler for OnUpdate scripts and functions with OnUpdate in the name. It only passes 1 argument and zero returns.
 * Sea.wow.spellbook (SeaSpellbook v1.8)
 * 1) Tooltip no longer refrences itself

v1.29 (12/17/06)

 * Sea.wow.questlog
 * 1) removed quest debug.
 * Sea.util (SeaHooks v1.2)
 * 1) Rewrote hook handler to use a more table intensive method. This may use more memory, but executes much less code and should use overall less processor time. This allows for the removal of all of the table recycling code: SeaHooks_assignArgs, SeaHooks_inverseAssignArgs, SeaHooks_getTables, SeaHooks_releaseTables and Sea.util.argStack. This also fixes two serious issues that were cropping up:
 * 2) *Args and return args no longer stop after the first nil
 * 3) *The number of arguments and return arguments allowable to hook is now unlimited

v1.28 (12/6/06)

 * Sea.wow.tooltip
 * 1) Updated clear(tooltip) to handle new variable sized tooltips

v1.27 (12/5/06)

 * Sea.wow.questlog
 * 1) Fixed nil error

v1.26 (12/4/06)

 * Sea.data.item
 * 1) Added Jewelcrafting to Sea.data.item.lua
 * 2) Updated localization.en.lua with reagents for all professions, including all BC reagents. The file was quite out of date, missing ZG and AQ recipe materials.
 * Sea.wow.questlog
 * 1) Fixed zone error
 * 2) Updated for GetQuestLogTitle change (new 4th return argument "suggestedGroup")
 * 3) Updated to use Sea.util.split
 * Sea.util (SeaHooks v1.1)
 * 1) Fixed bug with hooked functions only returning a single value
 * 2) Added SeaHooks_inverseAssignArgs for replace hooks, so that it now correctly passes return arguments when fully replacing the function

v1.25 (10/20/06)

 * Sea.util (SeaHooks v1.0)
 * 1) Removed Sea.util.returnArgs completely. Use the new passReturnArgs, 4th arg to Sea.util.hook

v1.24 (10/9/06)

 * Sea.util (SeaHooks v0.9)
 * 1) Added a check to make sure GetScript returned a function (since there's an issue with it returning a number)
 * 2) Added another argument to hook: needsRetArgs. This boolean will allow 'after' hooks to be passed a table of args and a table of return args. All other hooks will pass unpacked args like v0.7 and earlier

v1.23 (9/19/06)

 * 1) Prepared for Lua 5.1 - Replaced getn with #, reworked setn use, added pairs/ipairs to naked loop constructs, and modified .../arg usage.
 * Sea.util (SeaHooks v0.81)
 * 1) Removed Sea.util.topReturnArgs
 * 2) Fixed a bug with local functions being out of scope
 * Sea.util (SeaHooks v0.80)
 * 1) Removed Sea.string.split and Sea.string.explode aliases. use Sea.util.split
 * 2) Added Sea.util.join (removed from Sea.io)
 * 3) Completely revamped the hook handler.
 * 4) *Hooks now use recycled tables to store passed arguments and return arguments (now that Lua 5.1 handles table garbage better)
 * 5) *(OUT OF DATE - args are now unpacked) Now hook function are passed a single table of arguments passed to the parent function.
 * 6) *(OUT OF DATE - now only when needsRetArgs was passed true) 'after' hooks are also passed a second table containing the current return values
 * 7) *DO NOT MODIFY PASSED TABLES. Assign them to local variables and use the 'return true, ...' construct to pass new arguments as specified for each typ of hook.
 * 8) *'return true, ...' from all hooks (other than 'after' hooks) uses the passed arguments as the return arguments from the parent function.
 * 9) *'return true, ...' from 'before' hooks passes those arguments (instead of the orig ones) to all subsequent hook functions and the orig function
 * 10) *Debug mode is temporarily dissabled, awaiting rewrite for new procedures
 * Sea.io (SeaPrint v0.3)
 * 1) All print functions now use ... pass through, rather than inneficiently unpacking
 * 2) Sea.io.join moved to Sea.util.join (other aliases removed)
 * 3) Added Sea.io.mergeArgs (for concatonating a list w/o using a table. Also uses tostring on non-string/numbers)
 * 4) Removed Sea.util.makeHyperlink alias (use Sea.io.makeHyperlink)
 * 5) Upgraded Sea.io.printTable:
 * 6) *Now handles recursive tables
 * 7) *Added quotes around strings
 * 8) *Added maxLevel 4th arg for showing only the first X levels of embedded tables
 * 9) *Table keys are now sorted with "<"
 * 10) Added the following debug slash commands:
 * 11) */print - Sea.io.print(...)
 * 12) */printc - Sea.io.printComma(...)
 * 13) */printd - Sea.io.dprint(true, ...)
 * 14) */printt - Sea.io.printTable(tableObj, rowname, level, maxLevel)
 * Sea.string (SeaString v0.3)
 * 1) Prepared for Lua 5.1
 * Sea.wow.spellbook (SeaSpellbook v1.8)
 * 1) Prepared for Lua 5.1

v1.21 (8/3/06)

 * Sea.wow.spellbook (SeaSpellbook v1.7)
 * 1) Minor cleanup, before standalone release.
 * 2) Fixed SeaSpellbook registration error
 * 3) Changed File rename for consistancy
 * Sea.wow.spellbook (SeaSpellbook v1.6)
 * 1) Made Scholar registration more loose. It not only required a valid id in case you want to have up to date spell data but don't been callbacks when it changes.
 * 2) Allowed for scholar registration OnLoad (tho no valid data is availible until after PLAYER_ENTERING_WORLD

v1.20 (8/3/06)
Sea.util (SeaHooks v0.7)
 * 1) Removed completely outdates unit tests
 * 2) Refactored SeaString (Sea.string), SeaHooks (Sea.util), SeaPrint (Sea.io) and SeaSpellbook (Sea.wow.spellbook) so that the full distribution contains the embeddable versions to simplify upkeep and maintinence.
 * Sea.wow.spellbook (SeaSpellbook v1.6)
 * 1) Made Scholar registration more loose. It not only required a valid id in case you want to have up to date spell data but don't been callbacks when it changes.
 * 2) Allowed for scholar registration OnLoad (tho no valid data is availible until after PLAYER_ENTERING_WORLD
 * 3) Fixed Sea.io refrences
 * Sea.string (SeaString v0.2)
 * 1) Changed lua file name
 * Sea.io (SeaPrint v0.2)
 * 1) Added makeHyperlink
 * 2) Changed lua file name
 * 1) Added an inclusive argument to split to catch empty strings
 * 2) Changed lua file name
 * Sea.data
 * 1) Renamed localization to localization.en.lua in hopes that the spell and item names will be localized in other languages.

v1.19 (7/31/06)

 * Sea.wow.spellbook (SeaSpellbook v1.5)
 * 1) Made the Sea version embeddable/embedded and changed the embedding style to match the other mini-libs
 * 2) Made the tooltip in lua to avoid xml duplication errors
 * Sea.data.item
 * 1) Removed Primal Hakkari pieces and bijous from the class item lists to match 1.11 changes. They will now no longer have class listings with RegeantHelper.

v1.18 (7/19/06)

 * Sea.wow.spellbook
 * 1) Added GetSpellIDByName( name, [booktype[, rank]] )
 * 2) Added RegisterScholar( scholarTable ) - Register a scholar with the specified id, that will be informed when the spellbook change
 * 3) Added UnregisterScholar( id )
 * 4) Added GetSpellDetails( index, bookType, spellType ) - Read the tooltip to get detailed information about a spell
 * Sea.io
 * 1) Added versioning for compat with SeaStrings mini-lib.
 * 2) Added support for sending debug prints to IEFs debug capture system.
 * Sea.string
 * 1) Fixed fromTime to correctly display decimal places on the seconds, rounding correctly as well.
 * 2) Optimized the following functions: startsWith, endsWith, capitalizeWords
 * Sea.wow.questLog
 * 1) Protect/unprotect updated to fully restore scroll bar position.
 * 2) Added convertPlayerQuestTreeFromFlatToNormal - Converts output of getPlayerQuestTreeFlat to format of output of getPlayerQuestTree. It's shallow copy: doesn't copy actual quest entries, just reference them.
 * 3) Added getPlayerQuestTreeFlat - returns questTree in a flat format
 * 4) Added convertPlayerQuestTreeFromFlatToNormal - converts result of getPlayerQuestTreeFlat to format of getPlayerQuestTree for backward compatibility

v1.11 (1/14/06)

 * Sea.util.lua
 * 1) Only one replace hook is now called for each hook call, unless it returns true as arg1
 * 2) Old style table passing of return arguments as a table is again honored, but not encouraged. All other return value must be nil except fro arg1 (non-nil) and arg2 (argument table)
 * 3) Fixed bug preventing propper unhooking

v1.1 (1/4/06)

 * Sea.wow.tooltip
 * 1) The tooltip scanning functions were using IsVisible, which now returns nil if the tooltip is hidden. These have now been switched to IsShown, this will fix problems occuring in any addons using the Sea tooltip functions.

v1.09 (1/3/06)
Sea.string
 * 1) colorToString was returning floats in the string instead of hex, fixed.

v1.08 (12/24/05)
Sea.string
 * 1) Updated colorToString to always return a valid color string with alpha even with an incomplete color table passed.

v1.07 (12/08/05)
(Update Contributors: AnduinLothar, Iriel, Legorol, krka, cladhaire)
 * Sea.util:
 * 1) Updated hooks to use Style and features defined by SeaHooks v0.3 as follows:
 * 2) Code Optimization thanks to suggestions from Cladhaire and Iriel
 * 3) Added Feature: input argument modification using a 'before' hook.
 * 4) *If you return true as the the first arg from a before hook function the subsequent arguments will be the arguments fed to each hook function called afterwards as well as the orig function.
 * 5) *EX: if your before hook returned (true, nil, 10) then the next hook would be called as func(nil, 10), as would the orig(nil, 10)
 * 6) *This allows you to modify a function output without destroying or hiding the orig function, allowing additional hooks to be called without conflicting functionality.
 * 7) Added Feature: You can now modify return values from either a 'replace' that hides the orig func or an 'after' hook
 * 8) Added Feature: Added Error Debug and Vebose Debug by hook function name
 * 9) */script Sea.util.debugHooks(enabled, verboseHookName)
 * 10) *enabled - boolean, verboseHookName - string equal to 'orig' passed to hook function (nil to disable)
 * 11) *Note: enabling debug usually incurs a heavier proc load and can cause slow down when used with OnUpdate hooks.
 * 12) Added Feature: current return values from a hooked function are availible to 'after' hooks via global return variables: Sea.util.returnArgs[1-20]
 * 13) *Note: These arguments are only availible for the durration of the 'after' hook call.
 * 14) *Also, if you call any function within the 'after' hook that would lead to the call of another 'after' hook call then the global Sea.util.returnArgs would most likely change.
 * 15) *Thus it is highly recommend you grab whatever return arguments you need at the beginning of the function call and assign them to local variables.
 * 16) *This method preserves reverse compatibility as well as avoids table creation and thus does not effect GC.
 * 17) *You can also use Sea.util.getReturnArgs to unpack them for you. Ex: local arg1, arg2 = Sea.util.getReturnArgs;
 * 18) Now stores a refrence of the hooked function handler in the database to facilitate future overhook recognition
 * 19) Optimized split, getValue and setValue based on collaboration with Iriel, krka and Legorol
 * 20) * Sea.util.getValue updating to to be 170% more execution time efficient than the previous version!
 * Sea.io
 * 1) Modified Sea.io.dprintfc to take a non string boolean as well for use with local debug variables.
 * 2) *New behavior of argument 1 (debugkey): if nil, then "getglobal(Sea.IO.debugKey)" is used; if string, then "getglobal(debugKey)" is used; if boolean or non-string it is evaluated to print using "if (debugKey) then"
 * Sea.table
 * 1) push/pop comments updated
 * 2) *Note: push/pop are useful for tables that are constantly filled and emptied with a consistant number of entries. They are GC friendly and will not purge unused values. Only the .n size is changed when removing. Under general circumstances tinsert/tremove are better.
 * Sea.lua
 * 1) Added versions table for compatibility with embedable sub-libs such as SeaHooks

v1.06 (12/07/05)

 * Sea.math & Sea.string
 * 1) Performance optimizations by Iriel (iriel@vigilance-committee.org)

v1.05 (10/12/05)

 * Sea.util:
 * 1) Hooks now only replace the function with the handler once. This eliminates the occasional hook conflicts with some non-Sea hooks.
 * Localizations
 * 1) Added Heart of the Wild to Alchemy reagents
 * Updated TOC to 1700

v1.02 (9/19/05)

 * Sea:
 * 1) Added Sea.version, Current Version 1.02
 * 2) *This should be incremented when any changes, excluding TOC version only updates, are made. It should always be incremented by exactly 0.01, never more.
 * Sea.util:
 * 1) Sea.util.hook now handles Frame Script Element Hooking!
 * 2) *Sea.util.hook( string originalFunctionNameOrFrameName, string newFunction, string hooktype, string scriptElementName )
 * Ex: Sea.util.hook( "PlayerFrame", "ShowMyTooltip", "after", "OnEnter" );
 * 1) Sea.util.unhook updated similarly.
 * 2) Disabled Complete Unhhoking - Incompatible with Frame Script Element Hooks - Liable to erase hooks loaded after the first hook.
 * 3) Added nil check for orig function - Added compatibility for non-preexisting frame script element functions
 * Sea.wow:
 * 1) Modified Sea.wow.tooltip.scan, it can now accept the table to put the strings into as an additional parameter. Doing this allows avoiding the re-creation and destruction of the table repeatedly, which in turn means no additional garbage collections.
 * 2) Added Sea.wow.tooltip.get, accepts three parameters, tooltip name, row, and value. Can get a single value from a tooltip without generating any garbage collection objects. Can also return all the data for a line. Suggest that you use this instead of Sea.wow.tooltip.scan when you don't need to get multiple lines at once.
 * Localization:
 * 1) Removed Delicate Feather from Alchemy, now grey item.
 * 2) Added Druid reagent Wild Thornroot

(9/10/05)

 * Sea.io:
 * 1) Minor bugfixes
 * 2) Renamed debugKey to errorKey for derror functions as that is the key that is checked.
 * 3) Fixed derrorfc type checking.
 * 4) Some derror functions were not passing the errorKey on to the next function, they now do.
 * 5) Changed dbannerc to call Sea.IO.dprintfc with the appropriate arguments so it now functions like dbanner and the other debug print calls.
 * Sea.string:
 * 1) Added a nil return to Sea.string.capitalizeWords to make error catching easier.
 * Sea.util:
 * 1) Two new functions getValue and setValue, which work like getglobal and setglobal, but can be used for table elements too. These are able to get/set any type of value of any variable. #*Ex: Sea.util.getValue("Class.subclass.element")
 * 2) Changed hook and unhook to use setValue and getValue
 * 3) Extended split function (less garbage generation)
 * 4) Fixed the "replace" type hook that wasn't returning values if the original function ended up called.
 * Sea.table:
 * 1) getKeyList no longer return nil for empty tables.
 * Sea.wow.tooltip:
 * 1) Added create(tooltipTable, tooltipName) that uses the same Table format as Sea.wow.tooltip.scan
 * 2) Upgraded Sea.wow.tooltip.scan to get leftColor and rightColor using the 1.7 GetTextColor (create can also set these)
 * Updated TOC to 1700

(06/17/05)

 * 1) Mods can now return a list when doing a Hook, replace function. The first entry should be whether or not to call the origional, the rest will be returned from the function. This allows us to avoid use of unpack which was causing large numbers of GCs.
 * 2) The hook function now takes a maximum of 20 arguments. This allows us to avoid use of the unpack function which causes a large number of objects to be created and then destroyed on garbage collection(gc)s. This update changed the number of GCs created when BarOptions used hook functions from some 150,000 to only around 50,000. When it was the large number, the game was actually effected by this, and would stutter every few seconds. Please be sure to update to this version of Sea.
 * 3) Sea.io.dprint default debug Key fixed.
 * 4) *Fixed dprint in Sea.util.hook.hookFunction to use default key.

(04/07/05)

 * 1) Updated to TOC 1300
 * 2) Updated Sea.util.hook "replace" for returning functions
 * 3) Updated Sea.item extensively
 * 4) Made ImprovedErrorFrame an optional dependency so that it loads before most addons
 * 5) Added Sea.table.copy
 * 6) Added Sea.table.getKeyList
 * 7) Added Sea.string.startsWith
 * 8) Added Sea.string.endsWith
 * 9) Bug Fixes:
 * 10) Nil table comparison fixed,
 * 11) Fixed and updated Sea.wow.questLog
 * 12) Fixed Sea.string.capitalizeWords