LibSpecialization

LibSpecialization

7.5k Downloads

Please support my work on Patreon/GitHub

A library for transmitting and receiving talent specialization information of players in your group.

API

LS:Register(addon, function)

addon - The name of your addon (string) or your addon object (table)
function - The name of function tied to the addon object (string) or a function reference

LS:Unregister(addon)

addon - The name of your addon (string) or your addon object (table)

LS:RequestSpecialization(channel)

channel - The name of the channel to request latency on (string) or nil/false/no value for automatic.

  • Valid channels are INSTANCE_CHAT, RAID, PARTY.

Example:

local LS = LibStub("LibSpecialization")

local function update(specId, role, position, sender, channel) -- specId=Number, role=HEALER/TANK/DAMAGER, position=RANGED/MELEE

     print(format("User %s has a spec id of %d and a role of %s. They are positioned in the %s group.", sender, specId, role, position))

end

LS:Register("myAddOnNameOrObject", update)

LS:RequestSpecialization()