/trunk
local f = CreateFrame( "Frame", "AraBrokerGuildFriends", UIParent ) |
local t = CreateFrame"Frame" |
local block, isGuild, horde, config |
local dontShow, block, horde, config, isGuild = true |
local defaultConfig = { showGuildNotes = true, showGuildName = true, sortType = "class", sortDESC = false, fontSize=12 } |
local guildEntries, friendEntries = {}, {} |
end |
function f:GUILD_ROSTER_UPDATE() |
f.GuildOnEnter( block, not( isGuild and block ) ) |
dontShow = not( isGuild and block ) |
f.GuildOnEnter( block ) |
end |
function f:PLAYER_GUILD_UPDATE(event, unit) |
return ShowTablet( self, false, friendEntries ) |
end |
function f:GuildOnEnter(dontShow) |
function f:GuildOnEnter() |
if( not dontShow and InCombatLockdown() )then f:Show() return Menu_OnEnter(f) end |
for k, v in next, guildEntries do del(v) guildEntries[k]=nil end |
for i=1, GetNumGuildMembers(true) do |
end |
end |
f.GuildBlock.text = IsInGuild() and format( " %s%d/%d", config.showGuildName and GetGuildInfo"player" and GetGuildInfo"player"..": " or "", #guildEntries-1, GetNumGuildMembers(true) ) or " No Guild" |
return not dontShow and ShowTablet( self, true, guildEntries ) |
if dontShow then dontShow = false else return ShowTablet(self, true, guildEntries) end |
end |
local function OnBlockClick(self, button) |
ShowFriends() |
if( IsInGuild() )then GuildRoster() else t.guildTimer = 0 end |
f:GuildOnEnter(true) |
f:GuildOnEnter() |
f.ADDON_LOADED = nil |
end |
## Interface: 30000 |
## Title: |cFFFFB366Ara|r - Broker - Guild & Friends |
## Version: r12 |
## Version: r13 |
## Author: Ara |
## Notes: A Data Broker plugin that provides guildmates & friends informations and interactions. |
## SavedVariables: AraBrokerGuildFriendsDB |