Skip to content

Developers: API

veechs edited this page Jan 4, 2025 · 4 revisions

Bagshui provides an API so other addons can extend its functionality. It's currently focused on rule functions, but could be expanded if other integrations would be useful.

Functions

Bagshui:AddRuleFunction()

Enables the creation of supplemental rule functions.

Bagshui:QueueInventoryUpdate()

Informs the Bagshui inventory classes that some action needs to be taken.

Documentation

Refer to comments in API.lua.

Recommendations

  • Add Bagshui to the OptionalDeps section of your addon's TOC.
  • Verify Bagshui is available and register your rule function(s) during ADDON_LOADED (preferred) or PLAYER_LOGIN:
    if IsAddOnLoaded("Bagshui") then
        -- Make your Bagshui:AddRuleFunction() call here.
    end

See it in action

For a working example, refer to Bagshui-Tmog.

Clone this wiki locally