- Home
- Downloads
-
Addons & Mods
Featured
World of Warcraft
4,841 Addons
-
Popular Downloads
- Top World of Warcraft Addons
- Top Rift Addons
- Top Skyrim Mods
- Top Minecraft Server Mods
- Top Terraria Maps
- Top Starcraft II Maps
- Top Runes of Magic Addons
- Top Warhammer Online Addons
- Top Age of Conan Addons
-
- Curse Client
- Premium
- News
- Giveaways
- Forums
LibAlts-1.0
- 0 Likes
- World of Warcraft
- 55,247 Downloads
- Supports: 4.3
- 25 Average Daily Downloads
- Created 10/21/2008 5:44:46 AM
- Updated 11/29/2011 2:05:59 PM
- 19 Favorites
- Project Site
- License: MIT License
- Release Type: Mature
- Newest File: 2.0
About LibAlts-1.0
Overview
LibAlts provides an API to register and retrieve alternate identity information between addons. It maintains main-alt relationships. A given character can be defined as a main with one or more alts.
Basic API
- :SetAlt(main, alt, source) - Associate a main name with an alt name. An optional source can be specified. If no source is specified, it is added the user-defined source.
- :GetAlts(main) - Get a list of alts for a given name.
- :GetMain(alt) - Get the main character associated with a given name.
- :GetAllMains() - Get a list of all main characters.
- :IsMain(main) - Is the given name a main character.
- :IsAlt(alt) - Is the given name an alternate character.
- :DeleteAlt(main, alt, source) - Delete the main-alt relationship. An optional source can be specified. If no source is specified, it is deleted from the user-defined source.
- :TitleCase(name) - Return the name in title case. The first letter is capitalized and the rest are lower case.
Sources
Sources are a way to differentiate the data entered into LibAlts. User-defined data will have no source (i.e., the source is nil). Sources provide a solution to problems such as automated guild imports. If the information pushed into LibAlts from guild notes is placed into the same area as user-defined notes, then re-importing it later is problematic. If the guild data has its own area, it is easy to wipe that data and re-import it.
When adding data from automated sources, the source name needs to be unique. As a convention, data added for a guild should have the GUILD_PREFIX constant prepended to the guild name returned from the GetGuildInfo() API call. Data from an addon should have the ADDON_PREFIX prepended to the addon name.
LibAlts will merge data from all sources when answering queries, unless you use one of the *ForSource functions that allows you to query a particular source.
- :GetAltsForSource(main, source) - Get a list of alts for a given name for the given source.
- :GetMainForSource(alt, source) - Get the main character associated with a given name for the given source.
- :GetAllMains(source) - Get a list of all main characters for the given source.
- :IsMainForSource(main, source) - Is the given name a main character.
- :IsAltForSource(alt, source) - Is the given name an alternate character.
- :RemoveSource(source) - Remove all data for the given source.
- GUILD_PREFIX - A constant to prepend to source names for imported guild data.
- ADDON_PREFIX - A constant to prepend to source names for addon automated data.
Callbacks
- LibAlts_SetAlt - Fired after SetAlt() is called.
- LibAlts_RemoveAlt - Fired after DelAlt() is called
- LibAlts_RemoveSource - Fired after RemoveSource() is called.
LuaDoc: http://www.wowace.com/projects/libalts-1-0/pages/api/lib-alts-1-0/
------------------------------------------------------------------------
r47 | talryn1 | 2011-11-29 19:57:23 +0000 (Tue, 29 Nov 2011) | 1 line
Changed paths:
A /tags/2.0 (from /trunk:46)
Tagging as 2.0. Updated TOC for 4.3.
------------------------------------------------------------------------
r46 | talryn1 | 2011-11-29 19:42:14 +0000 (Tue, 29 Nov 2011) | 1 line
Changed paths:
M /trunk/LibAlts-1.0.toc
Updating TOC for 4.3
------------------------------------------------------------------------
| File Name | Release Type | Game Version | Downloads | Date |
|---|---|---|---|---|
| 2.0 | Release | 4.3 | 45 | 11/29/2011 2:05:59 PM |
| 2.0-nolib | Release | 4.3 | 1 | 11/29/2011 2:05:58 PM |
| 1.9-nolib | Release | 4.2 | 1,031 | 6/28/2011 2:19:49 AM |
| 1.9 | Release | 4.2 | 9,856 | 6/28/2011 2:19:49 AM |
| 1.8-nolib | Release | 4.0.6 | 1,130 | 4/26/2011 6:31:35 AM |
| 1.8 | Release | 4.0.6 | 10,032 | 4/26/2011 6:31:35 AM |
| 1.7-nolib | Release | 4.0.1 | 1,990 | 11/3/2010 2:44:09 PM |
| 1.7 | Release | 4.0.1 | 22,965 | 11/3/2010 2:44:09 PM |
| 1.6 | Release | 4.0.1 | 8,403 | 10/13/2010 1:27:35 AM |
| 1.6-nolib | Release | 4.0.1 | 470 | 10/13/2010 1:27:34 AM |
| 1.5 | Release | 4.0.1 | - | 9/29/2010 1:09:35 AM |
| 1.5-nolib | Release | 4.0.1 | - | 9/29/2010 1:09:34 AM |
| 1.4 | Release | 3.3.5 | 8 | 8/8/2010 1:02:07 PM |
| 1.4-nolib | Release | 3.3.5 | - | 8/8/2010 1:02:06 PM |
| 1.3 | Release | 3.3.0 | 1 | 12/11/2009 5:29:55 AM |
| 1.3-nolib | Release | 3.3.0 | - | 12/11/2009 5:29:51 AM |
| 1.2 | Release | 3.2.0 | - | 8/4/2009 4:11:34 PM |
| 1.2-nolib | Release | 3.2.0 | - | 8/4/2009 4:11:31 PM |
| 1.1 | Release | 3.1.0 | - | 4/14/2009 7:38:43 AM |
| 1.1-nolib | Release | 3.1.0 | - | 4/14/2009 7:38:41 AM |
| 1.0 | Release | 3.0.8 | - | 2/8/2009 12:01:21 AM |
| 1.0-nolib | Release | 3.0.8 | - | 2/8/2009 12:01:19 AM |
| 1.0b1 | Beta | 3.0.8 | - | 1/31/2009 2:31:18 PM |
| 1.0b1-nolib | Beta | 3.0.8 | - | 1/31/2009 2:31:15 PM |