Skip to content

Update events

plusmouse edited this page Mar 21, 2024 · 3 revisions

Currently the available events are:

  "Ready", -- Syndicator APIs ready for use

  "CharacterDeleted", -- Character removed from the data storage
  "GuildDeleted", -- Guild removed from the data storage

-- Character cache Events
  "BagCacheUpdate", -- Bags updated, including bank bags
  "MailCacheUpdate", -- Mail attachments updated
  "CurrencyCacheUpdate", -- Currency information updated
  "EquippedCacheUpdate", -- Equipped items updated
  "VoidCacheUpdate", -- Void storage updated
  "AuctionsCacheUpdate", -- Auctions on the auction house list updated

-- Guild cache events
  "GuildCacheUpdate", -- Guild money or bank tabs updated

-- Other
  "GuildNameSet", -- Triggered when the current character's guild name is determined

Using the events

To register for an event use (for example):

Syndicator.CallbackRegistry:RegisterCallback("AuctionsCacheUpdate", myCallback, myOwner)

Each callback will be passed the full name (Name-NormalizedRealmName) of the guild/character updated as an argument as a string.

Special case, "BagCacheUpdate"

This will also be passed a second argument,

{
  bags = table indexed by bagID with true indicating that the bag/container has been updated in this event
  bank = table indexed by bagID with true indicating that the bag/container has been updated in this event
}

Special case, "GuildCacheUpdate"

This will also be passed a second argument, specifying which guild bank tabs have changed, a table indexed by tabIndex with true indicating that the tab has changed contents this time around.

Clone this wiki locally