Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

SetAddOnDetail

Last wiki revision 2008-10-10

The intent of this page is to provide a simple, consistent API for modular AddOn inclusions to register their details. Currently in WoW, there are functions to query details of loaded AddOns. However for embedded AddOns, they don't appear anywhere. Any addons that are interested in registering their details are asked to call the following function, and any addons that are interested in what addons are loaded are asked to hook the following function:

SetAddOnDetail(name, detail)

  • name : String - The name of the AddOn being defined (should be the same as the name would be if running standalone)
  • detail : Table - Contains the detail for the various pieces of detail about the addon.

The detail table contains optional pieces of information in the same meaning and sense that they are used in the TOC File (except in lowercase), including but not limited to:

  • version : The version of the AddOn.
  • title : This text is what is displayed in the AddOns list located during user selection.
  • notes : The message that appears under the AddOn name when you mouseover the name of the AddOn in the WoW AddOns list.

For addons that want to monitor the submitted details, the following code is the recommended procedure to create the function:

-- Define a blank stub if the function doesn't exist. if not _G['SetAddOnDetail'] then _G['SetAddOnDetail'] = function(name, detail) end end

-- Define my functions to process the information. local myRegistry = {} local function myAddOnDetail(name, detail) myRegisty[name] = detail end

-- Post hook the global SetAddOnDetail function. hooksecurefunc("SetAddOnDetail", myAddOnDetail)

The following code snippets illustrate how to register your AddOn's details via the SetAddOnDetail function.

if SetAddOnDetail then SetAddOnDetail("myAddOn", { version = "1.0", title = "My AddOn", notes = "An addon to demonstrate the use of the SetAddOnDetail function", }) end

This function is implemented by the following addons:

  • Swatter of the Auctioneer AddOns by The Auctioneer AddOns Team.

AddOns using this function:

  • All of the Auctioneer AddOns by The Auctioneer AddOns Team.

Source

https://warcraft.wiki.gg/wiki/SetAddOnDetail · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.