Download
(54Kb)
Download
Updated: 11-21-07 02:08 AM
Pictures
File Info
Updated:11-21-07 02:08 AM
Created:unknown
Downloads:18,572
Favorites:96
MD5:

Sea  Popular! (More than 5000 hits)

Version: 1.35
by: AnduinLothar [More]

Sea is a set of function libraries designed to make the process of writing new World of Warcraft UI mods faster and simpler. It is designed to reflect a Java like library style. This addon is a function library. This means that it doesn't have any UI on its own, but rather provides functionality for other addons. If you are an addon user and not an addon developer all you need to do is to leave this addon turned on if you have any other addons that depend on it.

Documentation: WoW Wiki

Localizations:
Core functionality should work on any client. The item list is currently English only, but we take code donations. If you would like to contribute please post on the Cosmos Forums.

Example
Sea.IO.print("Hello World!");

Sea Libraries

  • data - information tables useful to the game
  • IO - input/output functions (mostly output)
  • lang - localization and language formatting functions
  • math - mathematical functions and constants not in lua's Math
  • string - string manipulation and formatting functions
  • table - table manipulation functions
  • util - common utilities, such as hooking functions
  • wow - World of Warcraft game object functions (like tooltip.scan)

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

v1.34 (7/14/07)
- 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
- QUESTLOG_MAX bumped to 25 to match current actual number of max quests.
- Changes made to cut down on number of erroneously triggered QUEST_LOG_UPDATE events.
- Suggested group and daily changes.
- Tooltip when mousing over reward icon in quest log should now display.

v1.32 (2/22/07)
- Added Cooking Reagent - Crunchy Spider Leg

v1.31 (1/9/06)
- Updated toc files to 20003
*Sea.wow.questlog
- Updated GetQuestLogTitle usage with additional 4th argument "suggestedGroup"

v1.30 (1/6/06)
- Added SeaTable (embeddable version of Sea.table - By Gryphon)
- Added SeaMath (embeddable version of Sea.math - By Gryphon)
*Sea.util (SeaHooks v1.3)
- 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.
- 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)
- Tooltip no longer refrences itself

v1.29 (12/17/06)
*Sea.wow.questlog
- removed quest debug.
*Sea.util (SeaHooks v1.2)
- 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:
- *Args and return args no longer stop after the first nil
- *The number of arguments and return arguments allowable to hook is now unlimited

v1.28 (12/6/06)
*Sea.wow.tooltip
- Updated clear(tooltip) to handle new variable sized tooltips

v1.27 (12/5/06)
*Sea.wow.questlog
- Fixed nil error

v1.26 (12/4/06)
*Sea.data.item
- Added Jewelcrafting to Sea.data.item.lua
- 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
- Fixed zone error
- Updated for GetQuestLogTitle change (new 4th return argument "suggestedGroup")
- Updated to use Sea.util.split
*Sea.util (SeaHooks v1.1)
- Fixed bug with hooked functions only returning a single value
- 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)
- 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)
- Added a check to make sure GetScript returned a function (since there's an issue with it returning a number)
- 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)
- 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)
- Removed Sea.util.topReturnArgs
- Fixed a bug with local functions being out of scope
*Sea.util (SeaHooks v0.80)
- Removed Sea.string.split and Sea.string.explode aliases. use Sea.util.split
- Added Sea.util.join (removed from Sea.io)
- Completely revamped the hook handler.
- *Hooks now use recycled tables to store passed arguments and return arguments (now that Lua 5.1 handles table garbage better)
- *(OUT OF DATE - args are now unpacked) Now hook function are passed a single table of arguments passed to the parent function.
- *(OUT OF DATE - now only when needsRetArgs was passed true) 'after' hooks are also passed a second table containing the current return values
- *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.
- *'return true, ...' from all hooks (other than 'after' hooks) uses the passed arguments as the return arguments from the parent function.
- *'return true, ...' from 'before' hooks passes those arguments (instead of the orig ones) to all subsequent hook functions and the orig function
- *Debug mode is temporarily dissabled, awaiting rewrite for new procedures
*Sea.io (SeaPrint v0.3)
- All print functions now use ... pass through, rather than inneficiently unpacking
- Sea.io.join moved to Sea.util.join (other aliases removed)
- Added Sea.io.mergeArgs (for concatonating a list w/o using a table. Also uses tostring on non-string/numbers)
- Removed Sea.util.makeHyperlink alias (use Sea.io.makeHyperlink)
- Upgraded Sea.io.printTable:
- *Now handles recursive tables
- *Added quotes around strings
- *Added maxLevel 4th arg for showing only the first X levels of embedded tables
- *Table keys are now sorted with "<"
- Added the following debug slash commands:
- */print - Sea.io.print(...)
- */printc - Sea.io.printComma(...)
- */printd - Sea.io.dprint(true, ...)
- */printt - Sea.io.printTable(tableObj, rowname, level, maxLevel)
*Sea.string (SeaString v0.3)
- Prepared for Lua 5.1
*Sea.wow.spellbook (SeaSpellbook v1.8)
- Prepared for Lua 5.1

v1.21 (8/3/06)
*Sea.wow.spellbook (SeaSpellbook v1.7)
- Minor cleanup, before standalone release.
- Fixed SeaSpellbook registration error
- Changed File rename for consistancy
*Sea.wow.spellbook (SeaSpellbook v1.6)
- 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.
- Allowed for scholar registration OnLoad (tho no valid data is availible until after PLAYER_ENTERING_WORLD

v1.20 (8/3/06)
- Removed completely outdates unit tests
- 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)
- 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.
- Allowed for scholar registration OnLoad (tho no valid data is availible until after PLAYER_ENTERING_WORLD
- Fixed Sea.io refrences
*Sea.string (SeaString v0.2)
- Changed lua file name
*Sea.io (SeaPrint v0.2)
- Added makeHyperlink
- Changed lua file name
Sea.util (SeaHooks v0.7)
- Added an inclusive argument to split to catch empty strings
- Changed lua file name
*Sea.data
- 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)
- Made the Sea version embeddable/embedded and changed the embedding style to match the other mini-libs
- Made the tooltip in lua to avoid xml duplication errors
*Sea.data.item
- 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
- Added GetSpellIDByName( name, [booktype[, rank]] )
- Added RegisterScholar( scholarTable ) - Register a scholar with the specified id, that will be informed when the spellbook change
- Added UnregisterScholar( id )
- Added GetSpellDetails( index, bookType, spellType ) - Read the tooltip to get detailed information about a spell
*Sea.io
- Added versioning for compat with SeaStrings mini-lib.
- Added support for sending debug prints to IEFs debug capture system.
*Sea.string
- Fixed fromTime to correctly display decimal places on the seconds, rounding correctly as well.
- Optimized the following functions: startsWith, endsWith, capitalizeWords
*Sea.wow.questLog
- Protect/unprotect updated to fully restore scroll bar position.
- 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.
- Added getPlayerQuestTreeFlat - returns questTree in a flat format
- Added convertPlayerQuestTreeFromFlatToNormal - converts result of getPlayerQuestTreeFlat to format of getPlayerQuestTree for backward compatibility

v1.11 (1/14/06)
*Sea.util.lua
- Only one replace hook is now called for each hook call, unless it returns true as arg1
- 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)
- Fixed bug preventing propper unhooking

v1.1 (1/4/06)
*Sea.wow.tooltip
- 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
- colorToString was returning floats in the string instead of hex, fixed.

v1.08 (12/24/05)
Sea.string
- 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:
- Updated hooks to use Style and features defined by SeaHooks v0.3 as follows:
- - Code Optimization thanks to suggestions from Cladhaire and Iriel
- - Added Feature: input argument modification using a 'before' hook.
- - *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.
- - *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)
- - *This allows you to modify a function output without destroying or hiding the orig function, allowing additional hooks to be called without conflicting functionality.
- - Added Feature: You can now modify return values from either a 'replace' that hides the orig func or an 'after' hook
- - Added Feature: Added Error Debug and Vebose Debug by hook function name
- - */script Sea.util.debugHooks(enabled, verboseHookName)
- - *enabled - boolean, verboseHookName - string equal to 'orig' passed to hook function (nil to disable)
- - *Note: enabling debug usually incurs a heavier proc load and can cause slow down when used with OnUpdate hooks.
- - Added Feature: current return values from a hooked function are availible to 'after' hooks via global return variables: Sea.util.returnArgs[1-20]
- - *Note: These arguments are only availible for the durration of the 'after' hook call.
- - *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.
- - *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.
- - *This method preserves reverse compatibility as well as avoids table creation and thus does not effect GC.
- - *You can also use Sea.util.getReturnArgs() to unpack them for you. Ex: local arg1, arg2 = Sea.util.getReturnArgs();
- - Now stores a refrence of the hooked function handler in the database to facilitate future overhook recognition
- Optimized split, getValue and setValue based on collaboration with Iriel, krka and Legorol
- * Sea.util.getValue updating to to be 170% <u>more</u> execution time efficient than the previous version!
*Sea.io
- Modified Sea.io.dprintfc to take a non string boolean as well for use with local debug variables.
- *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
- push/pop comments updated
- *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
- Added versions table for compatibility with embedable sub-libs such as SeaHooks

v1.06 (12/07/05)
*Sea.math & Sea.string
- Performance optimizations by Iriel ([email protected])


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


v1.02 (9/19/05)
*Sea:
- Added Sea.version, Current Version 1.02
- *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:
- Sea.util.hook now handles Frame Script Element Hooking!
- *Sea.util.hook( string originalFunctionNameOrFrameName, string newFunction, string hooktype, string scriptElementName )
- *Ex: Sea.util.hook( "PlayerFrame", "ShowMyTooltip", "after", "OnEnter" );
- Sea.util.unhook updated similarly.
- Disabled Complete Unhhoking - Incompatible with Frame Script Element Hooks - Liable to erase hooks loaded after the first hook.
- Added nil check for orig function - Added compatibility for non-preexisting frame script element functions
*Sea.wow:
- 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.
- 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:
- Removed Delicate Feather from Alchemy, now grey item.
- Added Druid reagent Wild Thornroot


(9/10/05)
* Sea.io:
- Minor bugfixes
- Renamed debugKey to errorKey for derror functions as that is the key that is checked.
- Fixed derrorfc type checking.
- Some derror functions were not passing the errorKey on to the next function, they now do.
- 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:
- Added a nil return to Sea.string.capitalizeWords to make error catching easier.
* Sea.util:
- 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")
- Changed hook and unhook to use setValue and getValue
- Extended split function (less garbage generation)
- Fixed the "replace" type hook that wasn't returning values if the original function ended up called.
* Sea.table:
- getKeyList no longer return nil for empty tables.
* Sea.wow.tooltip:
- Added create(tooltipTable, tooltipName) that uses the same Table format as Sea.wow.tooltip.scan
- 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)
- 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.
- 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.
- Sea.io.dprint default debug Key fixed.
- *Fixed dprint in Sea.util.hook.hookFunction to use default key.

(04/07/05)
- Updated to TOC 1300
- Updated Sea.util.hook "replace" for returning functions
- Updated Sea.item extensively
- Made ImprovedErrorFrame an optional dependency so that it loads before most addons
- Added Sea.table.copy
- Added Sea.table.getKeyList
- Added Sea.string.startsWith
- Added Sea.string.endsWith
- Bug Fixes:
- - Nil table comparison fixed,
- - Fixed and updated Sea.wow.questLog
- - Fixed Sea.string.capitalizeWords
Optional Files (0)


There have been no comments posted to this file.
Be the first to add one.



Category Jump: