Examples

local MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceConsole-3.0")
local LGBC = LibStub("LibGuildBankComm-1.0")

function MyAddon:OnEnable()
        --Register the 3 available callbacks
	LGBC.RegisterCallback(self, "GuildBankComm_PageUpdate", "OnPageSync")
	LGBC.RegisterCallback(self, "GuildBankComm_FundsUpdate", "OnMoneySync")
	LGBC.RegisterCallback(self, "GuildBankComm_TabsUpdate", "OnTabSync")
end

function MyAddon:OnPageSync(event, sender, page, guildName)
	--items on a page have changed, read the new info using the iterators
end

function MyAddon:OnMoneySync(event, sender, newFunds, guildName)
	--the guild's money has been updated
end

function MyAddon:OnTabSync(event, sender, numTabs, guildName)
	--the information about the tabs has changed
        --this can be the icon, the name or the permissions
end

Comments

Posts Quoted:
Reply
Clear All Quotes